From owner-freebsd-current@FreeBSD.ORG Tue Jul 8 11:41:47 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B07337B401; Tue, 8 Jul 2003 11:41:47 -0700 (PDT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0FF243F3F; Tue, 8 Jul 2003 11:41:46 -0700 (PDT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 9EF2672FE3; Tue, 8 Jul 2003 11:41:46 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 918C072FDC; Tue, 8 Jul 2003 11:41:46 -0700 (PDT) Date: Tue, 8 Jul 2003 11:41:46 -0700 (PDT) From: Doug White To: Andy Farkas In-Reply-To: <20030708215553.F8850-100000@hewey.af.speednet.com.au> Message-ID: <20030708113618.P25140@carver.gumbysoft.com> References: <20030708215553.F8850-100000@hewey.af.speednet.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Dan Nelson cc: freebsd-smp@freebsd.org cc: freebsd-current@freebsd.org Subject: Re: whats going on with the scheduler? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2003 18:41:47 -0000 On Tue, 8 Jul 2003, Andy Farkas wrote: > Any other ideas? Why would 3 (niced) cpu intensive processes suddenly get > reduced cpu time (on a 4 cpu system) when a 4th non-resource intensive > process gets started? Hm.. guess its time to explain how nice works again. Nice is a relative value. If you have 2 processes in a system, one with a lower nice value (== higher "priority") than the other, the lower-niced process will be scheduled in deference to the higher-niced process. The scheduler attempts to ensure that niced processes are not starved. (In practice, nice level 20 gets some special treatment.) If you don't want higher-niced processes to get their cpu time reduced when a lower-niced process starts doing work, then don't nice them. I'm sure Terry will pick this to death, buut you get the idea. I think the daemon book explains this better than I could (and with infinitely more detail). -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org