[mythtv-users] how to interpret loadaverage on mythtv backendstatus page

Dave Sherohman esper at sherohman.org
Tue Oct 4 15:41:16 UTC 2005

On Tue, Oct 04, 2005 at 10:43:59AM +0200, Nick Rosier wrote:
> On 04/10/05, anders smith <4nders at gmail.com> wrote:
> > how do I interpret loadaverage on mythtv backendstatus page or when running
> > top?
> >  I usually get numbers around 4, but is that good or bad (when grabbing and
> > inserting it runs up to 6)?
> Adrian Cockcroft's definition:  The load average is the sum of the run
> queue length and the number of jobs currently running on the CPUs.

I would phrase it as "the average number of processes that are ready
to run", just to avoid having to explain run queues, but basically
the same meaning.

> So the general rule could be: load = 2 x number of cpu's means the
> system is nicely charged. Higher means there are more jobs waiting to
> be run (so you lack a bit CPU power). If you get spikes that's ok but
> if your load is constantly 4 it would seem your system is lacking CPU
> power.

This is incorrect.  It is commonly assumed that load average = CPU
utilization, but it just ain't so.  Processes can be held up for
reasons other tha because they're waiting for CPU time; in my
experience, the most common cause of a high load average is because
things are waiting on I/O, whether that means for a file to be read
from disk, a slow (or nonresponsive) network drive, or for swap
activity.  I've seen systems with load averages of 20, 30,
occasionally even 60(!) while CPU utilization was under 10% when
they've either had an NFS server disappear on them or they've run out
of memory.  (Simple proof:  Open an xterm and start up `top` to watch
CPU utilization and load average.  Open a second xterm (or your
favorite GUI app) and start ripping a CD.  Watch your load average go
up by one while CPU utilization remains constant because the CD
ripper is constantly waiting for data from the CD drive, but hardly
touching the CPU at all.)

Bottom line, though, is that if your system is adequately responsive,
then you don't really need to worry about a high load average.  If
there are problems (or if you're just curious about why it's that
high...), then the above should give you some ideas on what to look

The freedoms that we enjoy presently are the most important victories of the
White Hats over the past several millennia, and it is vitally important that
we don't give them up now, only because we are frightened.
  - Eolake Stobblehouse (http://stobblehouse.com/text/battle.html)

More information about the mythtv-users mailing list