From owner-freebsd-hackers Wed May 27 09:36:30 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA04892 for freebsd-hackers-outgoing; Wed, 27 May 1998 09:36:30 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from att.com (kcgw1.att.com [192.128.133.151]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id JAA04837 for ; Wed, 27 May 1998 09:36:13 -0700 (PDT) (envelope-from sbabkin@dcn.att.com) From: sbabkin@dcn.att.com Received: by kcgw1.att.com; Wed May 27 11:36 CDT 1998 Received: from dcn71.dcn.att.com ([135.44.192.112]) by kcig1.att.att.com (AT&T/GW-1.0) with ESMTP id LAA22903 for ; Wed, 27 May 1998 11:35:51 -0500 (CDT) Received: by dcn71.dcn.att.com with Internet Mail Service (5.0.1458.49) id ; Wed, 27 May 1998 12:35:44 -0400 Message-ID: To: danj@3skel.com, freebsd-hackers@FreeBSD.ORG, dnelson@emsphone.com Subject: RE: Load avg 0.33 and 99.2% idle... Date: Wed, 27 May 1998 12:35:41 -0400 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > ---------- > From: Dan Nelson[SMTP:dnelson@emsphone.com] > Sent: Wednesday, May 27, 1998 10:49 AM > To: Dan Janowski; freebsd-hackers@freebsd.org > Subject: Re: Load avg 0.33 and 99.2% idle... > > In the last episode (May 27), Dan Janowski said: > > > > Load avg 0.33 and 99.2% idle, how can this be? > > > > FreeBSD 2.2.6 > > Load average just means "the number of processes in the run queue". > If > you have code that sits in a select() loop most of the time, it'll be > in the run queue almost all of the time, but probably not eat much > CPU. > I've got some Quake servers running on my machine, and if one person > joins each of the four servers, my loadavg jumps to 4. But the CPU > used doesn't go over 10%. > It sounds weird to me. The program doing select() sleeps like any others and do not reside in the run queue. But, on the other hand, the load computations are based on sampling on timer interrupts, so if some program is activated on time intervals, like select() with timeout, the timer interrupt will encounter longer run queue because itself had woken up these processes and placed them into the run queue right before computing the load. I think this explanation is closer to reality. That raises an interesting issue: should the load computation use the average of run queue length before and after waking up the time-awaiting processes ? -Serge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message