Jump to content

[GUIDE] Optimizing Windows VMs in unRaid


m00nman

Recommended Posts

  • 1 month later...
  • 3 weeks later...
On 4/19/2024 at 8:30 PM, shpitz461 said:

Another thing to do on Windows to improve latency is turning on MSI feature for PCIe devices.

 

See here for the utility:

 

https://forums.guru3d.com/threads/windows-line-based-vs-message-signaled-based-interrupts-msi-tool.378044/

 

I've turned on all mine on and set priority to High:

 

image.thumb.png.7fe1addd0a62eee9c2f22b0b88b86ec7.png

 

This can help, when you have a dedicated GPU in passthrough mode. You are not using it correctly though (although no harm done either). You can enable MSI interrupts for devices where MSI or MSI-X is listed under supported modes. If "LineBased" is the only option under supported modes you did nothing. On every VM I checked MSI was enabled for all devices that supported it. I don't believe it's as big of a deal before as it used to be before for passthrough GPUs as vendors now support passthrough to VM for the most part and they didn't before.

 

Link to comment

'Not correctly' in what way?

 

I'm passing a 3090, MSI is enabled on the host (unraid):

Quote

Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+

Enabling MSI in Windows improved the smoothness of the experience, I'm remoting to the VM via Parsec.

Link to comment
On 4/24/2024 at 9:15 PM, shpitz461 said:

'Not correctly' in what way?

You've enabled MSI interrupts for devices that only show "LineBased". If 3090 didn't have it enabled by default, that's the only benefit. I had a different nVidia GPU passed through (1660S ?) and it had MSI enabled by default without me changing anything with new nvidia drivers. YMMV on this though, it might still be useful for the GPUs.

Link to comment
On 4/26/2024 at 1:04 AM, m00nman said:

You've enabled MSI interrupts for devices that only show "LineBased". If 3090 didn't have it enabled by default, that's the only benefit. I had a different nVidia GPU passed through (1660S ?) and it had MSI enabled by default without me changing anything with new nvidia drivers. YMMV on this though, it might still be useful for the GPUs.

 

If I'm passing through a virtual iGPU (Intel gvt-g plugin) would this setting help at all?

Edited by Linguafoeda
Link to comment
On 1/17/2024 at 8:38 AM, m00nman said:

 

Pinning is only necessary when you want to have predictable performance for a VM/container, especially under heavy load, at the expense of pinned cores just idling and doing nothing when the VM pinned to them is doing nothing.  Lettings the host's kernel distribute the load (no pinning) between unused or underutilized cores will give you better efficiency, and possibly better performance for all the VMs/containers at the expense of 0 predictability whether that particular VM that you use for, let's say, playing games will have adequate CPU utilization headroom for playing games (there are ways to assign priorities for VMs, but it's beyond the scope here). So it really depends on your use case. Enterprise solutions almost never use cpu pinning because they want to extract maximum performance for all of the VMs/containers.

Hi @m00nman, firstly thankyou so much for your original post and for all that you do, you have made this process so easy for the unexperienced. (me)

I just setup my 1st proper Win 11 gaming VM, my system has a 11700k cpu, 32gb ram, RTX 2080ti and utilising my Unraid mirrored cache nvme drives for my storage within the domains share.

 

I've done all that you have suggested including isolation of CPUs cores 4 to 7 & HT 12 to 15 (if i understand correctly 8 cores?) and 12gb of ram to the VM, my gpu is also bound to the VFIO for the VM only.

 

So as per your quoted comment, I really am starting to see the negative affects on the server itself with half the CPU being lost to the VM. It only gets used for gaming on the weekends, so i would say 10% of the time, not a lot. Its not my main gaming rig for the big AAA games so I think I'm willing to sacrifice not having the cpu cores isolated for a loss in performance.

So i have to ask what is the best way to proceed on that front? Do i just select the cores within the VM template (cpu pinning) or do I just select nothing and let unraid do its thing?

Or, Does it make sense to Isolate CPU cores 6 to 7 & HT 14 to 15 (quarter of the CPU) and pin CPU cores 4 to 5 & HT 12 to 13 that way it will leave more left over for Unraid/dockeretc.

So many options its hard to know the right path, I suppose that life in general....lol.

Any advise is much appreciated, thanks

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.

×
×
  • Create New...