[solved - I hope] Audio Latency vs win10 vs unraid


41 posts in this topic Last Reply

Recommended Posts

 

I'm not sure why you need so many cpus for a Win 10 VM.  Four total cpus should be more than enough.

...

I've also read that assigning more than 4 can also cause problems.

 

Are you now meaning cpus, cores, or threads? :)

 

It's not my fault Intel makes cpus with X number of cores. Wouldn't it be stupid not to use them?

 

I've read that more than 4 cores can be trouble too. My current (stated in my above post) just uses 4 right? and 4 for emulatorpin.

 

aah.. my head is spinning.  ::)

Link to post

 

I'm not sure why you need so many cpus for a Win 10 VM.  Four total cpus should be more than enough.

...

I've also read that assigning more than 4 can also cause problems.

 

Are you now meaning cpus, cores, or threads? :)

 

It's not my fault Intel makes cpus with X number of cores. Wouldn't it be stupid not to use them?

 

I've read that more than 4 cores can be trouble too. My current (stated in my above post) just uses 4 right? and 4 for emulatorpin.

 

aah.. my head is spinning.  ::)

 

What cpus refer to are logical cpus and not cores.  When talking about hyperthreaded processors, you just talk about logical cpus (two logical cpus to a core).  You can't talk about cores when working with VM assignment.

 

You have assigned 4 cpus to your VM, but if you also assign the other four pairs, you get a total of 8 cpus.

 

I would assign:

 

Win 10 VM 4,5,10,11

 

and isolate 4,5,10,11

 

emulator pin remaining cpus 0,1,2,3,6,7,8,9

 

I think this will give your Win 10 VM more than enough processing power.  You would only add more cpus if the Task Manager shows 100% processor use a lot.  By isolating the cpus and assigning them like this, you should should reduce latency and not see any sound issues.

 

Assign the ubuntu VM to any cpus but 4,5,10,11.  I would only assign two cpus to ubuntu and see if it is providing enough processing power.  If not then assign a few more.  Unless it is also latency sensitive, you don't need to isolate cpus for its use.

 

Keep in mind that the cpus are also used by Linux for io, unRAID, and Dockers so you want to leave cpus for those purposes. 

Link to post

Ok. More testing done.

 

I'm now running your recommended setup:

 

Win 10 VM 4,5,10,11

isolated 4,5,10,11

emulator pin remaining cpus 0,1,2,3,6,7,8,9

 

and everything hooked in MSI_util

 

Improvements in LatencyMon, no difference in audio...

Even windows sound can't be played without glitches.

 

 

LatencyMon and dpclat shows very few peaks now. Something like 1 pr. minute.

 

But sound is bad as ever. Constant skipping/popping noise.

Link to post

Ok. More testing done.

 

I'm now running your recommended setup:

 

Win 10 VM 4,5,10,11

isolated 4,5,10,11

emulator pin remaining cpus 0,1,2,3,6,7,8,9

 

and everything hooked in MSI_util

 

Improvements in LatencyMon, no difference in audio...

Even windows sound can't be played without glitches.

 

 

LatencyMon and dpclat shows very few peaks now. Something like 1 pr. minute.

 

But sound is bad as ever. Constant skipping/popping noise.

 

Try this:

 

So i guess you are gaining some.

 

Try this:

emulator pin cpus 0,6

 

What is your sound?  HDMI?

 

What other VMs are running? 

Link to post

I'm currently just running the win10 VM.

 

My soundcard is the Focusrite Scarlett 2i4 USB interface.

 

