Sporadic XRUNS / Linux

Official support for: bitwig.com
KVRian
1239 posts since 15 May, 2002 from Finland

Post Sat Jun 13, 2020 12:06 pm

Hijacking here the thread a bit, but is it considered a good idea to run a kernel with the Real-Time Preemption patch (since that script reports the lack of it as a problem)? At least in my case the system was actually more laggy with big projects even at low DSP loads with the low-latency than the generic kernel. I'm on Ubuntu Studio latest version. I was thinking if I should try the preemt_rt kernel? I had the impression that with the low latency kernel the system was more responsive to low latencies, but actually peformed visibly worse when a lot of different things were active inside BW, even when they did not consume a lot of CPU.

User avatar
KVRist

Topic Starter

103 posts since 7 Apr, 2018

Post Sat Jun 13, 2020 12:46 pm

The error in the script is actually not a problem. I think one has to distinguish if you want to have a low latency or run Bitwig projects with lots of VSTs. If you can live with 10-20ms latency or more I think one does not need a PREEMPT or RT kernel. But I'm not an expert ...

User avatar
KVRian
820 posts since 6 Jun, 2016 from San Marcos, Texas

Post Sat Jun 13, 2020 1:08 pm

CPU governor "performance" makes all the difference for me when DSP gets heavy.
I think it was Taika-Kim who enlightened me to that. Thanks!

User avatar
KVRist

Topic Starter

103 posts since 7 Apr, 2018

Post Sat Jun 13, 2020 1:25 pm

lunardigs wrote:
Sat Jun 13, 2020 1:08 pm
CPU governor "performance" makes all the difference for me when DSP gets heavy.
I think it was Taika-Kim who enlightened me to that. Thanks!
Yup, I set this and it makes a difference. However in my case the DSP in not heavy. What distro are you using and what kernel and audio interface? Are you using Jack, Alsa?

User avatar
KVRian
820 posts since 6 Jun, 2016 from San Marcos, Texas

Post Sat Jun 13, 2020 4:08 pm

lilith93 wrote:
Sat Jun 13, 2020 1:25 pm
lunardigs wrote:
Sat Jun 13, 2020 1:08 pm
CPU governor "performance" makes all the difference for me when DSP gets heavy.
I think it was Taika-Kim who enlightened me to that. Thanks!
Yup, I set this and it makes a difference. However in my case the DSP in not heavy. What distro are you using and what kernel and audio interface? Are you using Jack, Alsa?
Fedora, kernel 5.6.15-300.fc32; Jack + Pulseaudio. Interface, RME Fireface UFX over usb2. A weakpoint is the usb2.
What I'd like is to get an RME PCI Express card and use lightpipe to the Fireface. They're pricey, but worth it. Right now though, I don't have an available PCI slot. I'll have to wait for another build. The usb2 is fine though for what I'm doing.

KVRian
1239 posts since 15 May, 2002 from Finland

Post Sun Jun 14, 2020 12:49 am

My suggestion is to try the Ubuntu Studio live USB, JACK and everything else is already set up, you can run Bitwig right away on it. This way you don't have to make another installation. Altough it's possible that the VST is causing that, I recall Diva did that sometimes.

Yes that is my thinking too about the kernel, I don't need to redcord a band or something where I need a 5ms latency, I mostly work in the box, so I generally run a 1024 sample buffer.

About the Liquorix kernel, most of the Phoronix benchmarks gave it worse performance results than either of the standard kernels. (low latency or generic).

You can also undervolt the CPU to keep it cooler, potentially leading to better Intel boost results. In my case though the most consistent results were achieved with the boost set off. I undervolt my I7 6700 at - 150Mv and it runs cooler than before. It's worth it just for the lesser fan noise.

User avatar
KVRist

Topic Starter

103 posts since 7 Apr, 2018

Post Sun Jun 14, 2020 5:19 am

I do more testing before switching the distro, but yes... that would be my last option. The very last option is to buy a new PC with windows :D . Strange that it worked on saturday without any xruns for > 8 hours.

User avatar
KVRian
820 posts since 6 Jun, 2016 from San Marcos, Texas

Post Sun Jun 14, 2020 8:45 am

Taika-Kim wrote:
Sun Jun 14, 2020 12:49 am
My suggestion is to try the Ubuntu Studio live USB, JACK and everything else is already set up, you can run Bitwig right away on it. This way you don't have to make another installation. Altough it's possible that the VST is causing that, I recall Diva did that sometimes.

Yes that is my thinking too about the kernel, I don't need to redcord a band or something where I need a 5ms latency, I mostly work in the box, so I generally run a 1024 sample buffer.

About the Liquorix kernel, most of the Phoronix benchmarks gave it worse performance results than either of the standard kernels. (low latency or generic).

You can also undervolt the CPU to keep it cooler, potentially leading to better Intel boost results. In my case though the most consistent results were achieved with the boost set off. I undervolt my I7 6700 at - 150Mv and it runs cooler than before. It's worth it just for the lesser fan noise.
Interesting ...
Btw, what motherboard do you have?

KVRAF
8001 posts since 6 Oct, 2004

Post Sun Jun 14, 2020 1:08 pm

You could cellphone video your screen when running htop, then put the video on your computer and play it back at slow enough speed to notice something making a rare, perhaps disruptive appearance.

