Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Weird situation: Redhat Enterprise 5.5 (stock install, no updates, x64) on a HP z800 workstation. (Dual Xeon 2,2 Ghz. 8 cores, 16 if you count Hyper-threading. RH sees 16 cores.)

We have an application that can utilize 1, 2 or 4 threads for heavy calculations. Somehow all these threads run on the same core at 100% load (the other 15 cores are nearly idle) so there is absolutely no benefit from the extra threads. In fact there is a slight slowdown as the threads get in each others way on the single core.

How do I get them to run on separate cores (if possible)? Application is 64 bit. Can't change anything about the software except changing the threads setting. Is there some obscure Linux setting I can try to change? (I'm a True64 and Aix guy. I use Linux, but have no in depth knowledge of the process scheduling on Linux.)


/proc/cpuinfo list al 16. top en gnome cpu-monitor both indicate only 1 core is used. I tried something similar to that perl thing as well. We can load all CPU to nearly 100% if we want to. Application vendor claims: Yes it is multi-threaded but it is not optimized yet. That will be the next version (in August).

So I think the application is doing sub-threading within it's own process-space in stead of proper real separate process threads. Really nothing I can do about it then....

share|improve this question
    
what's the application? –  Chopper3 Feb 16 '11 at 10:27
    
what kind of app? is it java, if so, does it use green or native threads? –  sysfault Feb 16 '11 at 10:28
    
You should verify with htop or a similar tool, that the application is actually using several threads actively - or just one. –  Kvisle Oct 21 '11 at 18:10
add comment

2 Answers

Download the stress utility from RPMforge or yum and run it with:

stress --cpu 16 to generate 16 workers. As stated above, run top with the 1 switch to show all CPUs in the listing.

Once you've verified the CPU listing and activity, Ctrl-C out of stress and run your application. Start top with the same switch and then use the H switch to show all process threads.

share|improve this answer
add comment

Are you 100% sure it's running on only one core? How did you check? top and then pressed "1" ? Do you see all your 16 cores on "top" after pressing "1"? Or in "cat /proc/cpuinfo" ?

What happens with other applications? If you start something like

perl -e 'foreach (1..9e9) { sqrt(1234) }' &

16 times, do you see in top all your 16 cores at 100% ?

I think this is more a configuration of your application and nothing specific to the linux system.

share|improve this answer
    
/proc/cpuinfo list al 16. top en gnome cpu-monitor both indicate only 1 core is used. I tried that perl thing as well. Pegs all 16 to nearly 100%. –  Tonny Feb 16 '11 at 12:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.