[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: load averages.

Quoting Adam Gurno (abg_(_at_)_norlug_(_dot_)_org):
> On Fri, May 07, 2004 at 12:25:24PM +0200, David Moron tapped out:
> > The command top print on the first line "the  three load averages" but 
> > man does not explain what are these load averages.
> > Perhaps CPU, MEM, and LAN? or SWAP?
> I *think* that the load is calculated as 
> 1/(1-n)    where n is the average processor usage as a percent.

> A load of 2 means 50% utilization?  

> >From my last job working with an AIX box:
> 01:48PM   up 3 days,   8:38,  136 users,  load average: 15.79, 16.50, 15.03

Different OSs calculate it differently.
It's the number of jobs waiting in the Run Queue.  Averaged over
1/5/15 minutes.  On BSD (and Sun) its the total number.  On other
unixes, it's per processor (so 4 jobs beating on a 4CPU machine
would give you an LA of 1).

It's certainly not a number you want to make decisions on without
digging; it's a thumb held up to the wind.

As the GirlF fends off the annoying DBAs who run up and say they
need more CPUs...  Why? 
"It's a 12 CPU machine and the load average in 11.5!!  Quick, add more CPU."

2 months later, as she'd replaced the crap RAID boxes and removed
the boot disk software mirroring, the load was < 7.  "can I take
out some of the CPUs now?"

I've also have a machine handling *lots* of POP over NFS where the
NFS server ate it.  "uptime" eventually came back (after several
minutes) with an LA of 1800.  Clearly, the CPU wasn't that busy.

A high LA can indicated that it's just busy.  Depending, it can be
reduced with faster disks, more RAM, better choice of cards (ie.
replace cheap network card with no buffer that beats on the CPU
with interrupts).

Visit your host, monkey.org