poor performance of passed-through VGA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I am one of those early tinkerers with VGA passthrough. This is very exciting feature
and as soon as i saw it i thought to myself that i want that "95% speed of bare metal"
as various sources claimed. So i invested into some harware only to find out that
actual 3d performance is far lower. I am not sure why it is the case so maybe someone
could either clarify if it is known defect or something to be expected. Or if this is
actually a bug and someone someone cared enough to tackle it i would gladly be a
test-monkey.

Hardware:
Motherboard: SABERTOOTH 990FX R2.0 (bios v2104)
CPU: AMD FX(tm)-8350
GPU1 (host): GeForce GTX 550 Ti
GPU2 (guest): Radeon R9 270X
QEMU 1.7.90 (from git)

qemu command line:
> /usr/local/bin/qemu-system-x86_64 \
> -enable-kvm -m 4096 -cpu qemu64 -machine q35,accel=kvm \
> -smp 8,sockets=1,cores=8,threads=1 \
> -drive file=/dev/sdc,if=none,id=virtio-disk0,format=raw,cache=none,aio=native \
> -device virtio-blk-pci,scsi=off,drive=virtio-disk0,id=disk0 \
> -drive file=/dev/sdd,if=none,id=virtio-disk1,format=raw,cache=none,aio=native \
> -device virtio-blk-pci,scsi=off,drive=virtio-disk1,id=disk1 \
> -device e1000,netdev=vnet0,mac=40:01:23:ff:9a:00 -netdev tap,id=vnet0 \
> -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
> -device vfio-pci,host=06:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
> -device vfio-pci,host=00:13.0,bus=pcie.0 \
> -device vfio-pci,host=00:13.2,bus=pcie.0 \
> -bios /home/novist/opt/src/seabios/out/bios.bin \
> -vga none

Kernel: 3.14 with kvm patches for 3.15 (i was hoping they would make a difference but sadly they dont).
Additional kvm options: iommu=1 vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1

> 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
> 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
> 06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao XT [Radeon R9 270X]
> 06:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
Actual problem is that GPU seems to be underused. For example in passmark benchmark i
score only 15 FPS in directx9 complex test while on bare metal its 100 FPS. That is
quite a gap. With kernels prior 3.14 it was even worse - i could get only 10 FPS.

Another rather naive test i performed was checking gpu load with process hacker
while playing actual recent game (arma3 in this case). GPU utilization sits at about
20-30%, rarely 40% spikes. And it is lagy of course. Low settings make it somewhat
playable. On bare metal though very high settings run smooth. Its worth noting that
directx10/11 bencmarks of passmark perform much better than directx9 ones.

Here are benchmark results and GPU load graphs:
GPU load: http://imgur.com/M70CnIV
Benchmark: http://imgur.com/IeYh4Zc

As you see while directx11 performs at about acceptable rate (considering others preach
glorious 95% of bare metal performance) directx10 test is quite slower and directx9
performs terribly.

Not sure what other information i could provide. If there is any - i would be happy to
look it up. So any idea where this mythical "95% of bare metal performance" can be found?
Cant wait for some insight from a professional.

P.S. i am also adding 2d benchmark results if anyone cares.
GPU load: http://imgur.com/28x5DN8
Benchmark: http://imgur.com/562PJYl
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux