Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run my Virtual Machine with Gentoo as guest, I have found that there is considerable overhead coming from tick_periodic function.( this is the function which runs on every timer interrupt).This function updates a global jiffy using write_seqlocks which leads to the overhead.

Here's a grep of HZ and relevant stuff in my config file.

sharan013@sitmac4:~$ cat /boot/config | egrep 'HZ|TIME'
# CONFIG_RCU_FAST_NO_HZ is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
# CONFIG_MACHZ_WDT is not set

Clearly it has set the configuration to 1000, but when I do sysconf(_SC_CLK_TCK) I get 100 as my timer frequency.So what is my systems timer frequency?

What I want to do is to bring the frequency down to 100,even lower if possible.Although it might effect the interactivity and precision of poll/select and schedulers time slice, I am ready to sacrifice these things for lesser timer interrupt as it will speed up VM.
when I tried to find out what has to be done I read in some place that you can do so by changing in the configuration file, else where I read that adding divider=10 to the boot parameter does the job , else where I read that none of it is needed if you can set the (CONFIG_HIGH_RES_TIMERS) to acheive low-latency timers even without increasing the timer frequency and the same is possible with a tickless system CONFIG_NO_HZ.
I am extermely confused about what is the right approach.
All I want is to bring down the timer interrupt to as low as possible.
Can I know the right way of doing this ?

Thanks, Sharan

share|improve this question
You'd have to build your own kernel. Grab the vanilla sources from kernel.org or the source package (not kernel development package, that has just what is needed to build modules against the installed kernel) for your distribution, apply their configuration (if not already done), do a make menuconfig to change the HZ value, recompile, install, do a little rain dance, cross your fingers and reboot. Make sure you have a fallback in case the newly compiled kernel explodes. – vonbrand Feb 18 '13 at 19:41
With the running kernel's configuration readily available, copying it into the kernel source code tree (I believe as .config) and running make oldconfig is a good start. Then make menuconfig and change the relevant setting, then build as normal. – Michael Kjörling Feb 18 '13 at 19:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.