Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 1999 00:36:37 +0100 (CET)
From:      Thomas Schuerger <schuerge@wurzelausix.CS.Uni-SB.DE>
To:        freebsd-questions@freebsd.org
Subject:   Scheduling bug
Message-ID:  <199903082336.AAA13791@wurzelausix.cs.uni-sb.de>

next in thread | raw e-mail | index | archive | help
Hi!
 
I am not really satisfied with the scheduling (time-slicing) used in FreeBSD. 

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.

This behaviour is rather strange. It means that if having a long-running process
in the background (nice-level 19), any CPU-intensive foreground process will run
with at most 2/3 of the possible speed.

I have tried the same on Linux, which gives the second process about 9% of the
CPU-time and therefore resulting in a 10:1 slicing, which I find much more
promising. Solaris resulted in a 7:1 time-slicing.


Is there anything that can be done to make renicing a process to high values
more effective? I would like to see the slicing factors drop off e.g.
exponentially with the nice-level used, so that renicing to 19 has a huge effect and
really makes such processes run in the background, giving a lot more CPU-time to
foreground processes if needed.

Is there a kernel option that affects this?


Ciao,
Thomas.

P.S.: I'm using FreeBSD 4.0-Current, but it was the same on 3.0-Release.



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?199903082336.AAA13791>