473,761 Members | 10,280 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ThreadPool and Dual Core Opteron.

Hi,

I have been seeing a strange behaviour when doing some tests on a Dual -
Dual Core Opteron system using Windows XP (32bits with SP2).

In out application we have a wrapper around the thread pool to handle the
work on renderers and CPU intensive tasks. On the Dual - Dual Core Opteron,
the application is correctly starting 4 threads but it seems to be running
only 2 concurrently.

In fact, It's when checking the performance that i realized something was
strange. My AthlonX2 4800 was as fast as my Dual Opteron 285...

Also we are using SetThreadIdealP rocessor with the thread index (0 to 4 in
that case) but that does not seem to have an effect at all. Even commenting
it didnt change a thing.

Any idea ?

Laurent.
Aug 17 '06 #1
4 2339
LLessieux wrote:
Hi,

I have been seeing a strange behaviour when doing some tests on a Dual -
Dual Core Opteron system using Windows XP (32bits with SP2).
Is it XP Pro? XP Home only supports 1 CPU. In addition, I think you need
to have the CPUs installed at the time that XP Pro is installed,
otherwise read this: http://support.microsoft.com/kb/309283/
In out application we have a wrapper around the thread pool to handle the
work on renderers and CPU intensive tasks. On the Dual - Dual Core Opteron,
the application is correctly starting 4 threads but it seems to be running
only 2 concurrently.

In fact, It's when checking the performance that i realized something was
strange. My AthlonX2 4800 was as fast as my Dual Opteron 285...

Also we are using SetThreadIdealP rocessor with the thread index (0 to 4 in
that case) but that does not seem to have an effect at all. Even commenting
it didnt change a thing.
In general, you should probably leave scheduling to the scheduler,
unless you can measure a significant performance increase from handling
it yourself.
Any idea ?
You should check that all 4 CPUs can work concurrently with a simple
test program. Otherwise, it's probably a problem with your Windows
installation.

Tom
Aug 21 '06 #2
It's a XP Pro indeed sorry that was so obvious that i forgot to mention it,
and i am pretty sure the 2 cpus where plugged when the installation took
place.

I have seen the 4 CPU working so it doesnt seem to be the issue.
But now i wonder if the ThreadIdealProc essor deals with the cores as it
would with physical processors, I'll check that too. But i think it didnt
change anything when i disabled it.

With the amount of memory we tend to touch, it's much better if we don't
swap the thread accross processors to avoid trashing the other caches etc...

I'll modify one of our unittest to check that indeed the 4 threads can run
at the same time.

Laurent.

"Tom Widmer [VC++ MVP]" wrote:
LLessieux wrote:
Hi,

I have been seeing a strange behaviour when doing some tests on a Dual -
Dual Core Opteron system using Windows XP (32bits with SP2).

Is it XP Pro? XP Home only supports 1 CPU. In addition, I think you need
to have the CPUs installed at the time that XP Pro is installed,
otherwise read this: http://support.microsoft.com/kb/309283/
In out application we have a wrapper around the thread pool to handle the
work on renderers and CPU intensive tasks. On the Dual - Dual Core Opteron,
the application is correctly starting 4 threads but it seems to be running
only 2 concurrently.

In fact, It's when checking the performance that i realized something was
strange. My AthlonX2 4800 was as fast as my Dual Opteron 285...

Also we are using SetThreadIdealP rocessor with the thread index (0 to 4 in
that case) but that does not seem to have an effect at all. Even commenting
it didnt change a thing.

In general, you should probably leave scheduling to the scheduler,
unless you can measure a significant performance increase from handling
it yourself.
Any idea ?

You should check that all 4 CPUs can work concurrently with a simple
test program. Otherwise, it's probably a problem with your Windows
installation.

Tom
Aug 21 '06 #3
LLessieux wrote:
It's a XP Pro indeed sorry that was so obvious that i forgot to mention it,
and i am pretty sure the 2 cpus where plugged when the installation took
place.

I have seen the 4 CPU working so it doesnt seem to be the issue.
You could check the HAL as per http://support.microsoft.com/kb/309283/
to be absolutely sure.
But now i wonder if the ThreadIdealProc essor deals with the cores as it
would with physical processors, I'll check that too. But i think it didnt
change anything when i disabled it.

With the amount of memory we tend to touch, it's much better if we don't
swap the thread accross processors to avoid trashing the other caches etc...
Well, once you've got the 4 cpus working (if you ever do!), I'd try it
with and without to make sure you aren't accidentally slowing the code down.
I'll modify one of our unittest to check that indeed the 4 threads can run
at the same time.
Silly question, but I assume that 2 of the threads aren't blocked are
they? Are you sure you're seeing 4 threads with a ready status but only
2 actually running? Do you have any other threads? Does anything change
if you increase the priority of your 4 pool threads?

