From owner-freebsd-questions Mon Mar 8 15:37: 6 1999 Delivered-To: freebsd-questions@freebsd.org Received: from uni-sb.de (uni-sb.de [134.96.252.33]) by hub.freebsd.org (Postfix) with ESMTP id B7EA814EC1 for ; Mon, 8 Mar 1999 15:36:58 -0800 (PST) (envelope-from schuerge@wurzelausix.CS.Uni-SB.DE) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31]) by uni-sb.de (8.9.3/1999020800) with ESMTP id AAA26433 for ; Tue, 9 Mar 1999 00:36:39 +0100 (CET) Received: from wurzelausix.cs.uni-sb.de (wurzelausix.cs.uni-sb.de [134.96.247.1]) by cs.uni-sb.de (8.9.3/1999020800) with ESMTP id AAA21628 for ; Tue, 9 Mar 1999 00:36:38 +0100 (CET) Received: (from schuerge@localhost) by wurzelausix.cs.uni-sb.de (8.9.1/wjp/19980821) id AAA13791 for freebsd-questions@freebsd.org; Tue, 9 Mar 1999 00:36:38 +0100 (CET) From: Thomas Schuerger Message-Id: <199903082336.AAA13791@wurzelausix.cs.uni-sb.de> Subject: Scheduling bug To: freebsd-questions@freebsd.org Date: Tue, 9 Mar 1999 00:36:37 +0100 (CET) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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