Stuttering GPU passthrough, or maybe CPU?


Recommended Posts

 

The path to the OVMF file can be your share. I just used /boot/config as an example.

 

It worked! ty!

Off to trying out gpu passtrough and cpu benchmarks.

 

Good luck with that. I am holding out for 6.2. Whilst I dont have any GPU performance issues, I am unable to get my Xeon 2660V3 above 4 cores in a VM. Anything above 4 and I get lag and stutter all over the place.

Link to comment

The effort to switch from SEABios to OVMF/UEFI isn't worth it, unless you want console output (as the console dies when you start a VM with SEABios).

This may change with 6.2 with the supposed UnRAID GUI on the host, but, we will wait and see what that is all about.

 

"The VGA space itself is a shared resource, so every time the guest

tries to access VGA space it gets gets trapped into QEMU, which

forwards the request to VFIO, which negotiates with the VGA arbiter and

adjusts chipset routing as necessary.  Therefore VGA mode is bearable

when there's one consumer, once you start getting contention and the

arbiter needs to switch routing on each access, this can certainly

become a bottleneck.  However, even when using a legacy BIOS with

x-vga, those VGA accesses *only* occur during early boot or if you're

using non-accelerated drivers, so the window for contention is very

small.  Once the guest is up and running, access to legacy VGA space

ceases, and there's no performance difference between legacy BIOS and

UEFI that I'm aware of."

https://www.redhat.com/archives/vfio-users/2016-February/msg00036.html

 

As for Virtio, these are the drivers you install for network, storage controller, balloon (ram), and serial.

If it was HDD related, I'd recommend updating the storage controller one. Have you ran any HDD benchmark's like Crystal, or similar?

I DO think it's CPU related, but, I was surprised to see the results I did with latency when doing that test.

