You are not logged in.

#1 Yesterday 12:27:44

matidfk
Member
Registered: 2022-04-17
Posts: 10

Can't get linux audio performance even remotely close to Windows

For the last month or so, ive been trying without success to replicate atleast comparable conditions on my Arch linux setup as I've had on windows.
I've tried JACK2, pipewire-jack, even just going straight through ALSA, with various configs for each but nothing I do seems to get me anywhere close to the performance I could get on windows.
I've gone and compared the latencies, figuring out that 4096 samples on Linux is the same as 2048 on windows. Then using 128 samples on windows, I was able to run about 100 instances of the TONE3000 plugin at the same time, however with 256 samples on linux (with its native linux version) i can barely run 3. any more and i get horrible constant xruns. I can't even use a NDSP plugin (via yabridge) at a latency i would deem acceptable without constant xruns.

My setup:
OS: Arch linux
Interface: Focusrite Solo 3rd gen via USB
DAW: Reaper (native linux build, tried windows build via wine too)
CPU: Ryzen 5 5600G
Plugins:
Neural DSP Fortin Nameless (windows native VST, on linux via yabridge)
TONE3000 - native versions on both windows and linux

Ive also gone through all I could find, on various forums, Arch's pro audio page, ive gone through the rtcqs checklist and done everything apart from spectre meltdown mitigations.

I'm completely lost as to why this is happening, willing to try anything

Offline

#2 Yesterday 15:39:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,087

Re: Can't get linux audio performance even remotely close to Windows

figuring out that 4096 samples on Linux is the same as 2048 on windows

???

Then using 128 samples on windows … however with 256 samples on linux

Ftr: how'd be the behavior w/ 128?

everything apart from spectre meltdown mitigations

Is the CPU load (even of a single core) particularly high during playback?

I've tried JACK2, pipewire-jack … 100 instances of the TONE3000 plugin

Remove all userspace daemons (pipwire or pulseaudio or jack) and play something w/ eg. "mpv -ao alsa" as testcase.

DAW: Reaper (native linux build, tried windows build via wine too)

Or is it less the audio device and more the midi processing?
Are you sure that happens in the HW and not in some SW emulation (eg. timidity, wildmidi etc)?
And how does eg. https://archlinux.org/packages/extra/x86_64/rosegarden/ perform by comparism?

Offline

#3 Yesterday 21:01:06

matidfk
Member
Registered: 2022-04-17
Posts: 10

Re: Can't get linux audio performance even remotely close to Windows

???

sorry forgot to say, this is in terms of latency - not reported latency by the daw/driver, but just playing along and checking the timing of it

Ftr: how'd be the behavior w/ 128?

as you'd expect, even worse than 256 - with 256 its stuttering, with 128 it basically refuses to play at all

Is the CPU load (even of a single core) particularly high during playback?

weirdly enough, the CPU load itself is not that high, probably normal but the Realtime CPU usage (as shown by reaper, but also pw-top) is insanely high, sometimes even shows values above 100% lol

Remove all userspace daemons (pipwire or pulseaudio or jack) and play something w/ eg. "mpv -ao alsa" as testcase.

audio in general works fine, playing media clips in reaper or anywhere isnt a problem, its just FX processing that is really slow (or maybe it is, its just not a heavy enough task to detect the issue on)

Or is it less the audio device and more the midi processing?

I dont think it could be the midi, theres no midi in the project, just guitar amp sims, running and monitoring through the daw

Thanks for willing to help with this

Offline

#4 Yesterday 21:10:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,087

Re: Can't get linux audio performance even remotely close to Windows

insanely high, sometimes even shows values above 100% lol

100% per core, you've 12 (6*2) - kernel thread or (which) userspace process?
How's the CPU load on windows w/ comparable tasks?
If the total is similar, does reaper/windows distribute it across multiple cores? Does reaper/windows? Basically, is one core maxed out on linux but not on windows?

Offline

#5 Yesterday 22:55:38

matidfk
Member
Registered: 2022-04-17
Posts: 10

Re: Can't get linux audio performance even remotely close to Windows

seth wrote:

100% per core, you've 12 (6*2) - kernel thread or (which) userspace process?
How's the CPU load on windows w/ comparable tasks?
If the total is similar, does reaper/windows distribute it across multiple cores? Does reaper/windows? Basically, is one core maxed out on linux but not on windows?

After a bit more testing - the latencies of linux and windows seem to actually be comparable, although on linux it seems that with lower buffer sizes they dont go as low as windows (tested this using a loopback test) - which i think has lead me to a feeling of needing to push it lower on linux only.

Either way, after testing at 256 samples (36ms on windows, 33ms on linux):

lite rig test (stereoizer + Fortin nameless)
windows: 15% CPU, 40% RT - runs fine
linux: 3% CPU, 40% RT - runs fine (occasional xruns when switching window focus/workspaces or other things like that)

full rig test (stereoizer + Fortin Nameless + bunch of EQs, some multiband compressors and utility plugins):
windows: 20% CPU, 50% RT CPU - runs fine
linux: 4% CPU, 75% RT CPU - xrun crackles about every second, kind of unusable

full rig test x2 (2 of the same track)
windows: 24% CPU, 70% RT CPU - runs fine
linux: wont even play a single sound, reaper shows 140% RT CPU

I think looking into specific core usage might be of help, as the gap between windows and linux seems to grow exponentially with heavier tasks - unfortunately btop just shows each core at about 30% (maybe theres a different way to show each cores usage? maybe something specifically for RT usage?)

EDIT: I found that i had turned off the setting to allow live fx multiprocessing within REAPER (the setting warns that it may reduce performance at low latencies). This fixed the problem where the 2 instances wouldnt play, but now is also plagued by constant xruns just like a single instance, which this setting hasnt helped unfortunately

Last edited by matidfk (Yesterday 23:12:24)

Offline

Board footer

Powered by FluxBB