Quation about HZ kernel option

Craig Boston cb at severious.net
Thu Oct 4 07:54:50 PDT 2007


On Thu, Oct 04, 2007 at 02:32:39PM +0200, Oliver Fromme wrote:
> In that case, I would recommend not to override the
> default at all (which is 1000).

ISTM that it would be better to use kern.hz=100 in this case.

My reasoning is that a web server shouldn't be terribly sensitive to
latency, so it's better to have longer quantums to get more work done
without context switching overhead.  If you're not using polling, you'll
be getting interrupts for network traffic anyway.

With polling on however, a high HZ value makes sense.

> Basically, the kernel cannot handle time slices smaller
> than 1/HZ seconds, for any purpose.

It should still be able to schedule a new process for the remainder of
the slice should the current one block or yield though, right?

Craig


More information about the freebsd-stable mailing list