[expyezp] kernel de baja latencia

Juan I Reyes juanig at Maginvent.ORG
Mon Mar 12 10:27:24 PDT 2007


Fernando Lopez-Lezcano mandó un email que creo puede resolver dudas en
referencia a los Kernels de baja latencia.

On Sun, 2007-03-11 at 19:16 -0700, Fernando Lopez-Lezcano wrote:

The stock Fedora Core kernel is usable if you don't have requirements
for low latency (ie: if you are not working, for example, with
instruments you want to trigger in realtime). Probably running Jack with
the default 1024 frame buffers is going to work (at least most of the
time) but that translates into a roundtrip latency of about 42mSec at
48KHz, hardly "realtime". If you want the best realtime performance it
is not going to be enough. Which means you will get xruns if you use it,
more or less of them depending on your hardware and sofware

The Planet CCRMA kernel is stock linus plus Ingo Molnar's realtime
preemption patches configured with PREEMPT_RT, which offers the best low
latency performance but might still suffer from problems in specific
hardware configurations - there's a lot of broken hardware out there and
in some cases you may not be able to boot or may have to, for example,
turn off acpi, but that has not happened to me lately in my limited

So, for low latency you should use that (either from the Planet CCRMA
repo or directly from Ingo's repo). 

The Planet CCRMA core packages add a few things other than the kernel.
The realtime preemption patch splits the interrupt request handling in
two parts, the lower half of them running at SCHED_FIFO priority. For
best performance you should tune your interrupt scheduling priority so
that your soundcard (and related hardware) has the highest, Jack itself
is in between, and the rest of the interrupts are below Jack in priority
(it is more complicated than that but you get the idea). For that Planet
CCRMA adds the "rtirq" startup service (by Rui Nuno Capella) that tunes
the interrupts at boot time. In addition the Jack package in Planet
CCRMA tweaks jackd to run with a basic priority of 60, which fits with
the realtime preemption patch defaults and the tuning done by rtirq.
This won't make a difference if you boot into the Fedora kernel but
tunes the realtime preemption system for best performance. 

Last but not least, if you want to run jackd with realtime priority (the
only sensible way to run it in either kernel) as a non root user you
need to tweak /etc/security/limits.conf. Planet CCRMA includes a patched
pam that automatically grants all users permission to lock memory and
use SCHED_FIFO (and, of course, DOS the machine if they want to :-). 

That's about it, I think. 

As of a few days ago you can install the whole sheebang (if you are
pointing to the Planet CCRMA repo) on i386[*] with "yum install

Hope this helps clarify things a bit more...
-- Fernando

[*] I still have to do pam packages for x86_64, other than that it
installs as well. 

More information about the Expyezp mailing list