Use a 16part synth like zyn or yoshimi to build a cpu-crusher sound, the 'wind & surf' sound from the Folderol Collection presets, with long reverb tails could be good for playing when htop runs.

It could be you are so optimized, that some OS chores or installed software functions are having to 'muscle in' between moments of the audio stream. You could try lowering your audio priorities 10%, and see if there is change.

Plugins often snoop around, Native Instruments allow you to turn that off in settings, others are less polite, and more secretive.

A freezer that is full will cycle it's compressor rarely, as would an AC/heating sytem in a home with great insulation or in a moderate environment. Removing ethernet, shutting down wi-fi/bluetooth, getting a fanless gpu, SSDs, calling drives at 70% capacity full, turn off
any polling of cd/dvd drives by hal, fully cleaning the mobo/cards of microdust, use lightbulbs, not florescent/led

Cloud backups? A gamer in the basement/backroom? Cellphone tower nearby? Villains are many, but music will triumph :hyper:

https://www.gcaudio.com/tips-tricks/pow ... trubances/

Cheers

KVRian
1239 posts since 15 May, 2002 from Finland

Post Sun Jun 14, 2020 1:22 pm

lunardigs wrote:
Sun Jun 14, 2020 8:45 am
Interesting ...
Btw, what motherboard do you have?
I dont know actually, I have an HP Elitedesk 65W G2 Mini, I think it's some customised thing from Intel to fit that extremely small form factor.

User avatar
KVRian
820 posts since 6 Jun, 2016 from San Marcos, Texas

Post Sun Jun 14, 2020 2:25 pm

Taika-Kim wrote:
Sun Jun 14, 2020 1:22 pm
lunardigs wrote:
Sun Jun 14, 2020 8:45 am
Interesting ...
Btw, what motherboard do you have?
I dont know actually, I have an HP Elitedesk 65W G2 Mini, I think it's some customised thing from Intel to fit that extremely small form factor.
Well, if you're interested to ask Linux, you could do:

Code: Select all

sudo dmidecode -t baseboard
My guess is it'd say it's an HP motherboard, but it could reveal something else about it's origin ... If you're curious.

KVRian
1239 posts since 15 May, 2002 from Finland

Post Mon Jun 15, 2020 6:55 am

But back to the original question, and as we have a dev on board: I have seen so many of this kind of reports over the years, and always it seems they are connected to VST plugins. Is it just possible that some VSTs don't play along nicely with the audio rate modulation system, etc in Bitwig? I recall there was a manufacturer whose plugins always caused a spike like this when they woke from suspension, I think there was a thread about it somewhere?

User avatar
KVRian
820 posts since 6 Jun, 2016 from San Marcos, Texas

Post Mon Jun 15, 2020 4:41 pm

Very true ...
I'd like to know as well.

User avatar
KVRist

Topic Starter

103 posts since 7 Apr, 2018

Post Tue Jun 16, 2020 11:30 am

The tip with recording the screen is good. I did this several times using the screenrecorder and it helped a lot. I wonder though if the temporal resolution of htop is high enough to resolve these spikes.

I did some tests yesterday on a laptop, which I guess can still be optimized regarding audio.
I made the observation that sometimes when loading a site in Chromium this triggers a xruns. The same I observed on my Desktop PC.

On the laptop I also sometimes got Bitwig xruns reported in Jack, but there was nothing in the Bitwig DSP meter.

Still testing... sometimes it's working for hours without xruns, sometimes not. It's a bit mysterious.

glokraw wrote:
Sun Jun 14, 2020 1:08 pm
You could cellphone video your screen when running htop, then put the video on your computer and play it back at slow enough speed to notice something making a rare, perhaps disruptive appearance.

Use a 16part synth like zyn or yoshimi to build a cpu-crusher sound, the 'wind & surf' sound from the Folderol Collection presets, with long reverb tails could be good for playing when htop runs.

It could be you are so optimized, that some OS chores or installed software functions are having to 'muscle in' between moments of the audio stream. You could try lowering your audio priorities 10%, and see if there is change.

Plugins often snoop around, Native Instruments allow you to turn that off in settings, others are less polite, and more secretive.

A freezer that is full will cycle it's compressor rarely, as would an AC/heating sytem in a home with great insulation or in a moderate environment. Removing ethernet, shutting down wi-fi/bluetooth, getting a fanless gpu, SSDs, calling drives at 70% capacity full, turn off
any polling of cd/dvd drives by hal, fully cleaning the mobo/cards of microdust, use lightbulbs, not florescent/led

Cloud backups? A gamer in the basement/backroom? Cellphone tower nearby? Villains are many, but music will triumph :hyper:

https://www.gcaudio.com/tips-tricks/pow ... trubances/

Cheers

User avatar
KVRist

Topic Starter

103 posts since 7 Apr, 2018

Post Tue Jun 16, 2020 11:58 am

Somebody just posted a Bitwig stresstest @discord: https://www.heise.de/select/ct/2020/7/s ... k.softlink


I can run 34 instances without any xrun. The DSP and CPU load are @ 100%, but no xruns. xruns start when I add the 35 instance with 1024 samples @ 48kHz with i5 Intel Core i5-4460 Quadcore, using Jack on Debian Buster (Behringer UMC 204)

So I guess my system is optimized well and that the spikes are caused by something else.

https://i.imgur.com/9HpBKaD.png

Return to “Bitwig”