New Hardware - Need some perspective

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: khz, MattKingUSA

grooveman
Established Member
Posts: 26
Joined: Mon Nov 30, 2009 6:30 pm

New Hardware - Need some perspective

Post by grooveman »

Hello!

I have finally bitten the bullet here, and bought new hardware. I installed KX studio on it, and everything seemed to go very smoothly. There is just one thing... it still seems like I'm getting too much latency. I didn't really skimp on anything on this build, so that surprises me. Here is what I have:

Code: Select all

8 Core i9 Coffee Lake CPU (3.6GHz, 5.0 GHz Turbo)
Gigabyte Z390 Designare LGA1151
2x Western Digital Black SN750 NVMe M.2 2280 1TB SSD  (Not RAIDed)
64 Gig of DDR4 3000
Focusrite Scarlet i1820 (first gen)
The i1820 is plugged into one of the DAC USB jacks, which allegedly reduces noise and blips.

I have installed KDE Neon as the base, and turned off all desktop effects and fanciness. Turned off everything that runs in the background, ensured noatime options were in my fstab... I ran the realtime script to check my settings -- everything is green and says "good". I'm running the low-latency kernel that ships with the distro.

For my first test, I pull up guitarix, and plug my guitar into the scarlet. I start carla to monitor my Xruns, and I'm disappointed to see that I have a few after only a couple seconds. After much testing, I find that the best I can do for my Jack settings are:

Code: Select all

Sample Rate: 4800
Frames/Period: 256
Periods/Buffer: 2
My Guitarix Rack looks like:

Code: Select all

TubeScreamer
Standard Amp Head (that is always on)
WaveShaper
Oscilloscope
Tonestack
Cabinet
Graphic EQ
Convolver

This gives me a latency of 10.7ms. I play for about 20-25 minutes without an x-run. Any further reduction of the settings will produce Xruns. So it looks like this is the best I can do. Note: I'm only running Guitarix here at this point. I will need to be running Guitrix and Ardour together, which I imagine will only increase the propensity for Xruns.

I really have no sense of perspective on this. Is 10.7ms good under these conditions? Or is it something to worry about? I can still shred pretty well without noticing it much... maybe not at all. But then, this is only a very simple load.

