From owner-freebsd-questions Mon Feb 4 10:23:19 2002 Delivered-To: freebsd-questions@freebsd.org Received: from root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id 134BD37B494 for ; Mon, 4 Feb 2002 10:22:07 -0800 (PST) Received: (from dg@localhost) by root.com (8.11.2/8.11.2) id g14I8EW13377; Mon, 4 Feb 2002 10:08:14 -0800 (PST) (envelope-from dg) Date: Mon, 4 Feb 2002 10:08:14 -0800 From: David Greenman To: Yusuf Goolamabbas Cc: freebsd-questions@freebsd.org Subject: Re: Does loadavg on FreeBSD reflect processes in disk-wait state Message-ID: <20020204100814.A13265@nexus.root.com> References: <20020204170600.GA11513@outblaze.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020204170600.GA11513@outblaze.com>; from yusufg@outblaze.com on Tue, Feb 05, 2002 at 01:06:00AM +0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >I groked a bit around 4.5-RELEASE source [sys/kern/kern_synch.c, >sys/vm/vm_meter.c] , also >http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/vm/vm_meter.c > >MFC: 1.59; Remove the SSLEEP case from the load average computation, >since it has been a no-op for as long as our CVS history goes back. > >and from my very limited understanding felt that FreeBSD only looked at >process in the runnable state as part of load average calculation. Linux >seems to us nr(running_process) + nr(process blocked in disk-wait) >whilst calculating loadavg > >However, this posting by David Greenman seems to indicate otherwise. I >may have missed something obvious and would appreciate any insight as to >what I might have missed > >http://docs.freebsd.org/cgi/getmsg.cgi?fetch=264208+0+archive/2000/freebsd-current/20000409.freebsd-current The answer is no, FreeBSD no longer includes short term sleeps in the load average. I'm not sure at what point the behavior of p_slptime changed that ultimately resulted in the SSLEEP case being ineffective and later removed. I suspect that loadav() and schedcpu() were once uncoupled (called at different relative times), and thus would have behaved differently with respect to p_slptime(). -DG David Greenman Co-founder, The FreeBSD Project - http://www.freebsd.org President, TeraSolutions, Inc. - http://www.terasolutions.com President, Download Technologies, Inc. - http://www.downloadtech.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message