Accuracy/reliability of "top" CPU usage numbers

Grant Edwards grant.b.edwards at gmail.com
Fri Nov 14 17:42:10 UTC 2014


On 2014-11-14, Cathey, Jim <jcathey at ciena.com> wrote:

> Things like 'top' have _always_ had issues with processes that are
> clock-synchronized.  Very few OS's (and I don't think Linux is one of
> them) actually account CPU time by use of things like the PPC TBR
> register (for example). Most do it via statistical sampling in a
> clock interrupt.

And if my process is triggering off that same clock interrupt, I get
bogus values?

> The top-analog we had on our OSE products was _very_ accurate,
> because it accumulated CPU consumption via the TBR deltas on context
> switches.

The total of values for individual processes shown by top seen to
agree well with the idle value show in "header" of the top output. 

Does that mean the idle value is useless as well?

Almost all of the "real" work done on this target is clock
synchronized, so how does one determine how much CPU is being used and
by whom?

-- 
Grant Edwards               grant.b.edwards        Yow! The PILLSBURY DOUGHBOY
                                  at               is CRYING for an END to
                              gmail.com            BURT REYNOLDS movies!!



More information about the busybox mailing list