Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Mar 1998 22:06:15 -0800 (PST)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        Hrvoje Husic <H.Husic@Uni-Koeln.DE>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Bug in the process-scheduler & niceness of 20?
Message-ID:  <Pine.BSF.3.96.980305220304.24994M-100000@gdi.uoregon.edu>
In-Reply-To: <Version.32.19980304144320.00f45e10@mail.rrz.uni-koeln.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980305220304.24994M-100000>