Tom
Aug 21 '06 #4
I am seeing something very similar. Although with VS2003 and XP32 all is
fine, the same code compiled with VS 2005 and ran in 64 bit XP or 64bit W2k3
Server will exhibit this behavior.
For example, I run two instances of Einstein@home and they have both cpu's
pegged, each process shows 50% utilization.
When I run my app which creates one thread per cpu, and they're very
computationally instense, my app is only showing 50% processor usage and one
of the EInstein@home instances remains at 50%. This behavior is not exhibited
with compile of same code with VS2003 and run under XP Pro 32 bit, he same
code shows my app using 99% and both EInstein instances at 0%. Note that the
Einstein instances are running at a lower priority. I've tried changing
thread priority but there's no difference in behavior.

Would setting thread affinity possibly remedy this? It seems the OS is not
scheduling correctly.
--
Still writing code...
"LLessieux" wrote:
Hi,

I have been seeing a strange behaviour when doing some tests on a Dual -
Dual Core Opteron system using Windows XP (32bits with SP2).

In out application we have a wrapper around the thread pool to handle the
work on renderers and CPU intensive tasks. On the Dual - Dual Core Opteron,
the application is correctly starting 4 threads but it seems to be running
only 2 concurrently.

In fact, It's when checking the performance that i realized something was
strange. My AthlonX2 4800 was as fast as my Dual Opteron 285...

Also we are using SetThreadIdealP rocessor with the thread index (0 to 4 in
that case) but that does not seem to have an effect at all. Even commenting
it didnt change a thing.

Any idea ?

Laurent.
Sep 26 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
519
by: Plymouth Acclaim | last post by:
Hi guys, We have a problem with Dual AMD64 Opteron/MySQL 4.0.18/Mandrake 10 for a very high volume site. We are evaluating the performance on our new server AMD64 and it seems it's slow compared to Dual Xeon/MySQL 4.0.15/RedHat8 and Dual Xeon/MySQL 4.0.18/Mandrake 10. And it seems there are zombie threads. 570 threads in 1 hour and we didn't even use JDBC connection pooling at all. These threads are supposed to be gone within 60...
7
4239
by: cwahlmeier | last post by:
Greetings, I am running DB2 Workgroup Edition on an Intel box with two physical CPUs. It is running Windows with hyperthreading. Thus, the operating system thinks it has 4 cpus. I am about to upgrade to another dual CPU box, but this one runs the new dual core chip. So, after hyperthreading, it will look like there are 8 CPUs. Anybody know how DB2 Workgroup Edition will react? Furthermore, will I be in violation of my license?
25
9736
by: John Gibson | last post by:
Hi, all. I need to upgrade my dual Xeon PostgreSQL engine. Assuming similar memory and disk sub-systems, I am considering a Quad Xeon system vs. a Dual Itanium for PostgreSQL. I believe that the PostgreSQL code is written for 32 bit and not optimized for the 64 bit Itanium cpu. That makes me think that the Xeon system would be a better choice.
2
2683
by: webwarrior | last post by:
Hi, Is there a reason why we have to pay more for licensing for a different kind of processor? Why are we not charged for the Hyperthreading on some processors also. If Oracle is really conserned about the low end business market (small and medium), then they should drop their attitude on Dual Core processors.
2
2485
by: bruce_brodinsky | last post by:
Don't know whether to post this on a hardware or software board, so here goes: I wrote a c# chess program which searches for checkmate. Now, it's single-threaded. But I was thinking. I just got a Dell XPS dual-core machine. If I modify the chess program to use threading, will it take advantage of the dual-core machine? If so, is there any special code (besides .Net threading) that I have to implement? Thanks in advance - Bruce
13
1699
by: Pieter | last post by:
Hi, Maybe a little bit off-topic, but it still seemd the best place to ask for it :-) I'm planning to buy a new development laptop, and I would like to buy an AMD, Dual Core,-bit But none of my clients has an AMD, most an Intel Pentium 3. Will the fact that my applications will be compiled on an AMD, Dual Core, 64-bit have any influence on the prestations? I thought there was a way to
2
1399
by: kingsolomon2000 | last post by:
Hi! Can anyone please show me an example how to write a very simple C program such that it runs on a specific processor? I want to run a very simple program, 2 programs identical, and one runs one one processor and the other program (same one) runs on a different processor. How do I specify which processor in the code to force the program to
8
1898
by: Andy | last post by:
Hi guys, I'm sorry, I'm not sure this is the correct group to be asking this kind of question... I'm going to develop a software package that includes a web server (and PHP code) , a database, and some Python code of course. I am being strongly suggested to make it to work on a dual- or multi-core computer, but I'm confused on how to take advantage of the multiple CPUs.
0
2783
by: Jovo Mirkovic | last post by:
Hello, I have a problem with thread safe in VB.NET 2005. I'm calling DLL from EXE file, in separete thread. That DLL must update some Tables in database. When I using ThreadPool, i have problem because many thredas update same Table and I have wrong results :(
0
9345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.