linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

User avatar
funkmuscle
Established Member
Posts: 2806
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 131 times
Been thanked: 33 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by funkmuscle »

CrocoDuck wrote:I have tried quite a lot of kernels and what I set on are linux-lts and linux-rt-lts. On the kernel side, I prefer to have less frequent updates and a more stable environment. rt-lts works ok for me.
The vanilla when I'm not doing any audio production and would love some heavy eye candy I boot into that one. The rt-lts is for of course heavy audio production. I was getting some crazy xruns and I couldn't figure it out until I noticed I was using TAP reverberation which was not a problem two weeks ago.
Thank you Vladimir for making the LSP impulse response loaders
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by gimmeapill »

I tested a bit more kernels yesterday and that was indeed a good exercise.
But as of March 2017, I think there's still not much change: RT still has an edge if the lowest possible latency without xruns is the goal.
Not everyone necessarily needs that, and this might not play nice with the graphics (modern DEs, proprietary drivers).

Here's the summary running just Guitarix + Qtractor wihtout any plugin, CPU Governor in perf mode (mostly as a note for myself).

Linux-rt (4.9.13_rt11-1) -> ok
Linux-rt-lts (4.4.47_rt59-1) -> ok
Linux (4.9.11-1) -> nope
Linux-zen (4.9.11-2) -> nope
Linux-ck ( 4.10.1-1) -> nope

Jack settings are the following (that gives about 2ms latency, 6-7 ms roundtrip):

Code: Select all

/usr/bin/jackd -P89 -p128 -t2000 -dalsa -r96000 -p64 -n3 -Xseq -D -Chw:USB -Phw:USB -i2 -o2
thebutant
Established Member
Posts: 169
Joined: Sun Nov 18, 2012 12:59 pm
Has thanked: 50 times
Been thanked: 8 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by thebutant »

My experience in Debian Testing is that Linux-rt can handle a lot lower latencies and larger workloads than Liquorix.
On the other hand, Liquorix runs really smooth for almost everything. The result is that I:

1/ use the Liquorix kernel as my default. Also for audio production. And it's perfect for the occasional gaming.
2/ boot into linux-rt when xruns come running in a large project or when I'm doing live audio at low latencies.

I'm very impressed by the linux-rt kernel. So steady and stable, and so able to deal with heavy audio, even long after Liquorix had to give up.
When I turn off wifi on my laptop, it feels like linux-rt is capable of handling almost any sound task without complaining.
User avatar
funkmuscle
Established Member
Posts: 2806
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 131 times
Been thanked: 33 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by funkmuscle »

gimmeapill wrote:
Jack settings are the following (that gives about 2ms latency, 6-7 ms roundtrip):

Code: Select all

/usr/bin/jackd -P89 -p128 -t2000 -dalsa -r96000 -p64 -n3 -Xseq -D -Chw:USB -Phw:USB -i2 -o2
this is part of the reason I started this thread. My old pci sound card and my 2i2 can only do the same jack settings.
I tried yours and as Ardour was launching, the xruns were out of control and when Ardour launched, the DSP was flashing red.
I got the 2i2 due to everyone saying they got better latency performance.
this is my best settings for jack with both vanilla or rt-lts kernals.

Code: Select all

/usr/bin/jackd -P89 -dalsa -r48000 -p256 -n2 -D -Chw:USB -Phw:USB
I get 10.7ms
I thought maybe a different kernel would give better performance.
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by gimmeapill »

