Click here to Skip to main content
15,896,417 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
VB
Cpu0  : 68.9%us,  4.6%sy,  0.0%ni, 20.5%id,  0.0%wa,  1.0%hi,  5.0%si,  0.0%st
Cpu1  : 58.1%us,  4.3%sy,  0.0%ni, 33.6%id,  0.0%wa,  0.0%hi,  4.0%si,  0.0%st
Cpu2  : 56.1%us,  5.0%sy,  0.0%ni, 34.9%id,  0.0%wa,  0.3%hi,  3.7%si,  0.0%st
Cpu3  : 55.8%us,  4.0%sy,  0.0%ni, 36.2%id,  0.0%wa,  0.0%hi,  4.0%si,  0.0%st
Cpu4  : 53.0%us,  5.6%sy,  0.0%ni, 38.4%id,  0.0%wa,  0.0%hi,  3.0%si,  0.0%st
Cpu5  : 53.0%us,  5.6%sy,  0.0%ni, 36.8%id,  0.0%wa,  0.0%hi,  4.6%si,  0.0%st
Cpu6  : 54.0%us,  4.3%sy,  0.0%ni, 38.1%id,  0.0%wa,  0.0%hi,  3.6%si,  0.0%st
Cpu7  : 53.6%us,  4.6%sy,  0.0%ni, 37.4%id,  0.0%wa,  0.3%hi,  4.0%si,  0.0%st
Cpu8  : 49.8%us,  5.6%sy,  0.0%ni, 40.2%id,  0.0%wa,  0.0%hi,  4.3%si,  0.0%st
Cpu9  : 55.4%us,  5.0%sy,  0.0%ni, 36.3%id,  0.0%wa,  1.0%hi,  2.3%si,  0.0%st
Cpu10 : 54.3%us,  6.0%sy,  0.0%ni, 34.8%id,  0.0%wa,  0.0%hi,  5.0%si,  0.0%st
Cpu11 : 53.6%us,  6.3%sy,  0.0%ni, 36.4%id,  0.0%wa,  0.7%hi,  3.0%si,  0.0%st
Cpu12 : 55.0%us,  4.0%sy,  0.0%ni, 37.1%id,  0.0%wa,  0.0%hi,  4.0%si,  0.0%st
Cpu13 : 53.7%us,  4.0%sy,  0.0%ni, 38.7%id,  0.0%wa,  0.3%hi,  3.3%si,  0.0%st
Cpu14 : 52.8%us,  5.0%sy,  0.0%ni, 37.6%id,  0.0%wa,  0.0%hi,  4.6%si,  0.0%st
Cpu15 : 56.8%us,  4.0%sy,  0.0%ni, 34.9%id,  0.0%wa,  1.0%hi,  3.3%si,  0.0%st


The service process running on linux system of MIPS platform. The process had about 70 threads, 16 threads bond to the 16 cores, every core bond a single thread. The left threads do not bond operation. So from the result we can see that the 0th core's cpu usage very high. I doubt the linux system make the left threads running on the 0th core. So the 0th core's cpu usage very high. How can I handle this problem? Thanks.
Posted
Comments
Jochen Arndt 2-Nov-12 4:18am    
Are some threads bound to specific cores by your application?
If so, remove the binding and let the kernel assign the cores to the threads.
gn7575 2-Nov-12 6:15am    
Yes, the board has 16 cores, we bound 16 service threads to each cores. The other threads not bound. The 16 service threads do a lot of work. The other threads just auxiliary.
Jochen Arndt 2-Nov-12 6:22am    
Just try it without binding and compare the loads. The kernel usually makes a good switching job. You may also give the service threads a higher priority than the auxiliary threads and/or lower the priority of the aux threads.
nv3 2-Nov-12 4:35am    
I don't think that a slightly higher CPU usage on core 0 is so unusual. System processes or an uneven distribution of the remaining threads might easily cause that. As Jochen said, better leave the distribution of threads to cores to the operating system, except you know very well what you are doing.
gn7575 2-Nov-12 6:26am    
You are right, but some time it will make some problem.

1 solution

Generally the threads within an application will execute on a single CPU because of the complexities of managing shared memory and instruction pipe lining.

If you execute 2 or more processes then you will see more usage on other CPU's.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900