<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">porl sheean</b> <<a href="mailto:porl42@gmail.com">porl42@gmail.com</a>><br>Date: 16 Oct 2007 12:33<br>Subject: Re: [LAU] difference between realtime-kernel and low-latency-kernel?
<br>To: Fernando Lopez-Lezcano <<a href="mailto:nando@ccrma.stanford.edu">nando@ccrma.stanford.edu</a>><br><br></span>i think a few people have missed what i mean. after re-reading my post i can see it wasn't all that clear. i am still using ubuntustudio, but i downloaded the 64studio *kernel* (not the whole distribution, which i tried but it wasn't quite what i wanted) to replace ubuntu's. after doing that, everything runs perfectly. i assumed that the ubuntu kernel didn't have the rt patches set right, but after downloading a vanilla kernel and patching it myself i noticed that my custom kernel had the same problems as ubuntu's. whilst i am happy to use the 64studio kernel, i am very curious as to what they have done to it to make it work where both the ubuntu-rt and my own custom kernel both have the same symptoms (*very* unstable audio at lower than 40ms latency, and even then ardour often refuses to start plaback - jack drops it off as soon as i press play sometimes on larger projects). i did a diff of the config files from all kernels and couldn't find any notable difference that would explain it (to my limited knowledge anyway), so i assume it is a patch that 64studio has applied in addition to the standard rt patch that is making the difference. are there any other audio performance enhancing patches for the kernel?
<br><br>thanks porl<div><span class="e" id="q_115a6a8e96083356_1"><br><br><br><div><span class="gmail_quote">On 16/10/2007, <b class="gmail_sendername">Fernando Lopez-Lezcano</b> <<a href="mailto:nando@ccrma.stanford.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
nando@ccrma.stanford.edu</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Sun, 2007-10-14 at 12:48 +1000, porl sheean wrote:<br>> i have actually had no end of trouble with ubuntustudio's (and now
<br>> ubuntu's) rt kernel. on an amd 6000+ system with 1gig ram and a<br>> rme9652 soundcard i can't get reliable performance under 40 or so ms.<br>> i even tried a vanilla kernel with the rt patches and had the same
<br>> trouble. the 64studio kernel worked fine, however. i'm currently<br>> running at 5ms with it and have had no problems. this is even with<br>> compiz fusion running and spinning the cube whilst playing back audio
<br>> from an 18 channel ardour project. what patches would cause such a<br>> difference in performance? it isn't any options selected in 'make<br>> menuconfig' - i loaded the 64studio's ones in and used them. still no
<br>> luck. i can only assume they have added more patches to do with<br>> realtime performance than just the -rt patchset.<br><br>>From what I gather ubuntustudio does not have an rt patched kernel (ie:<br>patched with Ingo Molnar's realtime preemption patch). See observations
<br>below:<br><br>> On 05/10/2007, thomas fisher <<a href="mailto:studio1@commspeed.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">studio1@commspeed.net</a>> wrote:<br>> I can supply no quantifications for the 32 bit
2.6.20-16-realtime<br>> kernel in ubuntustudio other than no xruns have been observed.
<br><br>So, Ubuntu Studio has a kernel named realtime and they have observed no<br>xruns (which is not your case, and not the case of other posters).<br>Obviously it depends on how they test (hardware used, size of buffers,
<br>load on the machine under test, etc, etc) and there's no info on that<br>post about that.<br><br>> With the low latency kernel, xruns were observed.<br><br>This implies they don't have the low latency patches applied and that,
<br>in their experience, the low latency patch was worse than the mainline<br>kernel.<br><br>If you have access to that kernel and you can check its build<br>configuration you could grep for "PREEMPT" there and post the results.
<br>That will definitely tell us which options were used for building it (I<br>suspect you will find just "PREEMPT_VOLUNTARY" there).<br><br>In my experience, a mainline kernel will lead to xruns at low latencies
<br>(there's always an exception, of course).<br><br>> Jack is the only app that has a -20 priority assigned.<br><br>This implies they are not using SCHED_FIFO for running Jack. Apparently<br>they are boosting the normal scheduler ring priority of Jack to -20. I
<br>have not experimented with this so I can't comment, except to say that<br>everyone else (that I know of) is using SCHED_FIFO for running Jack -<br>SCHED_FIFO is a higher priority scheduling method that can't be
<br>preempted by regular linux tasks, and while it is more risky as a badly<br>designed application can hang the machine, the tradeoff is of course<br>much better realtime performance.<br><br>> The general workstation has been running without fault. The general
<br>> Debian / Ubuntu philosophy tends towards system stability.<br><br>The realtime preemption patch is certainly less stable than the mainline<br>kernel. But if you hardware runs it fine then it is more effective than
<br>mainline for achieving low latencies.<br><br>-- Fernando<br><br><br>> Tom<br>> On Wednesday 03 October 2007 14:54:32 Fernando Lopez-Lezcano<br>> wrote:<br>> > On Wed, 2007-10-03 at 18:39 +0200, Frank Barknecht wrote:
<br>> > > Hallo,<br>> > ><br>> > > Matthias Schönborn hat gesagt: // Matthias Schönborn<br>> wrote:<br>> > > > I've just read that there's a difference between a
<br>> realtime-kernel and<br>> > > > the low-latency-kernel provided by ubuntustudio. The<br>> text in the german<br>> > > > wiki on <a href="http://ubuntuusers.de" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ubuntuusers.de</a> said, that a realtime-kernel is<br>> slightly better<br>> > > > than the lowlatencykernel<br>> ( <a href="http://wiki.ubuntuusers.de/Echtzeitkernel" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://wiki.ubuntuusers.de/Echtzeitkernel
</a>) -<br>> > > > then why isn't it used in ubuntustudio? Or do I just mix<br>> something up?<br>> > ><br>> > > I think, this wiki and maybe Ubuntustudio as well are
<br>> using a very<br>> > > confusing terminology.<br>> > ><br>> > > Generally we have two kinds of kernels: The "vanilla"<br>> kernel as
<br>
> > > downloadable on <a href="http://kernel.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">kernel.org</a> and the same kernel, but<br>> patched with Ingo<br>> > > Molnars RT-patches. The vanilla kernel, if configured
<br>
> properly with<br>> > > CONFIG_PREEMPT etc., already gives very good performance<br>> in the low<br>> > > latency department, enough for many users, even audio<br>
> users. I run one
<br>> > > of these.<br>> > ><br>> > > If you want more, then you can install a RT-patched<br>> kernel, as is<br>> > > provided in the linux-rt or linux-realtime packages. I
<br>> would call the<br>> > > Ingo-Molnar-patched kernels Realtime-Kernels or<br>> Low-Latency-Kernels.<br>> ><br>> > To further clarify (or confuse?) the issue, how "low
<br>> latency" the kernel<br>> > is also depends on how you configure the kernel build<br>> options before or<br>> > after patching the kernel with Ingo's patch. For Ingo's
<br>> patch<br>> > CONFIG_PREEMPT_RT is the best option in terms of latency but<br>> there are<br>> > others (CONFIG_PREEMPT_DESKTOP) that have a more<br>> conservative approach
<br>> > but have (relatively speaking) higher latencies. So from<br>> worst to best<br>> > it would be something like:<br>> ><br>> > vanilla linuz + CONFIG_PREEMPT_NONE
<br>> > vanilla + CONFIG_PREEMPT_VOLUNTARY (used by the stock<br>> Fedora kernel)<br>> > vanilla + Ingo + CONFIG_PREEMPT_DESKTOP<br>> > vanilla + Ingo + CONFIG_PREEMPT_RT (the one I use for
<br>> Planet CCRMA)<br>> ><br>> > (there's more granularity and options in the CONFIG_PREEMPT*<br>> world but<br>> > those are the ones that have the biggest impact as far as I
<br>> can<br>> > remember)<br>> ><br>> > -- Fernando<br>> ><br>> ><br>> > _______________________________________________<br>
> > Linux-audio-user mailing list
<br>> > <a href="mailto:Linux-audio-user@lists.linuxaudio.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Linux-audio-user@lists.linuxaudio.org</a><br>> ><br>>
<a href="http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-user</a><br>><br>><br>> _______________________________________________<br>> Linux-audio-user mailing list<br>> <a href="mailto:Linux-audio-user@lists.linuxaudio.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Linux-audio-user@lists.linuxaudio.org</a><br>> <a href="http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-user
</a><br>><br>> _______________________________________________
<br>> Linux-audio-user mailing list<br>> <a href="mailto:Linux-audio-user@lists.linuxaudio.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Linux-audio-user@lists.linuxaudio.org</a><br>>
<a href="http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user</a><br><br></blockquote></div><br>
</span></div>