Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Linux

Reply
 
Thread Tools Display Modes
Old 08-05-2018, 10:11 AM   #1
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default 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.
brainwreck is offline   Reply With Quote
Old 08-05-2018, 10:56 AM   #2
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

After a little more reading: Are actual realtime kernels still being maintained/developed today?
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 08-05-2018, 11:57 AM   #3
Tobbe
Human being with feelings
 
Tobbe's Avatar
 
Join Date: Sep 2009
Location: Northern Lights
Posts: 749
Default

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.
Tobbe is offline   Reply With Quote
Old 08-05-2018, 12:16 PM   #4
khz
Human being with feelings
 
Join Date: Jul 2008
Posts: 43
Default

Quote:
Originally Posted by brainwreck View Post
Anyone done any comparison testing? Any tips to share?
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:
Originally Posted by brainwreck View Post
And for those who are running a realtime kernel, have you ran into any major issues for general purpose use?
Yes. https://mirrors.edge.kernel.org/pub/...l/projects/rt/
Attached Images
File Type: jpg tb1.jpg-4-768x256.jpg (38.6 KB, 412 views)
khz is offline   Reply With Quote
Old 08-05-2018, 12:55 PM   #5
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

I'm seeing some microsecond figures in the pic at the first link. What are those measurements of? It is not round-trip audio latency or even half-trip latency. The latencies presented there are too low to be audio specific.

From a translation of that page, I see this near the end of the article:
Quote:
The numbers in Table 1 are taken from article [12]. The jitter described there can be interpreted for simplicity as (task) latency.
So then, what are the effects of task latency on audio latency in terms of milliseconds?
__________________
It's time to take a stand against the synthesizer.

Last edited by brainwreck; 08-05-2018 at 01:09 PM.
brainwreck is offline   Reply With Quote
Old 08-05-2018, 02:31 PM   #6
khz
Human being with feelings
 
Join Date: Jul 2008
Posts: 43
Default

Technically, it's too complex for me, I can't explain it. My English is also too bad. SRY
khz is offline   Reply With Quote
Old 08-05-2018, 03:21 PM   #7
shosty
Human being with feelings
 
Join Date: Aug 2015
Posts: 249
Default

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.
shosty is offline   Reply With Quote
Old 08-05-2018, 03:58 PM   #8
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

I don't know what to make of this:

Quote:
These are some simple guidelines provided to help you understand which kernel, and in which order, you should test to fit your use case.

If you do not require low latency for your system then please use the -generic kernel.

If you need a low latency system (e.g. for recording audio) then please use the -preempt kernel as a first choice. This reduces latency but doesn't sacrifice power saving features. It is available only for 64 bit systems (also called amd64).

If the -preempt kernel does not provide enough low latency for your needs (or you have an 32 bit system) then you should try the -lowlatency kernel. If the -lowlatency kernel isn't enough then you should try the -rt kernel

If the -rt kernel isn't enough stable for you then you should try the -realtime kernel

https://askubuntu.com/questions/1266...r-realtime-one
It is a 6 year old post, so maybe not all is not still relevant. But according to that, an rt kernel is different than a realtime kernel, and a low latency kernel provides lower latency than a preempt_rt kernel (which I thought was the other way around).

Anyone have a definitive source on untangling this?

Edit: Found more info here:

Quote:
Kernel Types

-generic kernel - this is the stock kernel that is provided by default in Ubuntu.

-preempt kernel - this kernel is based on the -generic kernel source tree but is built with different configurations (settings) to reduce latency. Also known as a soft real-time kernel.

-rt kernel - is based on the Ubuntu kernel source tree with Ingo Molnar maintained PREEMPT_RT patch applied to it. Also known as a hard real-time kernel.

-lowlatency kernel - very similar to the -preempt kernel and based on the -generic kernel source tree, but uses a more aggressive configuration to further reduce latency. Also known as a soft real-time kernel.

-realtime kernel - is based on the vanilla kernel source tree with Ingo Molnar maintained PREEMPT_RT patch applied to it. Also known as a hard real-time kernel.

At the moment only the first three kernels are available through official Ubuntu archives.

https://help.ubuntu.com/community/Ub...RealTimeKernel
I'm not sure how this all plays out per distro. At past points I have ran either an rt or realtime kernel (on Debian) and a preempt_rt kernel (on Arch). But that was years ago, and I only vaguely remember sorting through the naming/distinction mess back then. I have highlighted key terms here. So according to that (and some personal clarification):

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.
brainwreck is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.