`nice' issues

Darrell Kindred (dkindred@cmu.edu)
Fri, 23 May 1997 14:13:32 -0400


Chris Schleicher writes:
> I'd especially like info pertaining to IRIX. I've had no trouble with
> the Solaris client, but the IRIX client has been somewhat more reluctant
> to relinquish the CPU at times...

I'm not intimately familiar with IRIX, but I've done a bit
of investigating for running deschall on IRIX machines here
at CMU. On IRIX machines, we currently run deschall like
this:

npri -h 150 deschall keymaster.verser.frii.com

My understanding is that this puts gives deschall a fixed
priority level of 150, which means that it will *never*
use CPU when a normal interactive process needs the CPU.
This is better than you can do with the usual 'nice'
command.

> >It ONLY gets 60% of the cpu when there is 60% LEFT OVER after everything
> >else has got its share [...]
>
> I assume this is supposed to be true of nice()'s everywhere?

That's not entirely true. In most Unix variants, the
maximum `niceness' level is 19. You can usually get this
by running

/usr/bin/nice -n 19 deschall keymaster.verser.frii.com

or

/usr/bin/nice -19 deschall keymaster.verser.frii.com

(Be warned that if you just use "nice" rather than
"/usr/bin/nice" you may get your shell's builtin nice
command, which may have a different syntax. In particular,
the csh/tcsh builtin nice will do the wrong thing if you
say "-19".)

At niceness-level 19, if deschall is competing for CPU with
a single normal-priority process, most Unix variants will
give about 5% of the CPU to deschall and 95% to the
normal-priority process. If there is more than one other
cpu-bound process, deschall will get even less.

- Darrell