help me reduce latency
Moderators: MattKingUSA, khz
help me reduce latency
Hi. I'm on a laptop with i5-4200U, 8GB of ram and the steinberg ur22mkii audio interface. If I set jack to sample rate 48000, frames/period 512 and periods/buffer 2 I have no xruns and I can play whatever I want. But with this settings the latency is unacceptable while playing with software instruments.
I also compiled linux-4.18.16-rt9 but I have noticed no difference at all. What can I change to reduce the latency?
I also compiled linux-4.18.16-rt9 but I have noticed no difference at all. What can I change to reduce the latency?
- khz
- Established Member
- Posts: 1648
- Joined: Thu Apr 17, 2008 6:29 am
- Location: German
- Has thanked: 42 times
- Been thanked: 92 times
Re: help me reduce latency
Do you have the entry in the limits.conf https://wiki.linuxaudio.org/wiki/system ... faudioconf?
The realTimeConfigQuickScan could also be helpful https://wiki.linuxaudio.org/wiki/system ... #quickscan ().
The realTimeConfigQuickScan could also be helpful https://wiki.linuxaudio.org/wiki/system ... #quickscan (
Code: Select all
Yours@LAW ~/git/realtimeconfigquickscan $ perl -I ./ ./realTimeConfigQuickScan.pl
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
- I don't care about the freedom of speech because I have nothing to say.
- bluebell
- Established Member
- Posts: 1924
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 112 times
- Been thanked: 119 times
Re: help me reduce latency
- Try a lowlatency kernel. It performs better on my machine than a realtime kernel.lyth wrote:Hi. I'm on a laptop with i5-4200U, 8GB of ram and the steinberg ur22mkii audio interface. If I set jack to sample rate 48000, frames/period 512 and periods/buffer 2 I have no xruns and I can play whatever I want. But with this settings the latency is unacceptable while playing with software instruments.
I also compiled linux-4.18.16-rt9 but I have noticed no difference at all. What can I change to reduce the latency?
- Try different USB-ports. I have machines where it matters.
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
Re: help me reduce latency
Thank you all for replying. I tried your suggestions with no luck. I've noticed that I experience xrun only when the cpu hits the 35% load. I reach that cpu load only if I'm using windows vst or plugins like TyrrelN6.
I think it may be a cpu limitation, does it make sense?
I think it may be a cpu limitation, does it make sense?
- khz
- Established Member
- Posts: 1648
- Joined: Thu Apr 17, 2008 6:29 am
- Location: German
- Has thanked: 42 times
- Been thanked: 92 times
Re: help me reduce latency
Did you set the CPU to "performance"?lyth wrote:cpu hits the 35% load
Code: Select all
cpufreq-set -c 0 -g performance
You have the entries in limits.conf? And do the realTimeConfigQuickScan. viewtopic.php?p=100147#p100147
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
- I don't care about the freedom of speech because I have nothing to say.
Re: help me reduce latency
You do have Jack setup, right? I have a more powerful computer and I normally use 44.1khz and 512 sample buffer with the low latency kernel. My latency is reported to be 11.6ms, although I might find it's a little higher if I did a loopback test, not sure. Anyway, if I want lower latency then I can lower the sample size but it will quite easily result in xruns if there's already a little bit of stuff going on in the project. In that situation I'd have to just disable some sounds while I play in my part.
Remember that plugins can cause extra latency. Try loading a blank project and see what you get. Then it might just be a case of disabling some plugins while you play. I have some really bad offenders that I always have to disable when recording.
I'm guessing you already know the next two things but I'll put them here anyway. To install the low latency kernel the command should be
Make sure to select it as your active kernel afterwards then reboot the computer. You can then type this in a terminal to see which kernel you're using
Btw, what is your reported latency via the Jack server or Cadence?
Remember that plugins can cause extra latency. Try loading a blank project and see what you get. Then it might just be a case of disabling some plugins while you play. I have some really bad offenders that I always have to disable when recording.
I'm guessing you already know the next two things but I'll put them here anyway. To install the low latency kernel the command should be
Code: Select all
sudo apt-get install linux-lowlatency
Code: Select all
uname -a
Re: help me reduce latency
Hi every one and thank you for your answers. I kinda of solve it, I had to change some parameter in the advanced section of qjackctl. this page https://help.ubuntu.com/community/HowTo ... figuration was indeed very helpful, but I had to adapt it to my situation.
Now I can play really anything and I ear crackling sound only when DSP reaches 100%, and if I check soft mode even at 100% doesn't give any xrun but only the sounds cracks.
Now the questions is, DSP is some specific part of the cpu or it depends on the audio interface? Or maybe it reaches some other limits?
When I started the thread was 21 ms, after doing what khz suggested i was able to go to 16ms, now i can play with 8ms, wich it is perfect for my use.Btw, what is your reported latency via the Jack server or Cadence?
Now I can play really anything and I ear crackling sound only when DSP reaches 100%, and if I check soft mode even at 100% doesn't give any xrun but only the sounds cracks.
Now the questions is, DSP is some specific part of the cpu or it depends on the audio interface? Or maybe it reaches some other limits?
- bluebell
- Established Member
- Posts: 1924
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 112 times
- Been thanked: 119 times
Re: help me reduce latency
It's a part of the CPU time. That part that's needed for DSP calculations. Plugins eat it.lyth wrote: Now the questions is, DSP is some specific part of the cpu or it depends on the audio interface? Or maybe it reaches some other limits?
If you user bigger buffer sizes there are less contect switches and less overhead, so you can manage to run more CPU at tha price of more latency.
If you want a perfect audio PC then go for the fastest CPU you can get. Most important for many jack applications is the single thread performance. Although jack2 can distribute the load of different clients some DAWs are a single clients (e.g. Qtractor). Most profit from many cores get modular setups. I prefer everything in one box so I choose CPUs by their single tread performance, not be their number of cores.
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/