Sluggish Performance on VM

So I have been having very sluggish performance with my VM as of late. Basically, my windows vm feels very sluggish whenever I move around window when I run a latency monitor application I get spikes of latency (some as high as 1 second). Not sure what the problem is as I believe I have optimized everything.

Steps I have taken to fix the stutters (none of them removed the stutters):
Removed Pulseaudio and using a sound card that is passed through to the VM directly.
Enabled MSI mode for all devices that support it.
Pinned CPUs threads.
Statically allocate Huge Pages.
Ensured cpupower is setting the CPU to Performance

Computer Specs:
Ryzen 3900X
Asrock 570m Pro4
GTX 1080 (passed through)
GTX 750ti (reserved for linux)

VM Specs:
6 Cores 12 Threads from 3900x (dynamically pinned).
12GB with hugepages statically allocated (6144 pages with 2MB page files)
GTX 1080
directly passed through 250gb SSD
2TB VM images for Games

VM XML File:

I would appreciate any assistance.

Nothing in your XML that seems completely wrong.

Can you explain what these lines do:

    <qemu:arg value='-cpu'/>
    <qemu:arg value='host,hv_time,kvm=off,hv_vendor_id=null,-hypervisor'/>

Also please try to change:

<emulatorpin cpuset='0,12'/>


<emulatorpin cpuset='5,17'/>

Some of Linux own threads run pinned on the first core so I wouldn’t put the emulation on them too. But it is just a wild guess, in general your configuration looks fine to me,

1 Like

The qemu:commandline was a older piece of xml that I had recycled from previous VMs (but it specifically was meant for fixing code 43 for nvidia gpus). I removed it though as it was a bit redundant. So far the emulator pining change might have helped, but I will check later. Thanks!

1 Like

It looks like that fix seems to be helping quite a bit. Not perfect but much better. Thanks!

1 Like

Glad it helped. I am unfortunately not an expert on virtualization, so I have no idea how to improve your experience further.