|
|
Thread Tools | Display Modes |
08-05-2018, 10:11 AM | #1 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
What is your experience with the preempt_rt patch vs. an rt-linux kernel?
Looking forward to getting my desktop set up for best low latency audio performance and some general purpose use. What has been your experience with the preempt_rt patch vs. rt kernel? Most recommendations I see these days say to go with a regular kernel with the preempt_rt patch, but along with those recommendations is a lack of elaboration. It seems to me that an rt kernel has the potential for dialing in a best balance of solid audio reliability and lowest latency, where the preempt_rt patch provides solid audio reliability for a general purpose machine albeit a little more latency.
Anyone done any comparison testing? Any tips to share? Also on that topic, what stable roundtrip latency are you seeing with your machine/audio device, whether you are using a regular kernel, a regular kernel with preempt_rt applied, or a a realtime kernel? And for those who are running a realtime kernel, have you ran into any major issues for general purpose use?
__________________
It's time to take a stand against the synthesizer. Last edited by brainwreck; 08-05-2018 at 10:19 AM. |
08-05-2018, 10:56 AM | #2 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
After a little more reading: Are actual realtime kernels still being maintained/developed today?
__________________
It's time to take a stand against the synthesizer. |
08-05-2018, 11:57 AM | #3 |
Human being with feelings
Join Date: Sep 2009
Location: Northern Lights
Posts: 749
|
Hi,
I just installed Ubuntu Studio 18.04 lowlatency kernel 4.15.0-29 couple of days ago. I have a cheap Behringer U-PHORIA UMC22 USB audio interface and running that with these settings: Sample Rate: 48000 Buffer Size: 512 Periods/Buffer: 3 Gives 10.7ms latency, works great with the VST instruments i use: * AmpleSound Acoustic * AmpleSound Bass * Keyzone Classic, piano * Stock Reaper Plugins and a bunch of free ones * HoRNet plugins * SForzando Soundfonts, like violin, cello, piano and other instruments I do everything in MIDI these days and I get pretty good sound I might add. Good enough for me. 15-30 tracks with no errors so far, everything's is running smooth as butter. I have a Lenovo IdeaCentre 23" All-In-One computer with 8GB RAM and a SSD 256GB. I might upgrade it to 16GB RAM in the future, but it runs well right now.
__________________
OS: Manjaro KDE Plasma, Reaper For Linux (64Bit) native linux-vst plugins, LSP-Plugins, TpL-Plugins, Harrison's AVA & VST Plugins. Behringer U-PHORIA UMC22. |
08-05-2018, 12:16 PM | #4 | |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
http://www.linux-magazin.de/ausgaben...-echtzeitig/3/ (Test from 2008. picture, from page 3, see appendix.)
https://wiki.linuxaudio.org/wiki/real_time_info, https://linuxmusicians.com/viewtopic.php?f=26&t=9845 Quote:
|
|
08-05-2018, 12:55 PM | #5 | ||
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Quote:
From a translation of that page, I see this near the end of the article: Quote:
__________________
It's time to take a stand against the synthesizer. Last edited by brainwreck; 08-05-2018 at 01:09 PM. |
||
08-05-2018, 02:31 PM | #6 |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
Technically, it's too complex for me, I can't explain it. My English is also too bad. SRY
|
08-05-2018, 03:21 PM | #7 |
Human being with feelings
Join Date: Aug 2015
Posts: 249
|
I've noticed a slight improvement in latency and xruns but not enough to be very noticeable. Not really worth the effort vs a low latency kernel in my opinion but it depends what your target is and undoubtedly what your hardware/setup is.
|
08-05-2018, 03:58 PM | #8 | ||
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
I don't know what to make of this:
Quote:
Anyone have a definitive source on untangling this? Edit: Found more info here: Quote:
Vanilla kernel comes from original linux kernel devs. Generic kernel (stock kernel) comes from distro devs. And so: Generic, preempt_rt, rt, and lowlatency are all of the distro specific kernel source, with preempt_rt being soft real-time, rt being hard real-time, and lowlatency being soft real-time with more agressive config. Vanilla and realtime are of the original linux source, with realtime being hard real-time. Anyone confused yet?
__________________
It's time to take a stand against the synthesizer. Last edited by brainwreck; 08-05-2018 at 04:26 PM. |
||
08-05-2018, 11:10 PM | #9 |
Human being with feelings
Join Date: Feb 2008
Location: Finland
Posts: 160
|
Another thing to look at is how the kernel's timer is set. Some of the basic RT-kernels that distros have were not specifically intended for pro audio. My info may be outdated, but the Ubuntu lowlatency kernels have the timer set for 1000 Hz, which is needed for good low latency work, especially midi. That's one reason they were added, as the Ubuntustudio project was gaining traction. But I've see RT-kernels that use 100 Hz, and although they are full realtime preempt, the timer may be too slow for midi. In short, it's good to dig a little deeper into the kernel configuration. That's one reason the AVLinux RT kernels are good - they have been specifically configured for audio, and have the timer set accordingly.
|
08-06-2018, 09:01 AM | #10 | |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Quote:
__________________
It's time to take a stand against the synthesizer. |
|
08-06-2018, 09:45 AM | #11 |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
http://www.bandshed.net/2018/06/25/a...ixes-released/
Old AVLinux version: installed packages. https://linuxmusicians.com/viewtopic.php?p=81668#p81668 It's also a live distribution. Download it, install to USB and start/test. You can also ask GMaq (AVLinux) directly.
__________________
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW Last edited by khz; 08-06-2018 at 11:23 AM. Reason: AV Linux 2017.4.9 RT-Kernel picture |
08-06-2018, 11:16 AM | #12 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
It looks to be that AVLinux is running a customized preempt_rt kernel.
__________________
It's time to take a stand against the synthesizer. |
08-06-2018, 11:20 AM | #13 | ||
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Quote:
Quote:
So it seems that the timer frequency is the interval for scheduling interrupts or context switching.
__________________
It's time to take a stand against the synthesizer. Last edited by brainwreck; 08-06-2018 at 11:29 AM. |
||
08-06-2018, 11:35 AM | #14 |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
|
08-08-2018, 09:52 AM | #15 |
Human being with feelings
Join Date: Oct 2009
Posts: 25
|
I just recently installed my first rt kernel (4.16.18-rt9-1-rt) on my Thinkpad X220 and have experienced a big improvement over the stock Arch kernel. I can now run my RME Babyface with a buffer size of 128 without any xruns whereas I would always get xruns with the stock kernel even at 256 frames. I haven't tried to go even lower because I don't feel the need. I haven't experienced any issues with the rt kernel when doing non audio computing.
And since I'm at it, disabling wifi has been the single most effective tweak to get fewer xruns independent from the kernel, even though it's not sharing any interrupts and all priorities are set as they should be. So I would suggest: try an rt kernel (or use a distro that has one installed already) |
08-08-2018, 10:25 AM | #16 |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
:-D
Disabling unnecessary services (for example WIFI) makes sense, yes. My tip: Some (which makes sense for you) of it (no matter which distribution you use): "Linux Audio Workstation LAW" (see signature). Must have: the limits.conf entry. "rtirq", "realTimeConfigQuickScan" and "shm" next to the RT Kernel and ... :-) HF
__________________
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW Last edited by khz; 08-08-2018 at 10:30 AM. |
08-08-2018, 10:50 AM | #17 | |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Quote:
It would be great to be able to switch all these things through a script for 'daw' mode and 'general use' mode. But I don't know if that is possible (including bios settings).
__________________
It's time to take a stand against the synthesizer. |
|
08-08-2018, 12:07 PM | #18 | |||||
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
Quote:
Quote:
Quote:
Code:
perl -I ./ ./realTimeConfigQuickScan.pl Quote:
Code:
== GUI-enabled checks == Checking if you are root... no - good Checking filesystem 'noatime' parameter... 4.9.0 kernel - good (relatime is default since 2.6.30) Checking CPU Governors... CPU 0: 'powersave' CPU 1: 'powersave' CPU 2: 'powersave' CPU 3: 'powersave' - not good Set CPU Governors to 'performance' with 'cpufreq-set -c <cpunr> -g performance' See also: http://linuxmusicians.com/viewtopic.php?f=27&t=844 Checking swappiness... 10 - good Checking for resource-intensive background processes... none found - good Checking checking sysctl inotify max_user_watches... < 524288 - not good increase max_user_watches by adding 'fs.inotify.max_user_watches = 524288' to /etc/sysctl.conf and rebooting For more information, see http://wiki.linuxaudio.org/wiki/system_configuration#sysctlconf Checking access to the high precision event timer... readable - good Checking access to the real-time clock... readable - good Checking whether you're in the 'audio' group... yes - good Checking for multiple 'audio' groups... no - good Checking the ability to prioritize processes with chrt... yes - good Checking kernel support for high resolution timers... found - good Kernel with Real-Time Preemption... found - good Checking if kernel system timer is high-resolution... found - good Checking kernel support for tickless timer... found - good == Other checks == Checking filesystem types... ok. not found. ** Warning: no tmpfs partition mounted on /tmp For more information, see: - http://wiki.linuxaudio.org/wiki/system_configuration#tmpfs - http://lowlatency.linuxaudio.org ** Set $SOUND_CARD_IRQ to the IRQ of your soundcard to enable more checks. Find your sound card's IRQ by looking at '/proc/interrupts' and lspci. # http://fluxbox.org/ ;-) Quote:
Changing over bios automatically is not possible. IMHO But it's not necessary. IMHO I have been using a computer, a distribution for: Music, Internet, Video, Graphics, ... . Games and such areas would be different, other special optimizations.
__________________
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW Last edited by khz; 08-08-2018 at 12:26 PM. |
|||||
08-08-2018, 01:32 PM | #19 |
Human being with feelings
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,922
|
I've kept away from this thread as it was just too hot to think
FWIW, this seems incredibly complicated if you google it. A prime example of how times have moved on, and what to be useful advice starts to become just jumbled information, confusing, and sometimes outright wrong.. The RT kernel and the RT patch are the same thing. In the interest of brevity I'm gonna play a little loose with the facts There are different scheduler models in Linux, this means different ways of switching between running programs. Unfortunately we can't change this at run time, so it has to be decided when the kernel gets built. Reaper will work with any kernel, but if you are interested in low latency audio with no dropouts there are two scheduler models that come into question. The kernels are colloquially known as either a lowlatency, or a realtime kernel. The only relevant difference is that the realtime kernel is slightly faster at scheduling (switching to another thread), but on some systems it might also be contra indicated (heresay, but for instance it also needs patching for nvidia) :S If you have 1.5ms to finish processing your audio, and it takes the kernel 3ms to schedule your work, you'll get an audio dropout. There are other kernel configuration options that are also important for low latency audio, like high resolution timers, dynamic ticks, etc. Hopefully your distro does a good job at making a kernel suitable for low latency audio. A system might have problems with low latency scheduling due to many different problems, ranging from bad hardware/drivers to the BIOS stopping the processor to run it's own code.. Sometimes blacklisting a kernel module (driver) can help, WIFI is a common candidate.. On my haswell laptop I exchanged the broadcom wifi/bt card with an intel and things got a lot better There are a few more practical things to attend to. Like running the soundcard and the audio thread at a high priority, being able to lock memory, disable CPU powersave (on some systems), etc. I have a vacation coming up and I my plan is to work a bit at the wiki (see below), if you guys haven't read it, a lot of this stuff is already explained there..
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc. :) |
08-08-2018, 02:55 PM | #20 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Jack thanks much for the post and the info in the wiki. It seems hard to come by good info in this area, so us plebs are left digging through random muck to try and make some sense of it all.
In case you are looking for any topic suggestions for later writing, it would be good to know something about measuring any relevant system latencies and benchmarking system changes with low latency audio performance in mind. Also, any suggested reading for gaining a better understanding of the kernel in general would be welcome.
__________________
It's time to take a stand against the synthesizer. Last edited by brainwreck; 08-08-2018 at 03:01 PM. |
08-08-2018, 10:48 PM | #21 |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
LAC2011: Configuring your system for low-latency real-time audio processing
https://www.youtube.com/watch?v=2Oim2BIhamc # http://lac.linuxaudio.org/2011/downl..._workshop1.pdf # http://lac.linuxaudio.org/2011/downl...ier_slides.pdf /AutoStatic # https://linuxmusicians.com/ |
08-09-2018, 11:45 PM | #22 |
Human being with feelings
Join Date: Jul 2013
Location: Napoli
Posts: 50
|
Hi i used kernnel rt liquorix 4.9.76 on avlinux64 release 06/2018 on all programs for audio production and work perfect on my hp elite 8200 i3 processor quad core 3100 ghz and 16 giga ram. Reaper 5.9 for gnu linux work perfect
https://imgur.com/ox8Mwwo
__________________
reaper 6.4.3 windows 10 - gnu linux (Mx Linux 21 debian bullseye based) http://gennargiu.altervista.org/?doi...33752441406250 |
Thread Tools | |
Display Modes | |
|
|