Jump to content

(SOLVED) Windows 11 VM latency issues (Baremetal GPU passthrough) - Unraid 6.11.5


Go to solution Solved by Keinden,

Recommended Posts

Issue:
Under general use (primarily programming, webseaching and gaming) there is an intermittent lag/hitch that makes the experience of running the VM a little "jank". Attached is the latency-mon report which shows as soon as it starts it says it has difficulty handling real-time audio due to dxgkrnl.sys and msmpeng.exe (which I know is windows security). Unsure how to proceed as most dxgkrnl.sys latency issues mentioned on the web says it's a RAM issue but tested all the RAM sticks independetly and together shows no errors. Running out of ideas. (Maybe it's the AMD Windows 11 jitter issue? Didn't experience when I had it booting straight to windows)


Hardware:
Processor: AMD Threadripper 3960X 24-Core CPU

    Processor Note: VM has the same pinned cores isolated (See CPU isolation/pinning images)

RAM: 64GB (4x 16GB Corsair Vengence LPX DDR4 3200MHz)

    RAM Note: 41.5GB is assigned to the Windows VM

GPU: AMD RX 6700 XT (ASRock)

    GPU Note: VBios was from here https://www.techpowerup.com/vgabios/231049/amd-rx6700xt-12288-210125-1
OS SSD: 1TB Western Digital SN570 NVMe

Passed through drives: Another 1TB Western Digital SN570 for games

(Please let me know if you need to know the array drives)

 

Running docker services in Unraid:

  • binhex-qbittorrent
  • flaresolverr
  • jacketvpn
  • lidarr
  • Plex-Media-Server
  • radarr
  • sonarr

 

Attached is the XML config of the VM. Please let me know if you need more info

 

CPU Isolation.png

CPU Pinning.png

Windows-VM-Pinning-View.png

latency-log.txt VM-Config.xml

Edited by Keinden
Adding solved as I have fixed my issue
Link to comment
  • Solution

Resolved by changing migratable from on to off!

 

From:

<cpu mode='host-passthrough' check='none' migratable='on'>

To:

<cpu mode='host-passthrough' check='none' migratable='off'>

 

I want to also add that adding an emulator pin to the cputune block improved the performance.

<cputune>
  .
  .
  .
  <emulatorpin cpuset="0,24" /> // This is the core pair.
</cputune>

 

Edited by Keinden
  • Like 1
Link to comment
  • Keinden changed the title to (SOLVED) Windows 11 VM latency issues (Baremetal GPU passthrough) - Unraid 6.11.5

I may be wrong but I think that migratable=off is not directly responsible for performance increase, but invtsc, in fact in my mac os vm I had to disable migratable to actually have invtsc active in the guest (with cpu host passtrough); it is well known that invtsc increases performance in windows vm, especially while gaming.

Edited by ghost82
Link to comment

When I used `migratable=off` it did lower my stutter enough that it was at a playable state hence why I added that detail in. However I would still advise to install Windows 11 in SCSI mode since it made the biggest difference. Note: VM drivers have to be loaded in as sata.

Link to comment
  • 7 months later...
On 5/7/2023 at 2:28 PM, Keinden said:

When I used `migratable=off` it did lower my stutter enough that it was at a playable state hence why I added that detail in. However I would still advise to install Windows 11 in SCSI mode since it made the biggest difference. Note: VM drivers have to be loaded in as sata.

Hello, can an existing VM be converted to use SCSI? Reinstalling everything would be a huge pain.

Link to comment
  • 3 months later...
On 4/30/2023 at 7:59 PM, Keinden said:

Additional input: I re-installed my Windows VM to use SCSI instead of SATA and can confirm it's butter smooth when gaming

I can't seem to install windows using SCSI Bus, it wouldn't detect the dedicated SSD Drive. I have to install using sata bus, then when I tried to change it to SCSI after installing, it just wouldn't boot.

Link to comment
12 hours ago, kbnomad said:

I can't seem to install windows using SCSI Bus, it wouldn't detect the dedicated SSD Drive. I have to install using sata bus, then when I tried to change it to SCSI after installing, it just wouldn't boot.

You need to install the virtioscsi driver in the guest before you change from sata to scsi

Link to comment
3 hours ago, SimonF said:

You need to install the virtioscsi driver in the guest before you change from sata to scsi

Gotcha. 
does it also apply if I passed through the nvme controller?

 

also just to confirm, I dont need to reinstall using scsi, and can just switch the xml from sata to scsi, right?

Link to comment
1 hour ago, kbnomad said:

Gotcha. 
does it also apply if I passed through the nvme controller?

 

also just to confirm, I dont need to reinstall using scsi, and can just switch the xml from sata to scsi, right?

Can you post the XML for the VM.  Have you passed the NVME as a PCI device?

Link to comment
5 hours ago, SimonF said:

Can you post the XML for the VM.  Have you passed the NVME as a PCI device?

Yes, I originally have passed the NVME PCIe controller for macOS but I recently just swapped the OSes and their storages, so I"m using the NVME for Win11 right now, and noticed it rather disappointing especially for Dota 2. Cyberpunk is good though. I think it stutters on Dx11 games with high CPU bound.

Also, just realized, I was asking the SCSI for my Sata SSD drive when I first posted it, not for the NVME as you don't to choose a Bus on that.

Edited by kbnomad
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...