In the operate system ,I write a multithread program, in order to test the highest CPU usage when the certain number of the thread are concurrent.
The experimental data is as follow:
the thread number the highest usage of CPU
Conclusion:The number of thread is from 25 to 1000, the highest usage of CPU fluctuates between 28 and 32.
1、 Why not the usage of CPU is higher than 32%?
2、 In the Windows Server 2008 R2 Enterprise, are there any restrictions for the CPU usage of the process ?
It sounds like there are some blocking calls (sleep, mutex, critical sections, events, i/o etc) that maybe in your application. That can explain why you arent seeing your CPU pegged.
Take a look at the concurrency visualizer that our team has created. (available in Visual Studio 2010 as well as Visual Studio 11 Beta). The visualizer lets you identify excactly why each thread is blocked, and what was scheduled on each CPU.
Microsoft réalise une enquête en ligne pour comprendre votre opinion sur le site Web de Msdn. Si vous choisissez de participer, l’enquête en ligne vous sera présentée lorsque vous quitterez le site Web de Msdn.