Re: starting the annual discussion regarding top(1)'s CPU usage statistics

From: John Baldwin <jhb_at_freebsd.org>
Date: Thu, 29 Dec 2011 09:47:56 -0500
On Sunday, December 25, 2011 4:40:33 pm Alexander Best wrote:
> ok...so we all know that top(1) cannot compute the exact CPU usage for all
> processes, since some processes get spawned and exit so fast that they don't
> fall into the calculation range. i think nobody is getting angry when top(1)
> is off by a few percent.
> 
> however please take a look at the following top(1) output. this is just
> ridiculous! out of 800% of CPU power, almost 600% mysteriously vanished. is
> there really nothing to improve top(1)'s behaviour when the CPU is dealing with
> a lot of short processes (time wise) with a hugh CPU burst?

Do you have a lot of short-lived processes?  (For example, a -j X build?)

top(1) can't do anything about processes it doesn't see (since they are so
short-lived and it only samples every N seconds), but those processes still
accumulate CPU time and %CPU.

-- 
John Baldwin
Received on Thu Dec 29 2011 - 14:31:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:22 UTC