(I'm doing occasional home recording. Well, not at the moment... )

 

I will try the built in audiointerface now and report back.

 

Edit:

Now listening through headphones connected to the back of my computer: No issues with sound, what so ever.

 

Soo... USB passthrough issue? Focusrite issue?

I must find someone that as a different USB interface and try that to see if it fails too. Irritating!

Link to post

I'm currently just running the win10 VM.

 

My soundcard is the Focusrite Scarlett 2i4 USB interface.

 

(I'm doing occasional home recording. Well, not at the moment... )

 

I will try the built in audiointerface now and report back.

 

Edit:

Now listening through headphones connected to the back of my computer: No issues with sound, what so ever.

 

Soo... USB passthrough issue? Focusrite issue?

I must find someone that as a different USB interface and try that to see if it fails too. Irritating!

If you want to use a USB soundcard in a VM you NEED to pass through a USB controller for it to perform without glitches/pops. I have done this with a Roland Quad-Capture and my NAD USB DAC and have no problems now.

I guess the USB pass through part of QEMU isn't polished enough for USB audio, especially HQ sound.

Link to post

I pass through the usb controller to the win10 VM.

 

Maybe I pass through a USB3 controller, and the audio interface doesn't like it.

 

I have to figure out what ports are usb2. (I suspect all are USB2/3 compatible).

 

I have tried connecting it to different ports, all of them passed through.

 

Main board is ASUS X99-A, Socket 2011-3 as stated in my first post.

 

If I remember correctly, it has 2 USB controllers, and I passed through the one that the unraid usb stick is not attached to.

Link to post

Could be.

 

What happens if I pass through the focusrite directly from unraid, while it is connected to a USB controller that is also passed through?

Will it crash?

 

Must find my main board's manual. Where can it be?...

Link to post

Could be.

 

What happens if I pass through the focusrite directly from unraid, while it is connected to a USB controller that is also passed through?

Will it crash?

 

Must find my main board's manual. Where can it be?...

It will not be any better to pass through the focusrite only.

Have you checked if there are newer drivers for the USB controller? I guess windows installed some automatically?

Link to post

I have installed the latest drivers.

 

I have seen many people having issues with focusrite and win10, on bare metal, so it very well can be the drivers combined with my hardware.

 

I have now tried the following:

 

-focusrite connected to a win10 laptop: No problem

-edirol ua-25 connected to win10 laptop: No problem

 

-focusrite connected to passed through usb3 on unraid: Stutter/glitch

-edirol ua-25 connected to passed through usb3 on unraid: Stutter/glitch

-focusrite connected to passed through usb2 on unraid: Stutter/glitch

-edirol ua-25 connected to passed through usb2 on unraid: Stutter/glitch

 

- Onboard Realtek ALC1150: No problem

Link to post

Have you tried enabling MSI on the USB controller? Don't know if it will help, but doesn't hurt to try it.

 

Are you running the sound cards with minimum latency and highest bit/sampling rate?

Link to post
  • 2 months later...

After much trial and error everything now seems to be in perfect order.

 

Problem with unraid locking up on win10 VM boot solved by going beta, and now RC-version.

 

Now it runs great, without any latency, pops or cracks in the sound.

Tuning the VM XML in every way, never getting it quite there.

 

Solution: Latest Asus X99 bios update. I now even run an unmodified XML. What a bliss!

 

 

And a big thanks to everyone in this thread, and the forum in general, for advice, tips and tricks!

Link to post
  • 9 months later...

Ok, so what I posted nearly a year ago was not quite the truth.

It became much much better, but still there were some issues.

 

Yesterday I picked up a new usb mixer / soundcard. The Yamaha MG10XU.

 

A62684B3CB36480C90ABDE58C299A4B3_12001.j

This caused the audio problems to come back tenfold.

Installed the Yamaha driver, tried every usb port (both controllers), but nothing helped. Audio playback was unusable.

 

Tried a new (for me) way to pass through the USB controller, editing  the syslinux configuration with the vfio-pci.ids parameter istead of editing the VM xml-config:

append vfio-pci.ids=8086:8d31 isolcpus=4,5,10,11 initrd=/bzroot

and then selecting it in the VM-config.

 

No luck.

 

I was close to quitting the whole unraid story, but as a final test I bought a USB 3.1 PCIe controller card today.

(This: https://www.komplett.no/product/911585/datautstyr/pc-komponenter/hovedkort/tilbehoer/st-lab-usb31-gen-2-2xtype-a#)

64b18b57-b973-3ae3-1988-8e80d433e1ad.jpg

Plugged it in, connected the Yamaha, to identify it, and added it to the syslinux configuration along with the onboard controller.

append vfio-pci.ids=8086:8d31,1b21:1242 isolcpus=4,5,10,11 initrd=/bzroot

Selected it in the VM vonfig and booted up my WM again.

 

PERFECT sound! Even on very low buffer-size in ASIO-settings.

What a bliss!

 

Perfect playback, and perfect recording in Cubase.

 

OK, so it's day one, but I really think I have solved my issues this time.

 

This means:

If you have problems with corrupted sound of your USB soundcard, an external PCIe USB controller might be a cheap and easy solution.

No matter what advice I followed, it didn't completely solve my issues, just make them "livable". (isolating cores, MSI tweaking, xml-tweaking, win10 tweaking)

 

As seen in the first post of this thread, my hardware is:

 

Intel Core i7-5820K, Socket-LGA2011-3

ASUS X99-A, Socket 2011-3

ASUS DC2 OC NVIDIA GeForce GTX 970 4GB

Crucial Ballistix Sport 16GB 2400MHz DDR4 DIMM 288-pin

 

Unraid 6.3.5

Latest main board firmware (4302)

Latest virtio drivers. (0.1.126)

Link to post
  • space changed the title to [solved - I hope] Audio Latency vs win10 vs unraid

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.