load=1, cpu 98% idle

Eric Eisenhart eric at eisenhart.com
Fri Jan 11 18:07:39 PST 2002


On Fri, Jan 11, 2002 at 04:28:32PM -0800, E Frank Ball wrote:
> Now and then one of my linux boxes gets it's load stuck at 1 and the box
> isn't doing anything.  The CPU is idle.  As you can see from this "top"
> output, top is about the only thing using cpu time:

[snip; top output: mostly idle, two stat R, some sleeping processes]

> Why does it do this?  The machine is responsive, it doesn't act like the
> load is 1.  It will stay this way until I reboot it.  It's not a big
> problem, it just doesn't seem right.  Doesn't a load=1 mean the cpu is
> at 100% by definition?

Last question first: no.

Load average is defined as the average of how many processes are running or
waiting to run.  "Waiting to run" includes ones that want CPU and can't get
it and ones that are waiting on I/O.

Chances are if you look around with top (I think 'i' might help you) or ps
aux, you'll find that you have a process with a STAT of 'D', meaning
"uninterruptible sleep", which usually means "blocked on I/O".  For
instance, with the SCSI tape drives I've used before running the command to
erase the tape bumps the load up to 1 because the computer is waiting for
the scsi tape driver to come back with "okay, did that".

If there's a 'D' process that shouldn't be running and you can't kill, then
you might need to worry; otherwise a high load average doesn't necessarily
mean that everything's going to be slow, it can just mean that one specific
process is really slow.  Network I/O can cause the same thing.
-- 
    Eric Eisenhart   Freedom is slavery.      http://eric.eisenhart.com/
 ^  ICQ#: 48217244   Ignorance is strength.   eric-dot-sig at eisenhart.com
/e\ Perl&SQL Coder   War is peace.            IRC Nicks: Falsch Freiheit
---                        -- George Orwell



More information about the talk mailing list