GPU Passthrough. Guild Wars 2 30% FPS loss. Compare notes?

Hi,

I’d like to compare notes on FPS issues with GPU Passthrough (however interesting that is :slight_smile: ). I’m unsure of the bottleneck when comparing Bare-Metal windows game Guild Wars 2 with running it inside a QEMU-KVM VM with GPU Passthrough. It’s the first and only actual game tested with my GPU Passthrough. No actual error or failure stands out unless I missed something.

PC Specs:

  • Motherboard: P8Z68-V GEN3
  • NVidia GeForce GTX 970
  • SSD Samsung EVO 850
  • iGPU running Host
  • CPU: Intel i7 2600

QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.8)
Ubuntu 20.04

Passthrough: 2 PCI devices (NVidia Video + Audio).
The IOMMU group also has a PCI Bridge
(IOMMU Group 1 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port [8086:0101] (rev 09))
This is not passed through (unsure about that one).

I’ve compared:

  • Heaven (DirectX11) benchmark shows approx 112 ±2 FPS for both, so it’s roughly the same.
  • CPU-Z shows approx 371 ± 1 for both in SingleCore, so it’s roughly the same. Multi core is different (as exepcted due to 2 / 4 cores active. MultiCore is 1454 vs 1939)
  • Guild Wars 2 comparing same position in the game: Bare-Metal approx 70 FPS, VM approx 50 FPS. So about 30% FPS loss.

Optimizations:

  • Windows Guest optimizations done (Performance settings etc.)
  • Host: Hugepages active, /cpufreq/scaling_governor set to ‘Performance’. Activated Elightenments.
  • Tested: CPU Pinning (with emupin, iothreadpin for virtio-scsi, kernel params nohz_full, rcu_nocbs, except isolcpu) in different ways, only negative impacts seen on GW2 (down from approx 50 FPS to 35-45 FPS depending on the pinning).
  • Tested: Tried changing from qcow2 to img (raw) with no effect.
  • Tested: Increasing from 2 to 3 cores (6 vCPUs), no effect.
  • Tested: With or without evdev integration for mouse and keyboard. With evdev sometimes moving windows very quickly can have them trailing behind :slight_smile: but no impact on game FPS.

In windows CPU, Memory, DiskIO, Network are all very much OK in terms of resource usage while running the game.

Now … I’m guessing there is something wrong. I just don’t know any next steps. Any comments welcome. I’m suspecting something around the PCI bus integration or memory integration perhaps ?

Thanks in advance!

win10clone.txt (6.8 KB)

My answer is not related to GPU passthrough but I’ve been playing GW2 since day one and went through three PCs with it so I figured out (as much as an end user can) the ins and outs of the performance of this game: it relies very very heavly on CPU performance, especially when it comes to cache size and access time. So it’s reasonable for that game to run 30% slower in a VM, especially if you’re using a low core count CPU with not a lot of cache to work with.

If you feel like I’m OT or this comment doesen’t make sense please ask the mods to delete it.

P.S. DX9 doesen’t help with the CPU load for sure. Maybe you might see some improvements with this DX9 to DX12 mod.

3 Likes

No, thanks… I was thinking along those lines also, hence a lot of testing around CPU pinning, just wasn’t sure if -30% was reasonable to expect or not. I’m secretly hoping that someone will still point to some improvment here though! :slight_smile:

2 Likes

The DX12 mod sounds interesting. However, given the rather large performance hit overall I’ll keep dualbooting :slight_smile: Now if there was any way I could secure or isolate that … :frowning:

For completeness I can add FPS testing results from some other games:
Path of Exile: Same FPS as Bare Metal Win10
Divinity 2 (Enhanced Edition): Same FPS as Bare Metal Win10
Destiny 2: Same FPS as Bare Metal Win10
Warframe: Same FPS as Bare Metal Win10

I also did a WinSAT showing that bare metal and VM are mostly the same, one thing stands out a little is VideoMemBandwidth;
Bare-Metal: 82822.10000
VM: 72849.40000
(GPU-Z shows PCIe2.0 x16 for both)
Other values are same or better for VM.
Not sure how to troubleshoot this one further …

Not sure if it helps, but I did some quick testing with Flight Sim 2020 in and out of VM. What helped me was the in-game dev counters that showed timings to the CPU and GPU. On my hardware I was running at about 32-35 FPS and GPU timing showed 15-18ms (mid-to-upper teens). When I ran in VM, I had 28-32 FPS and 25-ish-ms on GPU timing. I generally saw about 3-5 FPS in VM and 5-10ms. In that game, I generally didn’t notice much difference in how the game feels even though I can measure the difference. I have a hunch its those timings in communicating with the GPU that’s slightly slowed down going through KVM. It works more than good enough for me so I don’t bother with extra tweaking.

1 Like