Linux 'top' utility widly inaccurate (more so for multi-CPU/core hardware)?
Posted
by amn
on Super User
See other posts from Super User
or by amn
Published on 2010-05-01T21:56:13Z
Indexed on
2010/05/01
21:58 UTC
Read the original article
Hit count: 163
cpu-usage
Hi all.
After using 'top' for long time, albeit basically, I have grown to distrust it's '% CPU' column reports. I have a 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 it's 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 can be unfound 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.
© Super User or respective owner