[RC5] If you were writing our next client...

John Campbell jcampbel at lynn.ci-n.com
Sun May 2 13:59:42 EDT 1999

On Fri, 30 Apr 1999, Richard J. Straka wrote:
> This should not really be necessary, but the client is designed to run
> flat out, while most other applications are not. Even a good scheduler
> in the OS cannot "do the right thing" when you're trying to compile code
> and run the client simultaneously. It would try to give both
> CPU-intensive applications 50% each (roughly). You really want the
> client to take a rest under those conditions - independent of the OS' scheduler.
	Actually, I can tell you from experience that the OS -does- do the
right thing in this situation. (Linux does, anyway... YMMV, especially if
you're using a Windows or Mac system.) This is what priorities are for. The
client runs at the nicest setting there is. The compiler, presumably, runs
at the normal 0 niceness. This means that when the compiler wants CPU
cycles, the OS gives them to it, in preference to the client. The client
still gets a few here and there, but not many.

	I have a 386DX-40 that I test new Linux kernels on before upgrading
my more important machines. This means that it compiles a lot of kernels.
Because it's so slow, I've experimented quite a bit to see how to minimize
the time it takes. One of the things I've tried was shutting the client down
before I started the compile. With the client shut off, it takes the machine
between 3:45 and 4 hours to build a 2.2 kernel. With the client running, it
takes it between 4 hours and 4:15. So the client, on average, is getting 15
minutes of CPU time over a four hour compile. That's nothing like a 50/50
split, more like 90/10. 

	I no longer bother shutting the client off. I don't think having to
wait those extra 15 minutes is worth the trouble of locating the client's
PID, killing it, and then having to remember to start it up again when the
compile is done. On a P-II, where the compile takes four minutes instead of
four hours, you're saving maybe 15 seconds. Is it worth trying to circumvent
the OS scheduler for that? I don't think so...

John Campbell
jcampbel at lynn.ci-n.com

QotD:  You can lead a horse to water, but you can't herd a cat.

To unsubscribe, send 'unsubscribe rc5' to majordomo at lists.distributed.net
rc5-digest subscribers replace rc5 with rc5-digest

More information about the rc5 mailing list