From owner-freebsd-current Mon Apr 3 17:55:51 2000 Delivered-To: freebsd-current@freebsd.org Received: from lamb.sas.com (lamb.sas.com [192.35.83.8]) by hub.freebsd.org (Postfix) with ESMTP id 7AEC137B545 for ; Mon, 3 Apr 2000 17:55:37 -0700 (PDT) (envelope-from brdean@unx.sas.com) Received: from mozart (mozart.unx.sas.com [149.173.6.8]) by lamb.sas.com (8.9.3/8.9.1) with SMTP id UAA21960; Mon, 3 Apr 2000 20:52:03 -0400 (EDT) Received: from dean.pc.sas.com by mozart (5.65c/SAS/Domains/5-6-90) id AA05915; Mon, 3 Apr 2000 20:51:32 -0400 Received: (from brdean@localhost) by dean.pc.sas.com (8.9.3/8.9.1) id UAA06845; Mon, 3 Apr 2000 20:51:32 -0400 (EDT) (envelope-from brdean) From: Brian Dean Message-Id: <200004040051.UAA06845@dean.pc.sas.com> Subject: Re: Load average calculation? In-Reply-To: <38E8FE5B.CD2FD3E6@cvzoom.net> from Donn Miller at "Apr 3, 2000 04:26:03 pm" To: Donn Miller , Patrick Mau Date: Mon, 3 Apr 2000 20:51:32 -0400 (EDT) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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