Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2009 08:15:11 -0500 (CDT)
From:      Scott Bennett <bennett@cs.niu.edu>
To:        freebsd-questions@freebsd.org, Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
Cc:        Yuri <yuri@rawbw.com>
Subject:   Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%
Message-ID:  <200905241315.n4ODFB96007801@mp.cs.niu.edu>

next in thread | raw e-mail | index | archive | help
     On Sun, 24 May 2009 11:57:08 +0200 (CEST) Wojciech Puchar
<wojtek@wojtek.tensor.gdynia.pl> wrote without proper attribution:
>> Look below: load over 7 and no processes take much CPU.
>
>load average is NOT sum of CPU loads.
>
>for example program reading constantly from HDD and using no CPU will add 
>1 to load average.
>
>other things like net I/O etc. are calculated too. i can't explain you 
>exactly how because i don't know precisely.
>
>but load average is total load not just CPU load
>
     From the glossary (p. 630) of _The_Design_and_Implementation_of_the
_FreeBSD_Operating_System_ by McKusick and Neville-Neil:

	load average  A measure of CPU load on the system.  The load average
		in FreeBSD is an average of the number of processes ready to
		run or waiting for short-term events such as disk I/O to
		complete, as sampled once per second over the previous one-
		minute interval of system operation.

In the same volume in the discussion of "Calculations of Thread Priority" by
the 4.4 BSD scheduler (p. 101), it says,

	"... the *load* is a sampled average of the sum of the lengths of the
	run queue and of the short-term sleep queue over the previous 1-minute
	interval of system operation."

Seems pretty straightforward to me.

                                  Scott Bennett, Comm. ASMELG, CFIAG
**********************************************************************
* Internet:       bennett at cs.niu.edu                              *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *
**********************************************************************



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905241315.n4ODFB96007801>