Subject: Nice and not so nice
To: 'port-i386@netbsd.org' <port-i386@netbsd.org>
From: Gunnar Helliesen <gunnar@bitcon.no>
List: port-i386
Date: 08/20/1999 07:37:40
This is on NetBSD/i386 1.3.2, if it matters:
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
If I kill the setiathome process the picture looks like this:
load averages: 1.21, 1.53, 1.49 07:16:33
65 processes: 2 running, 62 sleeping, 1 zombie
CPU states: 0.0% user, 90.1% nice, 2.0% system, 0.0% interrupt, 7.9%
idle
Memory: 114M Act 5936K Inact 37M Wired 344M Free 8K Swap K Swap free
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
15164 root 102 5 76M 76M run 114:42 89.21% 89.21% htdig
So obviously the htdig process "wants to run". I run htdig at nice level
5 to give processes like sendmail and httpd priority, when needed.
What I want to do is to run SETI@home but make sure that htdig gets all
the CPU it needs while it runs, still allowing other processes at "base"
nice level (0) priority over both.
Gunnar
--
Gunnar Helliesen | Bergen IT Consult AS | NetBSD/VAX on a uVAX II
Systems Consultant | Bergen, Norway | '86 Jaguar Sovereign 4.2
gunnar@bitcon.no | http://www.bitcon.no/ | '73 Mercedes 280 (240D)