From owner-freebsd-questions Thu Mar 5 22:06:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA05270 for freebsd-questions-outgoing; Thu, 5 Mar 1998 22:06:33 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA05264 for ; Thu, 5 Mar 1998 22:06:25 -0800 (PST) (envelope-from dwhite@gdi.uoregon.edu) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.7/8.8.8) with SMTP id WAA25108; Thu, 5 Mar 1998 22:06:15 -0800 (PST) (envelope-from dwhite@gdi.uoregon.edu) Date: Thu, 5 Mar 1998 22:06:15 -0800 (PST) From: Doug White Reply-To: Doug White To: Hrvoje Husic cc: questions@FreeBSD.ORG Subject: Re: Bug in the process-scheduler & niceness of 20? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 4 Mar 1998, Hrvoje Husic wrote: > The FreeBSD scheduler does not seem to respect the niceness 20 of a process. > > -----[snip]----------------------------------------------------------------- > last pid: 4601; load averages: 1.91, 1.86, 1.57 00:58:47 > 37 processes: 3 running, 34 sleeping > CPU states: 49.8% user, 46.7% nice, 3.5% system, 0.0% interrupt, 0.0% idle > Mem: 22M Active, 7288K Inact, 15M Wired, 17M Cache, 7654K Buf, 532K Free > Swap: 138M Total, 121M Used, 17M Free, 88% Inuse > > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND > 203 hhusic 105 20 860K 340K RUN 2519.7 49.17% 49.17% rc564 > 4595 hhusic 104 0 556K 416K RUN 3:06 47.76% 47.76% gzip > -----------------------------------------------------------------[snap]----- > > As to my understanding, a niceness of 20 on BSD systems is supposed to set > a process to some kind of "idle"-priority, leaving any potentially needed > CPU-cycle to other applications. Not entirely. If you want to set idle priority, run `idprio -203'. With niceness 20, the application will not be scheduled often, but will be scheduled. In idle priority, it will only be scheduled if there are no ready processes to schedule, eg the system is idle. My rc564 (my rc5des didn't die like everyone else's) is chugging along fine. last pid: 25103; load averages: 1.09, 1.04, 1.01 22:04:41 64 processes: 2 running, 62 sleeping CPU states: 2.3% user, 94.7% nice, 1.9% system, 1.1% interrupt, 0.0% idle Mem: 12M Active, 3964K Inact, 15M Wired, 4132K Cache, 4540K Buf, 2268K Free Swap: 100M Total, 32M Used, 68M Free, 32% Inuse PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 286 dwhite 105 19 804K 280K RUN 496.0H 96.02% 96.02% rc5des Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message