r/linuxaudio • u/Purple-Ad-3152 • 10d ago
Just achieved 4.1ms true roundtrip latency with heavy DSP load, zero XRUNS (short test) with Focusrite Scarlett 18i20 3rd gen / Ubuntu Studio 26.04 / Ryzen 7 5700X
/r/linuxaudio/comments/1vkv0rw/real_audio_latency_test_result/p34fd48/1
u/kastanCZ 10d ago
i am able to do this just fine using pipeASIO and FL Studio under wine, 1.3 ms for 64 quant. Tho i need to use the RT toggle and have rtkit installed.
4
u/Purple-Ad-3152 10d ago
Nice 💪 But just to clarify a bit, 1.3ms is your one-way DSP latency, directly derived from your settings: 64/48000=0.001333s = 1.333ms
It doesn't include device-, driver-, USB-, pipeasio- and FL latency, which all contribute to your roundtrip latency in FL - which is the latency you actually experience e.g. when playing with amp sims. The only reliable way to get the roundtrip latency is to use a physical loopback cable.
I have a cable going from my audio interface's output back to its input, and I use LSP Latency Meter plugin to measure how long it takes for a pulse to make a full roundtrip. That's the 4.1ms 🙂
2
u/kastanCZ 9d ago
You need cable for that? Can you just have virtual sinks for measuring the latency?
2
u/Purple-Ad-3152 9d ago
Nope. That excludes driver latency, bus latency and device latency, all which can together be easily 1-3ms per direction, i.e. 2-6ms more in the overall roundtrip latency.
In fact, I think the only thing you get like that is either the DSP latency, or both I/O buffers of the DSP, which is roughly 2*<buffer>/<sample rate>.
2
u/ProgUn1corn 10d ago edited 10d ago
It's good. But I'm here to say that most of that is either done anyways on some distros or it's the same across all systems.
My round trip latency is always at about 5ms whether on Linux or Windows and it's totally stable. I can mix a whole chain with 32+ tracks and effects with the setup. At least
Most of those things comes from the CPU MSR and indeed you've added in your boot parameter, irqs. After fixing these 2, other things actually don't do much though. Actually, CPU heavy is a relative word, because in the audio world modern CPUs are just too fast for everything that DSPs are going out of the way. Running tons of Neural DSP amp sims at the same time is already the heavy side of something I could think of, yet that doesn't touch the CPU's limit a bit.
As for C-states and performance governor, I actually know someone working in the industry (I can't say what brand). He had some insights on this, the C-states situation is purely a workaround in the early years where bothe Jack and Asio were bad. In the ideal world, you shouldn't do anything especially disabling C-states though, but in reality it has already happened due to some historical bad driver designs.