Is there anything I can do to push the latency down (I'd like to stay at 4800)? My cores are cool, it doesn't look like system is under any great duress... It seems like I could push it considerably harder than it is getting worked. Is there anything else I should do to squeeze more performance out of this rig? As I said before, I am using the low-latency kernel that ships with the distro... I hear people talk about "Real-time kernels"... I don't know if those terms are synonymous (low-latency vs. real-time), or if they are different animals... but there is no real-time kernel in my repos.

Please let me know if I'm being ridiculous here, or if there is more tweaking that can be done to increase performance.

Thank you very much for your input.

G

sunrat
Established Member
Posts: 80
Joined: Wed Jul 22, 2020 2:08 pm

Re: New Hardware - Need some perspective

Post by sunrat »

Try 3 periods/buffer.

grooveman
Established Member
Posts: 26
Joined: Mon Nov 30, 2009 6:30 pm

Re: New Hardware - Need some perspective

Post by grooveman »

Hi Sun.

That would add latency, not detract from it.

I've tried increasing to three, and even four, while dropping frames/period, but it still didn't work. I still got xruns. That was how I wound up where I am. I don't think the answer will be as simple as just changing these numbers... there must be some other tweak on the system elsewhere.

stanlea
Established Member
Posts: 626
Joined: Wed Apr 25, 2012 9:49 pm

Re: New Hardware - Need some perspective

Post by stanlea »

3 periods/buffer is recommended for usb audio gear

grooveman
Established Member
Posts: 26
Joined: Mon Nov 30, 2009 6:30 pm

Re: New Hardware - Need some perspective

Post by grooveman »

stanlea wrote:
Tue Nov 17, 2020 10:51 pm
3 periods/buffer is recommended for usb audio gear
hmm... I do see that there is precedent for this notion... I have tried it, and it seemed to fare worse, not better... but I guess I will dabble with it some more now that I know you do not need to use the qjackctl drop-downs.

I did find this page:
https://wiki.linuxaudio.org/wiki/list_o ... _interface

The seems to have some very specific suggestions that are in line with your (and sunrat's) suggestion. I'll give these a shot.

Thanks.

grooveman
Established Member
Posts: 26
Joined: Mon Nov 30, 2009 6:30 pm

Re: New Hardware - Need some perspective

Post by grooveman »

Well, I tried every permutation on the link I had in the post above. By far, the best results are what I mentioned before 256/2@4800 -- but I still get a few Xruns. Even though it is not a multiple of 1 and 2, guitarix seemed to tolerate it just fine.

Everything gives me xruns up to 256/3@4800. I went all the way up to 16ms (which is too slow), and I still got Xruns.

I don't know what I'm doing wrong. My hardware is really good... the realTimeConfigQuickScan.pl script tells me everything is configured properly. What am I missing here?

grooveman
Established Member
Posts: 26
Joined: Mon Nov 30, 2009 6:30 pm

Re: New Hardware - Need some perspective

Post by grooveman »

I keep scouring the Internet for insight on this.... I've disabled all the fancies from my bios, including the wifi adapter and the two gigabit nics. I truned off hyperthreading and any sort of power management or CPU scaling.

I'm now wondering if, perhaps, the M.2 hard drives I have in this system are the source of my trouble... I believe they use a PCIE bus, and perhaps that is too aggressive in polling the cpu? Not sure.

I have to get my hands on a spare SATA ssd to rule this out... but, anyone experience any trouble with the M.2 SSDs? My motherboard is a Gigabyte Z390 Designare (which has to slots on board).

Thanks.

lykwydchykyn
Established Member
Posts: 223
Joined: Tue May 20, 2014 2:01 pm
Location: Tennessee, USA
Contact:

Re: New Hardware - Need some perspective

Post by lykwydchykyn »

As I recently discovered as well, newer hardware doesn't always equal fewer XRUNs or lower latency. It took me a LOT of experimentation to get my most recent system sorted, and it turned out it was the power supply of all things (my system is a laptop). A better PSU stopped most of the XRUNs, but I still have a few.

Not that I'm saying it's the PSU in your case, my point is more that you just have to try EVERYTHING, even if it doesn't seem sensible. You never know when some piece of hardware is doing something goofy that's locking the kernel and causing an XRUN.

It's a shame we have to do this on Linux, but that's how it is sometimes.

User avatar
CrocoDuck
Established Member
Posts: 1113
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: New Hardware - Need some perspective

Post by CrocoDuck »

Hey, just wondering if you gave a spin to realtimeconfigquickscan. It can detect whether there are major gotchas for pro audio configuration in your system.]

EDIT: never mind, I somehow missed the posts above where you explicitly mention it.

grooveman
Established Member
Posts: 26
Joined: Mon Nov 30, 2009 6:30 pm

Re: New Hardware - Need some perspective

Post by grooveman »

After much hardware shuffling, I found the problem.

It does not like my graphics card. I have an Nvidia Quadro NVS 295 PCI-E 256MB GDDR3 Dual Port graphics card in there. It did not like it one bit. With that out of the picture (using the onboard cpu GPU), I can get to 2ms without any xruns.

That creates a problem for me, though. Without that card I do not have a way of getting two monitors. One monitor is just not enough for this job...

I don't know if it doesn't like THAT card, of if it doesn't like ANY card...

Anyone have any suggestions for a GPU? One that works for you without causing any problems? This is strictly an audio workstation, so I don't care about 3D graphics or compositing. I liked the Quadro I had because it had dual Display Port with no fan.

Thanks.

G

sunrat
Established Member
Posts: 80
Joined: Wed Jul 22, 2020 2:08 pm

Re: New Hardware - Need some perspective

Post by sunrat »

What driver were you using for that card? And what kernel?
I use Debian Buster with KDE and get decent performance with GTX970 and nvidia 450.x driver but it needs OpenGL set to "Performance" in Nvidia Settings specifically for Mixbus or Ardour. The new 5.9 kernel may need the latest 455.x driver which only was released a couple of days ago to perform properly. It's in experimental Debian repo but I don't know about *buntu.

lykwydchykyn
Established Member
Posts: 223
Joined: Tue May 20, 2014 2:01 pm
Location: Tennessee, USA
Contact:

Re: New Hardware - Need some perspective

Post by lykwydchykyn »

IIRC, there are some tweaks that you can do if you have an NVidia card and use the proprietary driver. (Disable vsync maybe? It's in the arch wiki, I think). I have an Nvidia on mine, and after comparing Nouveau to the proprietary driver, I went with proprietary (sorry RMS, I sold my freedom for a few less XRUNs :oops: )

grooveman
Established Member
Posts: 26
Joined: Mon Nov 30, 2009 6:30 pm

Re: New Hardware - Need some perspective

Post by grooveman »

That is interesting. I thought I was playing it safe by sticking with Nouveau. Perhaps I should try the PPA. I'm not sure what version that card likes, I'll have to look around. I'll give that a shot.

I'm using the low-latency. I think it is 5.4.x. Whatever is most current in Neon/Ubuntu.

Thanks.

G

User avatar
Loki Harfagr
Established Member
Posts: 86
Joined: Thu Aug 02, 2018 1:28 pm

Re: New Hardware - Need some perspective

Post by Loki Harfagr »

grooveman wrote:
Fri Nov 20, 2020 12:55 am
That is interesting. I thought I was playing it safe by sticking with Nouveau. Perhaps I should try the PPA. I'm not sure what version that card likes, I'll have to look around. I'll give that a shot.

I'm using the low-latency. I think it is 5.4.x. Whatever is most current in Neon/Ubuntu.

Thanks.

G
Just in case it helps to sort out that GPU affair, I happen to have an NVidia card too on my main desk and to have it correctly working while working with audio I had to ditch Nouveau and use the NVidia proprietary stuff, and then *also* add the following lines to my launcher script specific for audio work perfs elevation:

Code: Select all

	nvidia-settings -a GPUPowerMizerMode=1
	nvidia-settings -a SyncToVBlank=0
	nvidia-settings -a AllowFlipping=0
	nvidia-settings -a XVideoTextureSyncToVBlank=0
	export __GL_SYNC_TO_VBLANK=0
I don't pretend that all that stuff is actually needed since it's an accumulation of surprise "test and found" through the years ;-) so possibly some are not even effective nowadays but welle, it worked and still does so I don't repair yet :D

User avatar
sysrqer
Established Member
Posts: 2000
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: New Hardware - Need some perspective

Post by sysrqer »

grooveman wrote:
Fri Nov 20, 2020 12:55 am
That is interesting. I thought I was playing it safe by sticking with Nouveau. Perhaps I should try the PPA. I'm not sure what version that card likes, I'll have to look around. I'll give that a shot.

I'm using the low-latency. I think it is 5.4.x. Whatever is most current in Neon/Ubuntu.

Thanks.

G
I don't know if it will help your problem at all but definitely don't use Nouveau, it doesn't work very well with realtime audio processes and can lead to a whole system lockup. It is briefly and vaguely mentioned on the arch wiki - https://wiki.archlinux.org/index.php/no ... r_messages

Post Reply