Help! - poor gaming performance vfio/kvm/QEMU 5700xt/2700x

tldr - whenever I’m in any game , my gpu usage is always low (5700xt) as well as my 2700X cpu usage , I ran a cinebench test , and got a score of 10113 . I have tried a million and one things and really want to pull my hair out. In deus ex mankind divided on ultra settings - im stuck at 40 percent GPU utilization and and 60 percent cpu utilization and the fps tanks as soon as i start interacting with the game , going down to 20-30 , and the GPU / CPU utilization is STILL lOW. this also happens in sekiro and crysis - so its not a game specific issue. heres my xml:

from my experience with gaming VMs, i suspect the storage to be your bottleneck. virtual images tend to perform terribly for gaming. especially when compressed. try passing through an ssd and see if there’s any improvement.

via sata?

SATA, NVMe, SAS, whatever you’ve got.

made no difference :frowning:

<cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='8' threads='1'/>
 </cpu>```

May want to try something like this.

Yeah so it does seem like a disk bottleneck issue. I had something similar where any heavy disk usage (e.g. game installs) would absolutely tank performance and make the system lag and stutter every 3 to 4 seconds.

You could try assigning cores to handle the IO:

  <iothreads>1</iothreads>
  <cputune>
    <vcpupin vcpu='0' cpuset='6'/>
    <vcpupin vcpu='1' cpuset='18'/>
    <vcpupin vcpu='2' cpuset='7'/>
    <vcpupin vcpu='3' cpuset='19'/>
    <vcpupin vcpu='4' cpuset='8'/>
    <vcpupin vcpu='5' cpuset='20'/>
    <vcpupin vcpu='6' cpuset='9'/>
    <vcpupin vcpu='7' cpuset='21'/>
    <vcpupin vcpu='8' cpuset='10'/>
    <vcpupin vcpu='9' cpuset='22'/>
    <vcpupin vcpu='10' cpuset='11'/>
    <vcpupin vcpu='11' cpuset='23'/>
    <emulatorpin cpuset='0-1'/>
    <iothreadpin iothread='1' cpuset='4-5,12-17'/>
  </cputune>

And when I tried to setup mine, it complained about needing topoext so that’s what I’ve got as well:

  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='6' threads='2'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
  </cpu>

And in your disk section:

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native' iothread='1' queues='8'/>
      <source file='/mnt/OMGMEDIA/VMStorage/win10/win10data.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </disk>

I did that and the issue still persists

What does your XML look like now? Also what are your system specs?

XML: <domain type="kvm"> <name>win10</name> <uuid>5c8f01ee-c937-4444-b652-05929 - Pastebin.com

Specs:
Sapphire 5700XT (guest)
Sapphire Rx550 (host)
Asrock x370 Killer sli mobo
Ryzen 7 2700x CPU
32GB corsair Vengeance @3200mhz
120GB Kingston SSD
2TB Segate HDD

1 Like

idk what score you would have goten on bare metal nor your settings but in my experience games in general are very poorly optimized for taking advantage of your cpu.
This is the reason high cpu clocks and intel have been the king for gaming. :neutral_face:
And So you can be cpu throttled without it being very noticable. This would also lead to a low GPU utilisation.

They run flawlessly on bare metal