RealTimeConfigQuickScan

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
nanook
Posts: 1
Joined: Tue Dec 15, 2020 4:36 pm

RealTimeConfigQuickScan

Post 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!!
User avatar
milo
Established Member
Posts: 1242
Joined: Wed Sep 06, 2017 2:55 am
Location: Southern Utah, USA
Has thanked: 275 times
Been thanked: 218 times
Contact:

Re: RealTimeConfigQuickScan

Post 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.
User avatar
GMaq
Established Member
Posts: 2804
Joined: Fri Sep 25, 2009 1:42 pm
Has thanked: 525 times
Been thanked: 563 times

Re: RealTimeConfigQuickScan

Post 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
Last edited by GMaq on Thu Aug 26, 2021 2:50 pm, edited 1 time in total.
User avatar
nikgnomicradio
Established Member
Posts: 109
Joined: Wed Feb 07, 2018 9:31 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

Re: RealTimeConfigQuickScan

Post 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)
User avatar
Loki Harfagr
Established Member
Posts: 268
Joined: Thu Aug 02, 2018 1:28 pm
Has thanked: 151 times
Been thanked: 53 times

Re: RealTimeConfigQuickScan

Post 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
User avatar
TAERSH
Established Member
Posts: 455
Joined: Mon Feb 03, 2020 6:48 pm
Has thanked: 27 times
Been thanked: 21 times

Re: RealTimeConfigQuickScan

Post 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?
User avatar
milo
Established Member
Posts: 1242
Joined: Wed Sep 06, 2017 2:55 am
Location: Southern Utah, USA
Has thanked: 275 times
Been thanked: 218 times
Contact:

Re: RealTimeConfigQuickScan

Post 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.
User avatar
nikgnomicradio
Established Member
Posts: 109
Joined: Wed Feb 07, 2018 9:31 pm
Has thanked: 1 time
Been thanked: 7 times
Contact:

Re: RealTimeConfigQuickScan

Post 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
User avatar
TAERSH
Established Member
Posts: 455
Joined: Mon Feb 03, 2020 6:48 pm
Has thanked: 27 times
Been thanked: 21 times

Re: RealTimeConfigQuickScan

Post 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?
Post Reply