You can update the ones with the red arrow by the normal way you update Windows drivers, just pick the version of Virtio you plan to test from the fedora site (don't have link at moment, the VM add page links to it).

virtio-update.png.fdf96db720c84ad50f68810e3ce069e4.png

Link to comment

I installed ethernet from a virtio iso and i used it when i added a driver at install to get my win10 to recognize the vdisk, is there something else you can do with it?

 

Since you asked this, did you follow the directions from here when doing the install (the order supposedly matters, but I doubt the order would cause your issues!)?

http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Installing_a_Windows_VM

Link to comment

I have an AMD setup with a Win10 VM that I use for gaming and Plex etc. Initially I had issues with stuttering audio and low frame rates both in games and playing HD content through Plex or YouTube. Over time this sytem has been tweaked and at this point I don't have any audio stuttering and gaming is smooth with high frame rates.

 

The only thing I think I can add that may help in your case is disabling AMD cool "n" quiet so that your CPU clock rates stay at max all the time.

 

Other things that had a big positive effect were enabling MSI for the GPU and its HDMI audio, keeping cpu 0 free for the unRaid and isolating the VM cpus from unRaid.

 

 

Link to comment

I installed ethernet from a virtio iso and i used it when i added a driver at install to get my win10 to recognize the vdisk, is there something else you can do with it?

 

Since you asked this, did you follow the directions from here when doing the install (the order supposedly matters, but I doubt the order would cause your issues!)?

http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Installing_a_Windows_VM

 

I loaded only viostor driver on install and then installed the rest when windows was installed, i used version 112.

Link to comment

I have an AMD setup with a Win10 VM that I use for gaming and Plex etc. Initially I had issues with stuttering audio and low frame rates both in games and playing HD content through Plex or YouTube. Over time this sytem has been tweaked and at this point I don't have any audio stuttering and gaming is smooth with high frame rates.

 

The only thing I think I can add that may help in your case is disabling AMD cool "n" quiet so that your CPU clock rates stay at max all the time.

 

Other things that had a big positive effect were enabling MSI for the GPU and its HDMI audio, keeping cpu 0 free for the unRaid and isolating the VM cpus from unRaid.

 

Sounds promising, I will try that, have to look into what MSI is though, dont know what that is rly.

What cpu are u running in your AMD system?

Link to comment

I installed ethernet from a virtio iso and i used it when i added a driver at install to get my win10 to recognize the vdisk, is there something else you can do with it?

 

Since you asked this, did you follow the directions from here when doing the install (the order supposedly matters, but I doubt the order would cause your issues!)?

http://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Installing_a_Windows_VM

 

I loaded only viostor driver on install and then installed the rest when windows was installed, i used version 112.

 

You should fix this, go into the device manager and install what is likely missing.

 

As for MSI interrupt, use this utility, run as administrator, select the GPU and audio device, save, close, reboot.

http://www.mediafire.com/download/hr...i/MSI_util.zip (if the link doesn't work I'll send it to you once I'm home).

Edit: Attached to my post here https://lime-technology.com/forum/index.php?topic=46264.msg442915#msg442915

 

You can also do this the manual, long, pain in the ass way here

http://lime-technology.com/wiki/index.php/UnRAID_6/VM_Guest_Support

Towards the bottom in the section Enable MSI for Interrupts to Fix HDMI Audio Support

  • Upvote 1
Link to comment

Disabled cool "n" quiet in bios, made sure i had the latest virtio drivers with no unknown/other devices in device manager (everything updated) and downloaded the tool "MSI_util" my GPU was already checked but i made sure to check my hdmi audio and integrated audio. Restarted computer and tested GW2 again, still getting the same problems, it does seem to run slightly better then b4 all the tweaks i have been doing the past few days, but its is not nearly close to bare metal.

Link to comment
  • 2 months later...

I have the same problem (stuttering and low FPS compared to baremetal), and im using an 7950 and also tested with an 6850. Tested this with Unraid 6.1.8, 6.1.9, 6.2 beta 20 and beta 21.

 

This may be off topic but i was wondering wich drivers from AMD are you using ? I am having trouble installing the new drivers i can only install 15.7.1 or lower. Installing newer drivers result in an bluescreen... something with atikmdag.sys. I was just wondering if you experiance the same problem since you are also using an amd/ati  card.

 

My Setup:

 

CPU: AMD FX6100

GPU: AMD 7950

RAM: DDR3 24GB

Motherboard: Asrock 970 extreme 4

 

 

Link to comment

I have the same problem (stuttering and low FPS compared to baremetal), and im using an 7950 and also tested with an 6850. Tested this with Unraid 6.1.8, 6.1.9, 6.2 beta 20 and beta 21.

 

This may be off topic but i was wondering wich drivers from AMD are you using ? I am having trouble installing the new drivers i can only install 15.7.1 or lower. Installing newer drivers result in an bluescreen... something with atikmdag.sys. I was just wondering if you experiance the same problem since you are also using an amd/ati  card.

 

My Setup:

 

CPU: AMD FX6100

GPU: AMD 7950

RAM: DDR3 24GB

Motherboard: Asrock 970 extreme 4

 

I used the latest drivers and i have also tried the ones that windows 10 downloads by default when first booting.

However i have put unRAID on ice until this is fixed or i get another gpu.

 

Edit: The latest at the time ofc since i have not tried unRAID since then.

Link to comment
  • 3 years later...

I realize this is YEARS later, but in case it helps someone else... in my case (debian host, win10 guest + Nvidia GTX 1650 GPU passthrough), setting cache=unsafe for the disk drives gave me a smooth experience. It was actually the disk cache causing stuttering. The stuttering was barely noticeable when I turned off passthrough and used VNC instead, so I assumed it was GPU related. However, the resolution shows that GPU passthrough was just causing more context switches for interrupt handling, or some other load, so that the existing level of disk accesses became problematic. I also configured MSI based interrupts via the registry and I believe it also required installing the Nvidia Control Panel, i.e. not the minimalist install.

 

Anyway, here's my example for adding a drive in qemu: "qemu-system-x86_64 -drive id=mydisk,cache=unsafe,format=raw,discard=unmap,detect-zeroes=unmap,file=/some/path [etc etc etc]"

Similar settings exist for virsh, etc.

  • Like 1
Link to comment
  • 7 months later...
On 11/16/2019 at 3:25 AM, evo85 said:

I realize this is YEARS later, but in case it helps someone else... in my case (debian host, win10 guest + Nvidia GTX 1650 GPU passthrough), setting cache=unsafe for the disk drives gave me a smooth experience. It was actually the disk cache causing stuttering. The stuttering was barely noticeable when I turned off passthrough and used VNC instead, so I assumed it was GPU related. However, the resolution shows that GPU passthrough was just causing more context switches for interrupt handling, or some other load, so that the existing level of disk accesses became problematic. I also configured MSI based interrupts via the registry and I believe it also required installing the Nvidia Control Panel, i.e. not the minimalist install.

 

Anyway, here's my example for adding a drive in qemu: "qemu-system-x86_64 -drive id=mydisk,cache=unsafe,format=raw,discard=unmap,detect-zeroes=unmap,file=/some/path [etc etc etc]"

Similar settings exist for virsh, etc.

I am also getting this issue when playing Divinity Original Sin Enhanced Edition

2950x on the 6.9 beta, two nvme raid 0 for cache, windows 10 vm on cache, nothing else on server (not even Krusader), nothing added to vm aside from graphics driver and steam for DOS:ee install

 

Scrolling is very choppy, I have tried CPU pinning, the tweaks suggested here on the vdisk, nothing helps. Also have tried various combinations of cores and pins. VM has 7 cores and a 1080ti passthrough. So should have enough grunt for this game

 

Issue happens on grim dawn as well :( so its not specific to the game

Please help - this issue is really annoying and is stopping me from using 2950x for gaming

vm xml attached

 

 

 

 

 

vm.xml

Link to comment
  • 2 months later...

hi all.

This may really help...

so I got my second gpu today. took all day (and a week prior learning VMs which no doubt helped - before my 710 gt came today as my primary (linux card)

i have a 2080ti on my vm  and it was exciting to see it working but it started to lag as described here.

 

I figured I'd be spending hours. First thing I tried pretty much (after the hard drive thing suggest above didnt even boot) was add 'input device' and added usb keyboard and mouse whilst the vm was already mid game. Immediately it just stopped. 3 minutes smooth so far (it usually lags every 5 seconds ALL the time)

 

Good luck and let me know if this helped!

 

Link to comment

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.