One month and counting without RT kernel on Arch Linux

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: One month and counting without RT kernel on Arch Linux

Post by gimmeapill »

merlyn wrote:
gimmeapill wrote:...and in the meantime, look what just made it to the AUR: linux-rt 4.19.10
You can install a pre-built RT kernel by adding this unofficial user repository.
I prefer to build stuff myself in a clean chroot rather than use third party repos whenever possible,
but it is true that 4.19 RT did take a solid 3,5 hours to compile on my old machine - this starts to call for a HW upgrade ;-)

Regarding 4.19 RT: So far it seems to be fairly solid: I could get Guitarix + jack running @96khz x 3 buffers and 32 periods (=~1ms) without a hitch - this is where the stock Arch kernel starts to choke. I suspect it might be slightly better than 4.18 RT also.
User avatar
sysrqer
Established Member
Posts: 2519
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: One month and counting without RT kernel on Arch Linux

Post by sysrqer »

Gimmeapill do you not disable obviously irrelevant stuff in your kernel config? I used to be able to build a trimmed down one in about 10mins on my old core2duo.
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: One month and counting without RT kernel on Arch Linux

Post by gimmeapill »

sysrqer wrote:Gimmeapill do you not disable obviously irrelevant stuff in your kernel config? I used to be able to build a trimmed down one in about 10mins on my old core2duo.
Yes, I used to, but this became over time a lot more pain than it is worth.
I also used to build the spartan way with "make localmodconfig" which would give very slim kernels, also the 10 mins ballpark, by building only the modules loaded by the currently running kernel.
But I eventually gave up as this was more than often breaking the build (ex: when new upstream kernel modules are introduced or renamed).
Also, I never found any empirical evidence that latency improved, and this made the config pretty much useless for troubleshooting or comparing results.

So nowadays I just let my old CPU suffer and trust the RT kernel AUR maintainer - or even better, use the stock kernel ;-)

As XKCD put it back in the days:
Image
User avatar
sysrqer
Established Member
Posts: 2519
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: One month and counting without RT kernel on Arch Linux

Post by sysrqer »

Haha yeah it can take a lot of work maintaining when it is that minimal and not something I can be bothered to do anymore.
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: One month and counting without RT kernel on Arch Linux

Post by raboof »

I remember manually stripping down the kernel configuration because my machine had only 4mb of RAM instead of the then-recommended 8mb... I don't think I've bothered with it since :D
artofmusic
Established Member
Posts: 90
Joined: Mon Mar 17, 2014 8:01 pm

Re: One month and counting without RT kernel on Arch Linux

Post by artofmusic »

I think the Archlinux zen kernel is the way to go. Another plus is that it uses the newer I/O schedules like kyber/mq-deadline/bfq for better multi read/wrrite performance on HDD's. This kernel also has optimized the RCU timer threshold setting for more responsiveness. Attached is a zip I created to build the package. The advantage with my PKGBUILD is you can compile a bunch of different kernel versions and use them side by side, unlike Arch's Linux kernels. Lastly, I further tuned the kernels using a 1000HZ timer and set the default governor to performance.
Hope this helps.
Attachments
linux-zen.zip
linux-zen package modified for optimal performance and allowing multi-kernel build scenario's
(58.47 KiB) Downloaded 81 times
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: One month and counting without RT kernel on Arch Linux

Post by gimmeapill »

artofmusic wrote:I think the Archlinux zen kernel is the way to go. Another plus is that it uses the newer I/O schedules like kyber/mq-deadline/bfq for better multi read/wrrite performance on HDD's. This kernel also has optimized the RCU timer threshold setting for more responsiveness. Attached is a zip I created to build the package. The advantage with my PKGBUILD is you can compile a bunch of different kernel versions and use them side by side, unlike Arch's Linux kernels. Lastly, I further tuned the kernels using a 1000HZ timer and set the default governor to performance.
Hope this helps.
From your description, this is yet another desktop kernel optimized for responsiveness + throughput, not worst case latency.
I didn't go through the full config, but 1000hz is mostly deprecated since we have a full tickless kernel.
And messing around with the default governor is the last thing I need my kernel to do (this, and also deciding which I/O scheduler I should use).
Actually the whole point of this thread is to discuss if running one of those custom frankenkernels is still really worth the pain in 2019 - at least for audio stuff. Even the scope of the RT patch set sems to be seriously reduced.

I don't mean to be completely dismissive, but I don't see any compelling argument so that this nth custom kernel would allow lower audio latencies with less xruns than 4.19 Stock or RT.

Some cyclictest benchmarks maybe?
artofmusic
Established Member
Posts: 90
Joined: Mon Mar 17, 2014 8:01 pm

Re: One month and counting without RT kernel on Arch Linux

Post by artofmusic »

I have found this kernel to lock up less personally, plus it would be nice if Archlinux made multiple version kernels viable for those of us who may use proprietary drivers. Also, on Nvidia I have found that RT is a real pain and can lead to a black screen when starting X11 and even more lockups during use. This config is the best balance when you need to use prop. drivers. I wish RT kernels would support hardware a bit better in this regard, as this is the main practical case against using RT.
gimmeapill
Established Member
Posts: 564
Joined: Thu Mar 12, 2015 8:41 am
Has thanked: 44 times
Been thanked: 8 times

Re: One month and counting without RT kernel on Arch Linux

Post by gimmeapill »

Yeah, Nvidia + RT is not the easiest going combo for audio (although it seems to be working for some people).
But it is not up to Arch to delay upgrades to support proprietary drivers - rather the opposite ;-)

Anyway, if you want to pitch Linux-ZEN against the latest stock or RT, why not run a few benchmarks and post the results here: viewtopic.php?f=27&t=19335

As for this thread, I guess it can be closed since the experiment is over: I went back to RT (4.19 RT is really that good).
But if something went sour, using the default Arch kernel wouldn't be dramatic by any mean.
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: One month and counting without RT kernel on Arch Linux

Post by Musicteacher »

Hi,
sorry for resurrecting this old thread.

As for the question if the rt-kernel makes a difference or if the stock-arch-kernel (which uses some settings useful for rt anyway) is good enough: I use an older machine for music recording, and here, it does.

I had the occasional xrun, which didn't bother me too much, but yesterday I wanted to record a session in QTractor to Audacity (use the QTractor out as input to Audacity, I mean).

Using those two programs together gave me quite some audible xruns, while on the other hand the system wasn't quite 100% busy. So I thought: This should be a situation where a "real" rt-kernel should make a difference (in theory).

And: It does. Same song, same setup, played back + recorded without a single xrun.

On my (much newer and more powerful) notebook (which I use for live and rehearsals for virtual instruments) I used the stock kernel and had no problems so far.

So my personal conclusion: If you system is very powerful and you are far away from an overload, it won't make much of a difference if you use a rt kernel or not. But if you get in a tight corner, it will make very much of a difference.
Post Reply