<div dir="ltr"><font face="georgia,serif"><br></font><br><div class="gmail_quote">On Wed, Jul 25, 2012 at 2:29 PM, Nadav Har'El <span dir="ltr"><<a href="mailto:nyh@math.technion.ac.il" target="_blank">nyh@math.technion.ac.il</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
HZ used to default to 100 in the Linux kernel, but now it actually<br>
defaults (unless I'm mis-remembering) to 250, and this is where the 4-ms<br>
resolution came from. </blockquote><div><br>Actually, there is the default HZ and inside the kernel HZ there is HZ that you can configure at compile time (with CONFIG_HZ) and USER_HZ, which, I think, is still 100 whether or not the kernel's HZ is customized. I think USER_HZ is what is important for "soft timers" you are interested in.<br>
<br>Unless you configure the kernel yourself, the HZ value the kernel comes with probably depends on the distro. The tradeoff is as follows: desktop systems benefit from a higher HZ value because interactive processes are latency-sensitive. Servers, especially NUMA systems, don't have interactive processes and may, on the other hand, experience a lot of unpleasant effects (bus contention as an example) if there are lots of interrupts. Also note that the interrupt rate will be HZ*#CPUs.<br>
<br>I am used to RedHat systems whose kernels normally come with HZ=100. You are talking about a server as well, right? You may be right about HZ=250 by default in the vanilla kernel that is supposed to be a compromise between 100 and 1000.<br>
<br>If you go back to, say, 2.6.11 or 2.6.12, then you'll see HZ=1000 by default, I think. Was that "Linux on a desktop"? ;-)<br> </div><br></div>-- <br>Oleg Goldshmidt | <a href="mailto:oleg@goldshmidt.org" target="_blank">oleg@goldshmidt.org</a><br>
</div>