Subject: Re: Load average calucation under NetBSD 2.0_BETA
To: Matthias Scheler <>
From: Johnny Billquist <>
List: netbsd-users
Date: 06/09/2004 12:54:13
On Wed, 9 Jun 2004, Matthias Scheler wrote:

> In article <>,
> 	Ignatios Souvatzis <> writes:
> > Does your system have a seperate, mistuned statistics clock interupt?
> I'm not running any kind of load monitor except "top" if that's what you
> are asking for.

No. The statistics (for CPU idle, system, nice and so on) is gathered at
clock interrupts. This can be a separate statistics clock (which is
probably best), or by the normal clock interrupt. In unfortunate
circumstances, the CPU statistics might show "funny" values if sampled by
the normal system clock interrupt, since this will occur att times that
might be somewhat synchronized with other events in the system.
Also, the load numbers are also calculated at these interrupts (if I
remember correctly).

So, your 99% idle might not be entirely true.

Please note, however, that the load average is an average on the run queue
length, and is not related to the CPU activity state. Unless my memory
fails me, short waits for I/O (such as pagefaults and other disk
operations) means the CPU will be idle, but you will have the process in
the run queue. Thus, you might have high idle, and high load.


Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email:           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol