4
After using top
for long time, albeit basically, I have grown to distrust its % CPU
column reports. I have an 8-core (quad core Intel i7 920 with hyperthreading) hardware, and see some wild numbers when running a process that should not use more than 5% overall. top
happily reports 50%, and I suspect it is not so.
My question is, is it a known fact that it's inaccurate when several CPUs/cores are present?
I used mpstat
from the sysstat
package, and its showings are much more conservative, certainly within my expectations. I did press 1
for top
to switch it to show all the core and us/sy/io stats, but the numbers are substantially higher than with mpstat
...
I know that my expectations could be unfounded as well, but my gut feeling tells me top
is wrong!
The reason I need to know is because the process I am monitoring only guarantees quality of service with CPU usage "less than 80%" (however vague that sounds), and I need to know how much headroom I have left. It's a streaming server.
What CPU usage number in
top
do you talk about? Single or SMP mode? – Benjamin Bannier – 2010-05-01T21:58:43.157Both single and SMP report a total that is about twice as high as numbers reported by mpstat. – amn – 2010-05-02T23:14:00.390
Try to install htop. That is is a better version (in my opinion) of top. See what results you get there first. – Waxhead – 2011-12-11T22:53:00.397