From owner-freebsd-hackers Thu May 2 15:53:23 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 86C4D37B404 for ; Thu, 2 May 2002 15:53:17 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 2 May 2002 23:53:16 +0100 (BST) To: Jason Borkowsky Cc: hackers@freebsd.org Subject: Re: CPU context switching/load numbers In-Reply-To: Your message of "Thu, 02 May 2002 17:53:31 EDT." Date: Thu, 02 May 2002 23:53:15 +0100 From: Ian Dowse Message-ID: <200205022353.aa71204@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Jason Borkowsky writes: >1. How is it my load average is over 1, but my single CPU is 85% idle? This is quite possible due to process synchronisation, since there is no direct relationship between the load average and the percentage of time that the CPU is idle. The load average is a measure of the average number of processes that are in the "runnable" state, but obviously on a single-CPU machine, only one of them can actually be running at a time. As an example, consider the case where 2 processes are each "runnable" 50% of the time, but the times are synchronised. Half of the time there are 2 runnable processes, and the other half of the time there are no runnable processes. The load average will be 1.0 since the average number of runnable processes is 1, but there are no processes running half of the time, so the CPU is 50% idle. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message