Poor VM 3D performance (IOMMU GFX) and microstuttering

kgpe-d16 motherboard
opteron 6274 cpu (Two 8 core NUMA sets)
32gb ram
nvidia geforce 780 assigned to the VM (not the primary video device)
coreboot v4.5
qemu-kvm invoked via libvirt (with hyperV enlightenments enabled)
windows 10 in the VM

By any measure I should be able to play new games at high settings with good FPS (most of them can use all 16 cores of my CPU, negating the mediocre single threaded performance) however I experience low FPS, a high amount of interrupts (10-20% of the 14 cores assigned to the VM) and weird stuttering that makes NPCs spawn improperly (timer issue?). I have enabled the NUMA tune options.

It all used to work fine and I was able to max out my games but then something changed.
How come the host doesn’t inform the guest of frequency scaling? it always stays the same is that an issue? the cpu frequency in the guest is lower than the max cpu boost frequency.
Is there a method to verify proper hyperV enlightnments enablement? such as the timer? months ago I had enabled the hyperv clock and it fixed my issues however now they are back again.


According to the following IBM paper on a setup in a laboratory,


You might try pinning your cores and memory.
It makes sense to do that to enforce maximum usage and availability of cache,
If you don’t pin then it’s anyone’s guess whether the spawned thread will run on the best cpu, core and physical memory… In fact, I’d even suggest that maybe the odds aren’t with you.

I wouldn’t know if it makes any difference that your Guests are oblivious of frequency scaling on the host…
Someone would have to do some testing to see if out of norm frequency rates are reported in the Guest, assuming that the Host is running multiple active Guests, the Host is where you will read real (not virtualized) parameters.

This all assumes you’re not also doing hardware pass-through.


I forgot to mention I already pinned them :frowning: and I have hugepages. I did however mention that I am doing IOMMU-GFX with my graphics card assigned to the VM, the issue is the poor 3D performance and stuttering when I play certain games that used to work fine.

You’ll have to gather info,
Maybe one or more of these nVidia performance analysis tools might help…

For anything that might be related to Hyper-V Enlightenments, you’ll probably find ample info searching for MSDN articles… Depending on your current “deep dive” knowledge, it might take a long time to read through foundation articles before being able to focus on specifics.


Thanks. I figured it out. I noticed misses when I ran numastat again, for some reason numa tuning isn’t being applied, either I have misses or it tunes to node 1 instead of node 0.

The stuttering is gone when by luck the memory is assigned to node 0 and I don’t get misses, otherwise with the below I do.

I am trying to put half and half, 14 GB RAM split down the middle of the nodes.

Per-node process memory usage (in MBs)
PID Node 0 Node 1 Total

5929 (qemu-syste 432 9915 10347
6881 (sudo) 0 9 9

Total 432 9924 10356

<memory mode=“strict” nodeset=‘0,1’/>
<memnode cellid=“0” mode=“strict” nodeset=“0”/>
<memnode cellid=“1” mode=“strict” nodeset=“1”/>

<cpu mode=‘host-passthrough’>
<topology sockets=‘1’ cores=‘14’ threads=‘1’/>
<feature policy=‘disable’ name=‘hypervisor’/>
<pages unit=‘KiB’ size=‘4’/>
<pages unit=‘KiB’ size=‘2048’/>
<pages unit=‘KiB’ size=‘1048576’/>
<cell id=“0” cpus=“0-7” memory=“7” unit=“GiB”/>
<cell id=“1” cpus=“8-13” memory=“7” unit=“GiB”/>

(cant edit post)

In my windows VM I tune the process with

cmd.exe /C START “game” /NODE 0 /AFFINITY FF “gamename.exe” but the memory still shows up on node 1.

I am not sure what is at fault here.

This time I have

Per-node process memory usage (in MBs)
PID Node 0 Node 1 Total

7817 (qemu-syste 7249 7260 14510
8335 (sudo) 0 9 9

Total 7249 7269 14518

And thx for posting your findings and solution.

Has to be invaluable to anyone following in your steps.


Not a solution, simply an observation that NUMA memory misallocation causes the stuttering.

I still need to know why using the /NODE option in windows doesn’t properly set NUMA, the stuttering only stops if by luck things are allocated properly :frowning: I need to know how to fix.

Maybe the NUMA memory info isn’t being passed to the windows guest, I don’t know how to observe this to test.

EDIT: I used NUMA Explorer from FlounderSoft, the memory mappings are being passed so I guess this is a windows problem as I can’t assign a process to a node the way microsoft say I can.

For the /node option to work, may require a hotfix.

Am assuming you’re setting up NUMA properly, but in general the following is likely the starting page for concepts and configuration

You <may> find useful utilities to monitor, visualize and trace processes and threads in a Windows system (plus numerous other deep dive utilities) in the following free collection of utiliities


I am using windows 10 not 7, I saw that one already :frowning: I can’t use hugepages with NUMA tuned memory because the VM’s memory is being spread across both NUMA nodes instead of simply allocated per node as needed - how can I fix this? I have searched for 10 minutes I can’t find info as to why I can’t allocated hugepages on a per node basis.

I may look at this more when I have time,
But I’ve already posted at least 3 times in Windows forums my complaints about how Win8/Win10 memory allocation has changed and various tools and methods which worked up to Win7 don’t work anymore… All which have gone unanswered over the years, or at least not with a solution. There have only been comments about suggested utilities to look at, and analyze how memory is managed(Now, it’s a lot like SSD drives where memory has to go through a number of steps of de-allocation and erasure before it can be re-used).

So, there <may> not be a solution for what you’re finding.