From owner-freebsd-questions@FreeBSD.ORG Sun May 24 13:15:15 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08C061065677 for ; Sun, 24 May 2009 13:15:14 +0000 (UTC) (envelope-from bennett@cs.niu.edu) Received: from mp.cs.niu.edu (mp.cs.niu.edu [131.156.145.41]) by mx1.freebsd.org (Postfix) with ESMTP id 419688FC30 for ; Sun, 24 May 2009 13:15:14 +0000 (UTC) (envelope-from bennett@cs.niu.edu) Received: from mp.cs.niu.edu (bennett@localhost [127.0.0.1]) by mp.cs.niu.edu (8.14.3/8.14.3) with ESMTP id n4ODFBEq007803; Sun, 24 May 2009 08:15:11 -0500 (CDT) Date: Sun, 24 May 2009 08:15:11 -0500 (CDT) From: Scott Bennett Message-Id: <200905241315.n4ODFB96007801@mp.cs.niu.edu> To: freebsd-questions@freebsd.org, Wojciech Puchar Cc: Yuri Subject: Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5% X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 13:15:15 -0000 On Sun, 24 May 2009 11:57:08 +0200 (CEST) Wojciech Puchar 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 * **********************************************************************