[vfio-users] R9 380 Performance Issues
Alexander Epp
alex at piconino.de
Tue Apr 5 17:53:39 UTC 2016
You need to pin the cores. And you should not use the ht-siblings for
the guest, but for emulator. Something like:
<vcpu placement='static'>6</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<vcpupin vcpu='1' cpuset='3'/>
<vcpupin vcpu='2' cpuset='4'/>
<vcpupin vcpu='3' cpuset='5'/>
<vcpupin vcpu='4' cpuset='6'/>
<vcpupin vcpu='5' cpuset='7'/>
<emulatorpin cpuset='10-15'/>
</cputune>
...
<cpu mode='host-passthrough'>
<topology sockets='1' cores='6' threads='1'/>
</cpu>
see Alex's notes at
https://www.redhat.com/archives/vfio-users/2015-September/msg00041.html
Am 04.04.2016 um 06:37 schrieb Froz --:
> Running into some issues with passing through an R9 380 (besides the usual reset
> bug). Processor's a 5960x, if that's relevant.
> First up, I'm running Arch Linux on kernel 4.4.5. For what it's worth, the
> issues occurred on the latest Fedora kernel, too.
> I'm using OVMF rather than VGA, vfio-pci only, no pci-stub. The passthrough
> itself works, using either libvirt or QEMU directly. However, I'm only seeing
> ~60% of native GPU performance running benchmarks in the VM. Other than that,
> the VM performs fine (although it takes an oddly long time to boot).
> My QEMU options are as follows:
> taskset -ac 4-15 qemu-system-x86_64 \
> -name Win10 \
> -enable-kvm \
> -nodefaults \
> -nodefconfig \
> -rtc base=localtime \
> -cpu host \
> -smp sockets=1,cores=6,threads=2 \
> -m 24756 \
> -soundhw hda \
> -serial none \
> -parallel none \
> -drive
> if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd
> \
> -drive if=virtio,format=raw,cache=none,aio=native,file=/dev/guests/win10 \
> -device vfio-pci,host=02:00.0,multifunction=on \
> -device vfio-pci,host=02:00.1 \
> -usb -device usb-host,hostbus=2,hostaddr=4 \
> -usb -device usb-host,hostbus=2,hostaddr=3
> Both the devices I'm passing through constitute a whole IOMMU group.
> dmesg doesn't bring up any errors. To be honest, I'm not sure how to begin
> deciphering this, as you can probably tell. This is the first time I've
> attempted GPU passthrough, on a new system, and after reading about the
> workarounds necessary to get nvidia cards working I figured AMD was the better
> choice. Clearly I was wrong!
> Did I make an (expensive!) mistake in purchasing a R9 380, or have other people
> had better luck? Does anyone know how to go about improving performance? I
> haven't experimented with hugepages, but the problem seems to be solely
> "graphical" in nature. CPU pinning doesn't seem to make any difference, as you'd
> expect.
>
>
>
> _______________________________________________
> vfio-users mailing list
> vfio-users at redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users
>
More information about the vfio-users
mailing list