funkmuscle wrote: I got the 2i2 due to everyone saying they got better latency performance.
I don't think you have a kernel or soundcard issue there. I wouldn't be able to run Ardour either with those jack settings without a flock of xruns.
This is my low latency setting for Guitarix (since there's just no other way), but qtractor, hydrogen and renoise work also relatively ok If I take it easy on the plugins (that means none). Ardour just doesn't. I don't think those DAWs were ever supposed to be used at 2ms latency with a software tube emulation running on the same system, but rather at 10-20ms and compensate for input latencies. Things are getting better over the years, but we need to keep realistic expectations here. Or maybe on a Mac with a thunderbolt interface?

Some ideas nevetheless:
- Try Ardour standalone with the alsa backend, it gives a lot less xruns. I just tried with 5.8 and it is actually quite ok at 96K*64b*3p. Probably not for a fat session with a thousand tracks, but it seems to be workable.
- Use 3 periods, not 2 (that's the "usb tax").
- Try 96Khz. I have the impression that the 2i2 just performs better at 96k than 44.1 or 48 when it comes to xruns.
- Forget about fat desktop environments. To get there I'm not using Gnome or KDE... Some people seem to have no problem though (hi Crocoduck), but this could be worth a try.
User avatar
funkmuscle
Established Member
Posts: 2806
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 131 times
Been thanked: 33 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by funkmuscle »

gimmeapill wrote:
funkmuscle wrote: I got the 2i2 due to everyone saying they got better latency performance.
I don't think you have a kernel or soundcard issue there. I wouldn't be able to run Ardour either with those jack settings without a flock of xruns.
This is my low latency setting for Guitarix (since there's just no other way), but qtractor, hydrogen and renoise work also relatively ok If I take it easy on the plugins (that means none). Ardour just doesn't. I don't think those DAWs were ever supposed to be used at 2ms latency with a software tube emulation running on the same system, but rather at 10-20ms and compensate for input latencies. Things are getting better over the years, but we need to keep realistic expectations here. Or maybe on a Mac with a thunderbolt interface?

Some ideas nevetheless:
- Try Ardour standalone with the alsa backend, it gives a lot less xruns. I just tried with 5.8 and it is actually quite ok at 96K*64b*3p. Probably not for a fat session with a thousand tracks, but it seems to be workable.
- Use 3 periods, not 2 (that's the "usb tax").
- Try 96Khz. I have the impression that the 2i2 just performs better at 96k than 44.1 or 48 when it comes to xruns.
- Forget about fat desktop environments. To get there I'm not using Gnome or KDE... Some people seem to have no problem though (hi Crocoduck), but this could be worth a try.
gimmeapill, thanx! I'll try 96k. I only use openbox or lxqt

EDIT: tried 96k and 3 period. the xruns were going nuts..
tramp
Established Member
Posts: 2347
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 466 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by tramp »

funkmuscle wrote:EDIT: tried 96k and 3 period. the xruns were going nuts..
I'm pretty sure you've checked that your soundcard haven't a conflicting IRQ?

Code: Select all

cat /proc/interrupts
Regarding kernels, I'm using vanila+ rt patch, optimized for my machine, for all my tasks, longer then 10 years now.
Currently I'm on 4.1.12-rt13
On the road again.
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by gimmeapill »

Yeah, for a 2i2 (assuming first gen) that behavior is weird. It sounds like something is not quite right with your config, and that's probably not just the kernel. I'm not saying it's possible to double the performance, but probably improve a tiny bit at least.

Some more ideas:
Just to get this out of the way, make sure you're using the latest linux-rt-lts (the one from AUR, not the one from jhernberg's repo which is lagging at 3.x), & that your whole system is up to date. Then it could be worth double checking the system tuning with the realtimeconfigquickscan (Audio priorities, cpu governor etc... etc..).

And the HW side:
- As per Tramp's suggestion, check IRQ sharing and locate where your card is running. Ideally, it shouldn't have any "neighbor". Hardly ever the case in practise.
- Try a different USB cable.
- Try a different USB port (USB3 port to be preferred uless you run into specific issues). If you have the option to enable / disable USB3 in the BIOS, try to change it. Ex: Enabling the USB3 controller can be enough to move your sound card to its dedicated IRQ, even if it's still on the same physical port.
- To know where you're going, it could be worth to measure the lowest possible roundtrip latency you can get with jack_delay.

And I just remember of something possibly important: I'm running on jack1, as I never found Jack2 to bring any practical benefit for my config and to be generally heavier, in particular if you add a2jmidid. On Arch, it's relatively easy to switch back & forth.
User avatar
sadko4u
Established Member
Posts: 989
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 361 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by sadko4u »

funkmuscle wrote:Thank you Vladimir for making the LSP impulse response loaders
Even more, we're going to release new IR suite soon as addition to current IR plugins. New and old plugins will utilize CPU more efficiently with less load.
LSP (Linux Studio Plugins) Developer and Maintainer.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by CrocoDuck »

gimmeapill wrote: - Forget about fat desktop environments. To get there I'm not using Gnome or KDE... Some people seem to have no problem though (hi Crocoduck), but this could be worth a try.
Indeed I am pretty surprised I am going by pretty well with GNOME3... But I was used to use OpenBox or LXDE before, with great satisfaction and improvements over a full blown DE. I think funkmuscle is indeed using OpenBox when doing music if I am not mistaken.

Another thing worth to try is modeprobe out the wifi card. Sometimes it gives tons of xruns also in case of not evident IRQ conflicts or similar.
User avatar
funkmuscle
Established Member
Posts: 2806
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 131 times
Been thanked: 33 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by funkmuscle »

ok I think I've found my issue.. My projects are large and they were all done in 48k. I think loading a large session caused it as I just tried a need session with just AV RedZep multi lv2 kit and no issues yet.. runs smoothly..

I will add guitars, effects, etc later to put some weight on it to see how it goes.
asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: linux-rt, linux-rt-lts, linux-lqx(Liquorix) and linux-rt-bfq, which is the best?...

Post by asbak »

Compile a preempt kernel, for bonux points also set it to 1000Hz, works fine for both low-latency audio & day to day computing.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
Post Reply