Subject: Re: Nice and not so nice
To: Gunnar Helliesen <gunnar@bitcon.no>
From: Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: port-i386
Date: 08/20/1999 11:47:06
On Fri, Aug 20, 1999 at 07:37:40AM +0200, Gunnar Helliesen wrote:
> Even if I run the SETI@home client at max nice (20) it still grabs more
> CPU than it should. According to the manpage for renice(8) a process at
> nice level 20 should only run "when nothing else in the system wants
> to".
> 
> However, I see this using top(1) to monitor CPU usage:

> load averages:  2.48,  1.86,  1.51                              07:10:16
> 71 processes:  3 running, 67 sleeping, 1 zombie
> CPU states:  0.5% user, 99.0% nice,  0.5% system,  0.0% interrupt,  0.0%
> idle
> Memory: 132M Act 5752K Inact 37M Wired 326M Free 8K Swap K Swap free 
> 
>   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
> 22284 seti     105   20    13M   14M run     1:27 43.56% 43.55%
> setiathome
> 15164 root     105    5    76M   76M run   110:21 43.16% 43.16% htdig
I notice the same on current (1.4J):

With nice=0 for the dhry2 run everything is ok:

  PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
 2838 thilo     64    0   168K  280K run     4:24 97.75% 97.75% dry2
  362 thilo     68   20    13M   14M run   668:48  0.00%  0.00% setiathome

When I renice it to 5, seti starts eating cycles:

  PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
 2838 thilo     74    5   168K  280K run     5:25 91.26% 91.26% dry2
  362 thilo     79   20    13M   14M run   668:51  6.88%  6.88% setiathome

The manpage should be corrected to something like:
"when nothing else in the system with nice<=0 wants to"
Or the scheduler needs a fix. IMHO you should send-pr(1) this.
-- 
Dies ist Thilos Unix Signature! Viel Spass damit.