From owner-freebsd-questions Thu Mar 11 4: 2:38 1999 Delivered-To: freebsd-questions@freebsd.org Received: from alpha.comkey.com.au (alpha.comkey.com.au [203.9.152.215]) by hub.freebsd.org (Postfix) with SMTP id DB5061529D for ; Thu, 11 Mar 1999 04:02:30 -0800 (PST) (envelope-from gjb@comkey.com.au) Received: (qmail 23070 invoked by uid 1001); 11 Mar 1999 12:00:46 -0000 Message-ID: <19990311120046.23069.qmail@alpha.comkey.com.au> X-Posted-By: GBA-Post 1.04 06-Feb-1999 X-PGP-Fingerprint: 5A91 6942 8CEA 9DAB B95B C249 1CE1 493B 2B5A CE30 Date: Thu, 11 Mar 1999 22:00:46 +1000 From: Greg Black To: Andrew Johns Cc: Thomas Schuerger , freebsd-questions@FreeBSD.ORG Subject: Re: Scheduling bug? References: <199903090923.KAA18794@wurzelausix.cs.uni-sb.de> <36E5B961.2D539114@TurnAround.com.au> In-reply-to: <36E5B961.2D539114@TurnAround.com.au> of Wed, 10 Mar 1999 11:14:25 +1100 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [Reformatted for legibility.] > > When having two processes running, one with nice-level 0, > > the other one with nice-level 19 and both consuming as much > > CPU time as possible (e.g. an endless loop), FreeBSD will do > > a 2:1 time-slicing (that is, the first process will get 66% > > of the CPU-time and the other one 33%). For a test, just > > start two Perl processes doing a "while(1) {}", renice one > > of the processes to 19 and watch the "top" output. [...] > It's impossible given the test that you created to accurately > _measure_ this difference, as you're relying on an interpreted > (perl) loop - I'd be interested to see the same results with an > executable that was looping - so as to remove the layer of the > interpreter. The real point is that top is a useless tool when it comes to this kind of comparisons. You're just as likely seeing variations in the performance of top, as learning anything about the actual time slices. FreeBSD may suck in this area, but you'd have to do some proper testing to find out. This means writing some code that does useful work (never busy loops) and measuring the amount of work that gets done. It's harder than it sounds. -- Greg Black To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message