Subject: Re: high load average
To: None <>
From: Bill Sommerfeld <>
List: current-users
Date: 08/25/2000 19:50:37
Load average is computed by statistical sampling once every five
seconds by a callout routine; see sys/uvm/uvm_meter.c:uvm_loadav() and
sys/kern/kern_synch.c:schedcpu().  Processes which are running (state
SONPROC), runnable but not on a processor (SRUN), newly created
(SIDL), and involved in short-duration uninterruptable sleeps
(typically waiting for disk I/O completion and similar events) each
count as 1.0 points of load.

The BSD scheduler dynamically penalizes cpu hogs; processes which are
caught running too much accumulate a penalty value which increases
their priority value (lower priorities run first).  The load average
determines how quickly this penalty decays over time.

Since it involves a snapshot taken only once every 5 seconds, load
average is an extremely crude indication of system performance and/or
system load; the other statistics presented by systat and top (e.g.,
%cpu utilization, disk i/o statistics, paging statistics, etc.,) are
much more credible indicators that something's "right" or "wrong" with
a system.

						- Bill