TOP shows above 100% WCPU usage

Brent Casavant b.j.casavant at ieee.org
Thu Aug 17 19:35:27 UTC 2006


On Thu, 17 Aug 2006, Dan Nelson wrote:

> In the last episode (Aug 17), Brent Casavant said:
> > Note that IRIX's top does not bias for availabile CPUs -- I've seen
> > well-threaded programs using in excess of 2400% CPU.
> > 
> > What it comes down to is that depending on the nature of the
> > information you're trying to glean from WCPU, you may want either
> > view of the data. Some versions of top on Linux allow you to switch
> > between IRIX and Solaris views.  From the help screen for top from
> > procps 3.2.6 on Linux:
> > 
> >   1,I       Toggle SMP view: '1' single/separate states; 'I' Irix/Solaris mode
> >
> > There's really not a clear cut right and wrong here, particularly if
> > your version of top is able to display per-thread instead of
> > per-process data.  Sometimes you want to break out individual threads
> > and see their level of CPU utilization (the IRIX view is most
> > useful), sometimes you want to get a handle on which processes are
> > loading down a machine (the Solaris view is most useful).
> 
> Is this similar to FreeBSD top's 'H' option?

Partially.  The FreeBSD 'H' option appears to be the same as Linux
procps top's '1' option and IRIX's 'T' option.  That is, it displays
individual threads.

The original issue was as to whether a process/thread's CPU time
should be scaled by the total number of CPUs.  In the Solaris view
this is done, so in theory if you add up the CPU times you should
get a total of 100%.  In the IRIX view this is not done, so if you
add up the CPU times you should get (# of processors) * 100%.

My main point was that both views are useful under different
circumstances.  A sysadmin may be trying to track down an
application that's hogging the system, in which case the Solaris
view is more useful.  A developer might be trying to determine
how well their application is utiizing available CPU time, in
which case the IRIX view is more useful.  Either way you can
get the same information, it's just more amenable to a particular
objective each way.

Brent

-- 
Brent Casavant			Dance like everybody should be watching.
www.angeltread.org
KD5EMB, EN34lv


More information about the freebsd-stable mailing list