ncguk
Posts: 27
Joined: Fri Mar 07, 2014 10:04 pm

Is there a way to turn off dynamic ticks in userland?

Sun Nov 16, 2014 8:40 pm

The recent changes to the Raspbian kernel that enable the easy use of PPS on the Pi are most welcome for users trying to maintain a stratum 1 NTP server, but there's a problem remaining: dynamic ticks.

From what I've read (and experienced from building a custom kernel) a tickless kernel is hugely beneficial in reducing jitter and offset in a GPS PPS time server. However, from what I can see it's not possible to compile the tickless aspect as a module that could be disabled and as such it's clear that, as the time nut section of the Pi community is a minority, the default kernel should remain with dynamic ticks compiled in.

With uBoot it would seem that "nohz=off" can be used as a kernel command line option to disable dynamic ticks so my question is, is there or could there be a way for those wish to disable dynamic ticks to do so without having to compile a custom kernel?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6074
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Is there a way to turn off dynamic ticks in userland?

Sun Nov 16, 2014 9:15 pm

You can append nohz=off to cmdline.txt

ncguk
Posts: 27
Joined: Fri Mar 07, 2014 10:04 pm

Re: Is there a way to turn off dynamic ticks in userland?

Sun Nov 16, 2014 10:36 pm

Ah, okay. I've tried that using the stock kernel with no appreciable difference (anecdotally, based on repeated viewings of ntpq -p over a period of hours rather than with any rigorous testing), whereas compiling a kernel with Timer tick handling and Old idle dynticks config disabled and the resulting options in GPIO Support and PPS support enabled results in a drastic improvement in stability in both offset and jitter, which is reflected in the NTP pool server management graph and CSV log.

Having said all that, I'm far from being an expert at this, so I'll persist with nohz=off and a stock kernel and check the measurements again after a couple of days.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6074
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Is there a way to turn off dynamic ticks in userland?

Sun Nov 16, 2014 11:43 pm

I haven't looked into what nohz actually is or how the kernel is configured. It may very well be that the kernel isn't configured in a way which allows the nohz parameter to work as you expect. I recommend to skim through https://www.kernel.org/doc/Documentatio ... /NO_HZ.txt and check the default config file.

Return to “Linux Kernel”