SUMMARY: Correct %CPU usage

From: Vahid Moghaddasi <sunman_at_ureach.com>
Date: Mon Feb 02 2004 - 22:46:03 EST
Hi,
Thanks to the following who replied, most people mentioned that
it is not
matter of lying or not, it is just the way %CPU utilization is
calculated on
Sun systems.

Darren Dunham	
Matthew Stier
Thomas M. Payerle
joe_fletcher@btconnect.com
Eric Voisard

Here is Jay Lessert's answer:
On Sun, Feb 01, 2004 at 10:30:46PM -0500, Vahid Moghaddasi
wrote:
> Hi,
> Is this correct that to get the real CPU usage of a process,
we
> will have to multiply the %CPU utilization shown by top or
> prstat by the number of CPU's in the system?

That is correct.

> For example, if
> there are 10 CPU's in a system and top shows lets say gzip is
> using %5, that means 5x10=%50 of one CPU.

Correct.

> I understand top not telling the correct usage on Solaris (it
OK
> on hp-ux) but why prstat is lying?

It is not lying, that is the way it is intended to work, theory
being that:

1)  This is the % system utilization regardless of # of CPU's

2)  Single processes can be multi-threaded; in your 10-cpu
example,
    a single process with 5 threads active could show 50%
utilization.

As you, I would prefer that process to show 500%  utilization,
and the very first Sun MP kernels worked that way (4.1.x), but
that is not the way it works now.  Perhaps it is a SysV thing.

________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon Feb 2 22:45:53 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:29 EST