Re: Nice 19 process still gets some CPU

From: Kurt Garloff
Date: Tue Jun 29 2004 - 11:59:06 EST


Hi Con, Timothy,

On Tue, Jun 29, 2004 at 01:04:22AM +1000, Con Kolivas wrote:
> Timothy wrote:
> | I would expect that nice 0 processes should get SO MUCH more than nice
> | 19 processes that the nice 19 process would practically starve (and in
> | the case of a nice 19 process, I think starvation by nice 0 processes is
> | just fine), but it looks like it's not starving.
> |
> | Why is that?
>
> It definitely should _not_ starve. That is the unixy way of doing
> things. Everything must go forward. Around 5% cpu for nice 19 sounds
> just right. If you want scheduling only when there's spare cpu cycles
> you need a sched batch(idle) implementation.

5% seems a bit much for many people and they'd rather like to see 0%,
but given that we need to make progress, it could be tuned to ~1%.

Note that whenever the compiler will need to wait for the disk (page in
binary code, swapping, reading headers), the nice process will get to
run, so in practice the compiler does lose less than it seems at first
sight. If the nice process weren't, you'd see a certain percentage of
I/O wait ...

Regards,
--
Kurt Garloff <garloff@xxxxxxx> Cologne, DE
SUSE LINUX AG / Novell, Nuernberg, DE Director SUSE Labs

Attachment: pgp00000.pgp
Description: PGP signature