Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 May 2002 23:53:15 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        Jason Borkowsky <jcborkow@tcpns.com>
Cc:        hackers@freebsd.org
Subject:   Re: CPU context switching/load numbers 
Message-ID:   <200205022353.aa71204@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Thu, 02 May 2002 17:53:31 EDT." <Pine.BSF.4.44.0205021530360.72136-100000@bemused.tcpns.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.44.0205021530360.72136-100000@bemused.tcpns.com>, 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




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