Date: Mon, 3 Apr 2000 20:51:32 -0400 (EDT) From: Brian Dean <brdean@unx.sas.com> To: Donn Miller <dmmiller@cvzoom.net>, Patrick Mau <patrick@oscar.prima.de> Cc: current@FreeBSD.ORG Subject: Re: Load average calculation? Message-ID: <200004040051.UAA06845@dean.pc.sas.com> In-Reply-To: <38E8FE5B.CD2FD3E6@cvzoom.net> from Donn Miller at "Apr 3, 2000 04:26:03 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Donn Miller wrote: > Patrick Mau wrote: > > On all Unix-like systems I know, the load average is the average mumber > > of processes running during a given time interval. I can't see what use > > it may have to count load for _waiting_ processes. > > > > I/O load is not process load, if a process waits for I/O completion it does > > not use up its timeslice. > > I think we ought to re-examine the definition of load average. By > load, we mean an actual load on the cpu, and waiting processes aren't > really exerting a cpu load. So, by that reasoning I say waiting > processes don't count. In this case, the "waiting" refers to the processes waiting in the _run_ queue, i.e., if the system wasn't so busy, they'd be running more often instead of waiting. In a uniprocessor system, only one process can be running at a time. When that currently running process is swapped away from the cpu, another process from the run queue is selected to run (which is actually an array of queues, lower indexes meaning higher priority). Load average is the average number of processes that are runnable, i.e., sitting in the run queue, over a certain period of time, usually computed for the most recent 1 minute, 5 minute, and 15 minute intervals. I think you guys are mixing up I/O wait with the run queue. The processes are indeed waiting, but they are waiting for a chance to get the CPU, not for someone to press a key on the keyboard or some other external event, without which, the process could not correctly continue until that event occurs. There is a _huge_ difference between the two. And yes, it is a pretty good, simple indicator of system load, and that is all it is really meant to be. If you need something fancier, or more specific to a particular load type, you'd need to roll your own using the abundant statistics that the kernel keeps and makes available. -Brian -- Brian Dean brdean@unx.sas.com SAS Institute Inc. bsd@FreeBSD.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004040051.UAA06845>