[Jack-Devel] advice on xruns

Ralf Mardorf ralf.mardorf at alice-dsl.net
Sun Jul 28 09:00:28 CEST 2019

On Sun, 28 Jul 2019 06:00:32 +0200, Hermann Meyer wrote:
>Am 28.07.19 um 04:05 schrieb liebrecht at grossmann-venter.com:  
>> Anyone have an in depth treatise on xruns and how to minimize them.
>> By that I dont mean just adjusting the buffer size, I mean really
>> getting into the gears of why xruns happen and how to potentially
>> minimize them.
>> Reason I ask is that I use jack on a live music basis amd it is
>> crucial for me to get no more than 2.9ms latency.  
>What I found over the years is, there is no general rule for how to
>optimize your system. It depend deeply on your hardware.  


I agree on that. On one machine I had to unbind USB ports and to care
about which USB ports and PCI slots I used and on another machine it
doesn't matter what USB port or PCI/e slots I'm using.

It could help using a PS/2 keyboard instead of an USB keyboard.

It could help to get rid of all unneeded services. Keep in mind that
the policies of some Linux distros force to autostart everything
packages provide, that can be autostarted. Btw. you didn't mention the
operating system you are using.

It could help to not share IRQs.

It could help to use CPU frequency scaling performance governour or at
least a fixed frequency.

Ensure that the best available timer is used.

Use a real-time patched kernel, or at least boot a non-patched kernel
with threadirqs. Use the rtirq script to handle priorities.

I wouldn't boot with nopti and similar security related options, or
tweak hardware latency by the BIOS or care about swappiness or disable
watchdog etc., but you might need to disable hyper-threading or to
remove irqbalance.

Learn to take higher latency! 2.9 ms latency is ridiculous low.
For example, stay closer to the monitors to reduce the latency that is
caused by the speed of sound. Don't use digital stomp boxes in your
audio chain, they usually have a latency of around 5 ms. Usually a
round-trip latency of 5 ms or even 10 ms is no problem at all. Problems
are usually caused by latency chains. IOW if you are using a digital
effect chain, than assume around + 5 ms latency caused by each effect.

However, you did not mention what you already did, what hardware you
are using, if you are using audio and/or MIDI. Note, MIDI jitter could
be a PITA, too.


pacman -Q linux{,-rt{-cornflower,-pussytoes,,-securityink}}|cut -d\  -f2

More information about the Jackaudio mailing list