Page 1 of 1

RealTimeConfigQuickScan

Posted: Sun Aug 15, 2021 6:17 pm
by nanook
Hi you all! This is my first post.
So I've been having a latency issue: I configure Jack for low latency, but without x runs the latency starts increasing. Which drives me crazey!
So, I found this page (https://wiki.linuxaudio.org/wiki/system ... #quickscan) and made a RealTimeConfigQuickScan:
perl ./realTimeConfigQuickScan.pl
== GUI-enabled checks ==
Checking if you are root... no - good
Checking filesystem 'noatime' parameter... 5.4.0 kernel - good
(relatime is default since 2.6.30)
Checking CPU Governors... CPU 0: 'performance' CPU 1: 'performance' CPU 2: 'performance' CPU 3: 'performance' CPU 4: 'performance' CPU 5: 'performance' CPU 6: 'performance' CPU 7: 'performance' - good
Checking swappiness... 10 - good
Checking for resource-intensive background processes... none found - good
Checking checking sysctl inotify max_user_watches... < 524288 - not good
increase max_user_watches by adding 'fs.inotify.max_user_watches = 524288' to /etc/sysctl.conf and rebooting
For more information, see http://wiki.linuxaudio.org/wiki/system_ ... sysctlconf
Checking whether you're in the 'audio' group... yes - good
Checking for multiple 'audio' groups... no - good
Checking the ability to prioritize processes with chrt... yes - good
Checking kernel support for high resolution timers... found - good
Kernel with Real-Time Preemption... not found - not good
Kernel without 'threadirqs' parameter or real-time capabilities found
For more information, see https://wiki.linuxaudio.org/wiki/system ... ime_kernel
Checking if kernel system timer is high-resolution... found - good
Checking kernel support for tickless timer... found - good
== Other checks ==
Checking filesystem types... ok.
** Set $SOUND_CARD_IRQ to the IRQ of your soundcard to enable more checks.
Find your sound card's IRQ by looking at '/proc/interrupts' and lspci.

If any one coudl help me or give me any instructions I would be SO grateful!
Thank You!!

Re: RealTimeConfigQuickScan

Posted: Wed Aug 25, 2021 12:06 am
by milo
I don't know anything about the max_user_watches, but I doubt that's causing much trouble. If you are using the lowlatency kernel then don't worry about the real time preemption.

What are you jack settings for period, buffer size, and sample rate? That's where you get the most bang for your buck.

Re: RealTimeConfigQuickScan

Posted: Thu Aug 26, 2021 3:40 am
by GMaq
nanook wrote: Sun Aug 15, 2021 6:17 pm

Code: Select all

Kernel with Real-Time Preemption... not found - not good
Kernel without 'threadirqs' parameter or real-time capabilities found
It would be very helpful to know what Distribution you are using and what Kernel you are using... If you are using a lowlatency preempt Kernel then you still need to use the GRUB boot option 'threadirqs' to get the benefit of IRQ prioritization..

The link for further help is right in the rtcqs script itself: https://wiki.linuxaudio.org/wiki/system ... ime_kernel

Re: RealTimeConfigQuickScan

Posted: Thu Aug 26, 2021 12:02 pm
by nikgnomicradio
nanook wrote: Sun Aug 15, 2021 6:17 pm Checking checking sysctl inotify max_user_watches... < 524288 - not good
increase max_user_watches by adding 'fs.inotify.max_user_watches = 524288' to /etc/sysctl.conf and rebooting
Use this to set the value for max_user_watches

Code: Select all

echo 'fs.inotify.max_user_watches = 524288' | sudo tee -a /etc/sysctl.conf
If this value is too low it can cause small random bursts of x-runs (and a lot of frustration)

Re: RealTimeConfigQuickScan

Posted: Thu Aug 26, 2021 4:18 pm
by Loki Harfagr
as an alternative for the max_user_watches stuff there's (as far as one's plagued by that systemd's havoc one better eat it and use its included plastic spoons)
sudo /sbin/sysctl -w fs.inotify.max_user_watches=524288

Re: RealTimeConfigQuickScan

Posted: Thu Aug 26, 2021 7:03 pm
by TAERSH
Loki Harfagr wrote: Thu Aug 26, 2021 4:18 pm as an alternative for the max_user_watches stuff there's (as far as one's plagued by that systemd's havoc one better eat it and use its included plastic spoons)
sudo /sbin/sysctl -w fs.inotify.max_user_watches=524288
What's the possible effect, if this value would be doubled, so: max_user_watches = 1048576 ???
Could this have any effect on reducing Xruns?

Re: RealTimeConfigQuickScan

Posted: Thu Aug 26, 2021 9:24 pm
by milo
There should be a threshold effect on max_user_watches, where as long as you are above a certain level it won't cause a problem. Once you are above that threshold I doubt you'll notice anything by doubling (or tripling) the value.

Re: RealTimeConfigQuickScan

Posted: Thu Aug 26, 2021 11:44 pm
by nikgnomicradio
What's the possible effect, if this value would be doubled, so: max_user_watches = 1048576 ???
Could this have any effect on reducing Xruns?
setting the value too high will use more RAM
https://wiki.linuxaudio.org/wiki/system_configuration#sysctlconf wrote:max_user_watches parameter sets the maximum number of files your system can monitor with inotify (which is part of the kernel) for changes. Setting this parameter too low results in inotify failing. Setting it too high can make inotify needlessly consume memory.
...if the system runs out of watchers these DAW's or samplers fall back to polling the file system which increases disk IO which could in turn cause jitter
I found a script to check the number of files inotify is watching - https://github.com/fatso83/dotfiles/blo ... -consumers
My system was using a lot less than the recommended 524288, but if I used a very heavy DSP load in JACK I could exceed the default number of watches set by the distribution

Re: RealTimeConfigQuickScan

Posted: Fri Aug 27, 2021 1:09 am
by TAERSH
Ok, this script returns: 33 files count in total.

Isn't this resource hungry to have a value of more than half a million, if there's only a few files below hundred?