Accuracy/reliability of "top" CPU usage numbers

Cathey, Jim jcathey at ciena.com
Fri Nov 14 22:42:14 UTC 2014


If you can't modify the kernel to collect more accurate
data (like we did with our top-oid in OSE), you have to
get a lot smarter.  Set up some 'offline' processing of
bulk data, NON-clock synchronized, and characterize that.
(i.e. I can process 1000 records/second in a non-clock-synced
loop, therefore each record takes 1msec.  Normal clock-synced
behavior is 1 record per clock invocation.)

Etc.  It's a pain.

-- Jim

-----Original Message-----
From: busybox [mailto:busybox-bounces at busybox.net] On Behalf Of Grant Edwards
Sent: Friday, November 14, 2014 2:26 PM
To: busybox at busybox.net
Subject: Re: Accuracy/reliability of "top" CPU usage numbers

On 2014-11-14, Grant Edwards <grant.b.edwards at gmail.com> wrote:

> 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?

The short answer is that the values shown by top are almost completely
useless in this scenario.  There isn't anything top can do about it,
since the limitation is in the data gathered by the kernel itself.
What may be surprising (until you think about it for a few seconds),
is that running a single clock-driven app can completely throw off the
values shown for "normal" programs.

A low-priority idle program can be used to determine how much idle CPU
time is available, but determining who is using how much seems to be
limited to watching the idle program output change as you start/stop
programs about which you want info.

-- 
Grant Edwards               grant.b.edwards        Yow! Here I am in 53
                                  at               B.C. and all I want is a
                              gmail.com            dill pickle!!

_______________________________________________
busybox mailing list
busybox at busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list