Page 1 of 1

current thinking on nohz=off?

Posted: Thu Jan 21, 2016 12:56 pm
by eric71
I remember a number of years ago when Ubunntu had started setting CONFIG_NO_HZ=y in their kernels and after updating to the latest version, my latency/xruns went to hell. The solution was to start adding nohz=off to my grub boot lines. So years have passed, and I have distrohopped a hundred times and as of late have been sticking to Ubuntu based distros (Mint for a while, last week Ubuntustudio, and this week Xubuntu 15.10) with kxstudio repos added. I have been installing the lowlatency kernel, adding myself to the audio group, and installing jackd automagically sets up limits.conf correctly. I haven't thought at all about dynamic ticks - only making sure that preempt and hz=1000 are correctly set in the kernel config. I checked today, and dynamic ticks is still enabled in current Ubuntu lowlatency kernels. I've been getting decent performance, but recently I've tried pushing latencies a little lower with my usb interface, without encouraging results. I remembered the nohz=off thing, googled a bit, and couldn't find anything newer than 3 or 4 years old on the topic. A search of nohz finds nothing on this forum.

I'm at work now, so I can't test if nohz=off helps on my system. In the meantime I'd just like to see if any of the low-latency experts on this forum have any information or personal experience with this. What settings are you using?

Re: current thinking on nohz=off?

Posted: Thu Jan 21, 2016 2:03 pm
by asbak
CONFIG_PREEMPT=y
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
CONFIG_NO_HZ=y
CONFIG_HZ_1000=y
CONFIG_HZ=1000

I haven't tested this enough to be certain but another thing which may cause xruns at lower latencies is the use of jackd seq or raw MIDI.
a2jmidid may be a better way to access MIDI devices.

Re: current thinking on nohz=off?

Posted: Fri Jan 22, 2016 11:00 am
by gimmeapill
For modern kernels (4.x), you shouldn't need to worry about that anymore. I ran some A/B comparisons a few months ago and couldn't find a difference.

Here's what we have at the moment for linux-rt in Arch:

Code: Select all

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
# CONFIG_NO_HZ is not set
CONFIG_HIGH_RES_TIMERS=y

Re: current thinking on nohz=off?

Posted: Fri Jan 22, 2016 3:46 pm
by eric71
gimmeapill wrote:For modern kernels (4.x), you shouldn't need to worry about that anymore. I ran some A/B comparisons a few months ago and couldn't find a difference.
I've just run some comparisons on kernel 4.4, and there was no noticeable difference, so this seems to be the case. Thanks gimmeapill and asbak :)

Re: current thinking on nohz=off?

Posted: Fri Jan 22, 2016 4:08 pm
by gimmeapill
Thanks for the confirmation.

I took the liberty to report that:
https://github.com/raboof/realtimeconfi ... n/issues/4