2012/4/5 Lu GL Gao <[email protected]>:
>
> Suse 11SP1 running as guest on zVM 5.4
> Linux guest has 4 virtual processors.
>
> From zVM Performance Toolkit FCX112-User Resource Usage Screen, we can find
> a linux guest's %CPU is 55.2.
> Based on description, this value is percent of total used by this guest.
>
> At the same time, I logon this linux with root user and issue "top"
> command. I found:
> Cpu(s): 0.8%us, 5.9%sy, 0.0%ni, 80.7%id, 6.7%wa, 0.3%hi, 4.1%si, 1.4%st
>
> We know that linux cpu usage mainly include user cpu and sys cpu. But why
> performance toolkit value cannot corresponding with top command value?
>
> What's mean 55.2 %CPU on Performance Toolkit?
> Why it is not equal to %us + %sy

Linux scales some numbers to 100% and the line you get from "top" is
average per CPU. The desire to scale numbers to 100% probably stems
from a dedicated servers and makes very little sense in a shared
resource environment.

So Linux really reports ( 0.8 + 5.9 + 1.4 ) * 4 ~ 32%    Further, CPU
usage is computed over a certain interval. Your z/VM monitor data uses
typically 1 minute interval, where "top" refreshes every few seconds
(depending on your taste). Comparison of the two is only possible when
you have the same intervals and when they are aligned properly.

Note that I added the 1.4% "steal time" as well, because even though
Linux thinks it did not get it, it probably did (but the real answer
is in the monitor data). In many cases, you need both the VM and Linux
data to make sense of it. That's why our performance monitor zVPS
collects both sides and combines them in a single view.

Rob
--
Rob van der Heij
Velocity Software
http://www.velocitysoftware.com/

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to