[SOLVED] GPU Passthrough Terrible Performance


Recommended Posts

Hi guys,

 

I spent the last two days trying and troubleshooting but it seems like I cannot get to the bottom of this one.

 

Unraid 6.4.0 on an HP Z220 i7 3770 with 16GB of RAM. 256 SSD Cache and 2 x 3TB HDD Data Pool.

 

Last week I got a GeForce GTX 1050Ti 4G Low Profile to give some GPU power to my Windows 10 VM and run some games. This is the only PCIe card in the system and it is installed in the PCIe x16 3.0 slot.

 

My CPU+MB has integrated graphic and I set this as primary in the bios for Unraid to use. On boot no signal is coming from the 1050 which is expected, I can see the Unraid boot sequence plugging the mobo VGA output into the monitor.

 

Added the 1050 as passthrough for both video and audio (via GUI VM configuration) to my existing VM and it all worked (almost). The VM boots and there is output to the display from the 1050 but the performance is shockingly slow. The VM is laggy and choppy and opening task manager it looks like the GPU is over-utilised even in idle?!? It also seems like the PhysX feature is missing when virtualised compared to bare metal. All latest NVidia drivers installed and the GPU gets recognised just fine.

 

So far I tried few things:

- Plugged in a drive, installed W10 on it and booted as bare metal. GPU works as expected and I get normal behaviour and performance.

- Setup a new VM from scratch, passing through the HDD to install Windows 10 on so to isolate any cache/ssd/array performance issue. Same problem as described above when virtualised with very poor GPU performance, even just moving a window on the desktop looks slow and laggy.

- Tried to pass the VBIOS of the GPU to the KVM just in case, it made no difference.

- I compared my configuration with examples found on the guides to setup VMs and passthrough and I cannot see any major difference standing out.

 

I have attached all config files from Unraid and the XML of my VM that I am using for testing. No dockers or plugin are running while I'm testing and I tried with both assigning all 4 cores (8 threads) to the VM as well as just 3 cores (with their matching thread) leaving 0/4 out for Unraid to use as preferred.

 

Am I missing something so silly that I am over-complicating my troubleshooting? I tried some search and could not find anyone with a similar problem that was not related to poor array performance (in my case no problem here, vdisks are on the cache SSD and I also tried with an unassigned drive passed through to the VM). It looks like Windows is not interfacing directly with the GPU even though it should and there is some bottleneck somewhere in the virtualisation layer.

 

Thanks!

ur1-diagnostics-20190106-1436.zip

Windows 10.txt

Capture1.PNG

Capture2.PNG

Capture.PNG

Edited by skippy
Marked topic as solved
Link to comment

Kept researching, I tried following this thread 

 and adjusted CPU pinning isolating 2 CPUs (4 threads) and assigning those to the VM.

 

This has brought no improvement to the situation.

 

<edit> I also turned off power saving from NVidia Control Panel just following some random suggestions I found on Google </edit>

 

In Task Manager, System and Desktop Window Manager processes just smash the GPU at 100% for both 3D and Copy.

 

I hope we can figure out what the problem is, I would hate to have to build a second box for unraid and convert this one to bare metal :(

 

Cheers

Edited by skippy
Added info
Link to comment

Hey Skippy,

 

Do you know what process is causing the GPU load?  I ran a gtx 1050ti on my VM for quite a while before selling it when I parted out my gaming rig and replacing it with my 1080 and didn't have problems like that.  I had a 1030 for a while that did have issues with that just due to how weak of a card it was.  If you turn on the GPU and GPU Engine categories in your process list you should be able to see what's eating your GPU:

image.png.a3924c1c1e2edd087f873ccf49e98d3d.png

 

I really haven't seen much in the way of "Poor GPU Performance" in the time that I've been working with my Unraid VM.  The GPU tends to work if you get it passed through unless its overheating and throttling although your GPU-Z screen shows its running pretty normally. 

 

Also, you said you changed the power settings for the GPU in the nvidia control panel.  Did you change the power plan to High Performance for windows too ?

 

 

Anyways, I hope you get some more suggestions from other users and you can figure out this issue.

Edited by Iciclebar
Link to comment
10 hours ago, skippy said:

In Task Manager, System and Desktop Window Manager processes just smash the GPU at 100% for both 3D and Copy

Hi Iciclebar,

Thanks for your reply, as per my previous post, the two processes I can see smashing the GPU (even though it doesn't look like running at its best anyway) are System and Desktop Window Manager and I can see both running as 3D and Copy.

 

I had high performance set in Windows on the old VM, haven't tried with the new one I created, I'll give it a go.

 

Should I also try an older driver for the GPU just in case? My feeling is that Windows is not handling the GPU the way it should when running as a VM.

Another thing that puzzles me is that, being a Gigabyte card, I tried to install the Aorus software and it works on the bare metal W10 but it crashes while opening when in the VMs. 

It's like it's passing a lot of load on the GPU. When I tried a bare metal install the GPU was sitting at 0% when idle and running the Skydiver test in 3DMark gave me around 75FPS in the combined result. When in the VM, 3DMark doesn't even load the test and hangs while loading system info.

 

Edit: I updated Unraid to 6.6.6 from 6.4.0 just in case, I'll do more testing as soon as I have time.

Edited by skippy
More info
Link to comment

Hi guys,

 

Strangely enough, updating to 6.6.6 did the trick, as soon as I booted the machine all was normal and running like a treat. I'd say 6.4.0 had something wrong.

 

I also followed all your suggestions, applied the msi fix and changed few settings here and there to optimize the VM.

 

Thank you everyone for your suggestions!

 

As a side note, can I change the topic and add (Resolved) myself or is it something only an admin can do? I tried looking for the option but I can't find it (I'm on mobile BTW).

Edited by skippy
Link to comment
  • 3 weeks later...

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.