Note that there are some explanatory texts on larger screens.

plurals
  1. POLowering linux kernel timer frequency
    text
    copied!<p>When I run my Virtual Machine with Gentoo as guest, I have found that there is considerable overhead coming from <code>tick_periodic</code> function. (This is the function which runs on every timer interrupt.) This function updates a global <code>jiffy</code> using <code>write_seqlocks</code> which leads to the overhead.</p> <p>Here's a grep of <code>HZ</code> and relevant stuff in my kernel config file.</p> <pre><code>sharan013@sitmac4:~$ cat /boot/config | egrep 'HZ|TIME' # CONFIG_RCU_FAST_NO_HZ is not set CONFIG_NO_HZ=y # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set CONFIG_HZ_1000=y CONFIG_HZ=1000 # CONFIG_MACHZ_WDT is not set CONFIG_TIMERFD=y CONFIG_HIGH_RES_TIMERS=y CONFIG_X86_CYCLONE_TIMER=y CONFIG_HPET_TIMER=y </code></pre> <p>Clearly it has set the configuration to 1000, but when I do <code>sysconf(_SC_CLK_TCK)</code>, I get 100 as my timer frequency. So what is my system's timer frequency? </p> <p>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 <code>poll</code>/<code>select</code> and schedulers time slice, I am ready to sacrifice these things for lesser timer interrupt as it will speed up VM. </p> <p>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 <code>CONFIG_HIGH_RES_TIMERS</code> to acheive low-latency timers even without increasing the timer frequency and the same is possible with a tickless system <code>CONFIG_NO_HZ</code>. </p> <p>I am extermely confused about what is the right approach. </p> <p>All I want is to bring down the timer interrupt to as low as possible. </p> <p>Can I know the right way of doing this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload