Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 1999 22:00:46 +1000
From:      Greg Black <gjb@comkey.com.au>
To:        Andrew Johns <A_Johns@TurnAround.com.au>
Cc:        Thomas Schuerger <schuerge@wurzelausix.CS.Uni-SB.DE>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Scheduling bug? 
Message-ID:  <19990311120046.23069.qmail@alpha.comkey.com.au>
In-Reply-To: <36E5B961.2D539114@TurnAround.com.au>  of Wed, 10 Mar 1999 11:14:25 %2B1100
References:  <199903090923.KAA18794@wurzelausix.cs.uni-sb.de> <36E5B961.2D539114@TurnAround.com.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
[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 <gjb@acm.org>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990311120046.23069.qmail>