I see in the @autostatic new and very nicely improved RT quick config scan that there is some sort of Ardour udev rule for better scheduling performance (or something like that… I’m in a hurry today). Can somebody point out to me where that is…? I’d like to integrate it into the base AVL config next time around…
From what I can tell rtqcs checks if /dev/cpu_dma_latency is witable by the current user.
If not it points to ardour/tools/udev at master · Ardour/ardour · GitHub and advises to copy 99-cpu-dma-latency to /etc/udev/rules.d/ and reboot.
You have to be in the audio group to gain write privileges.
Then Ardour can, presumably, set that value to 0 to “disable some power management frequency and voltage scaling depending on cpu hardware capabilities”.
A value of 0 seems to tell the CPU not to enter the deep sleep C0 state.
Interestingly enough my Ubuntu 20.04 PC has cpu_dma_latency set to
2000000000 but my openSuse 15.3 has it at 689062
curl -s https://raw.githubusercontent.com/Ardour/ardour/master/tools/udev/99-cpu-dma-latency.rules | sudo tee /etc/udev/rules.d/99-cpu-dma-latency.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
After that Ardour will by default ask the CPU to not enter deep sleep states as long as Ardour is running. See also Ardour > Preferences > Performance > Power Management, CPU DMA Latency.
Ardour picks the lowest non zero value by default.
Setting it to zero (no CPU idle) may cause some laptops to heat up, and thermal throttle performance (which is counter productive), but may be fine with desktop system. You can check CPU states and temperature with tools like i7z or s-tui.
On my system the lowest non-zero value is 2 usec which is perfectly fine.
The setting is only applied if an application is running and has an open file-descriptor for /dev/cpu_dma_latency. If more than one process has a valid filedes, the lowest value requested by any running process is used.
So yes, as soon as Ardour exits, the system behaves just like Ardour never requested a different value.
Hi, AVLinux or general question… are there some bits I can flip to enable better USB performance (at the risk of deteriorating other qualities of service), and a way to flip them back? When I am doing backups to USB (i.e. not doing any audio/heavy-cpu-lifing), it can just sit there and look at me blankly as my cat does. Looking for a “heavy-duty I/O mode” vs my “heavy-duty low-latency mode”. Thanks!