[vfio-users] Stutter in games

Alex Williamson alex.l.williamson at gmail.com
Mon Jan 23 16:57:14 UTC 2017


On Mon, Jan 23, 2017 at 9:48 AM, Tiit Talts <itvend at gmail.com> wrote:

> QEMU 2.8+
> Kernel 4.8 @ Debian 8
>
> Guest OS: Windows 10
>
> H/W: CPU: AMD FX-8300, MB: GA-990XA-UD3, GPU: GTX 1080
>
> FPS in games are great 150+/- @ normal details, but i have periodic fps
> drops from 150 to 30-20fps when i move in game. i noticed that when i stand
> still in Battlefield 4 no fps drops everything is fine but if is start
> moving i get fps drops.
>
> Other info:
>
>
> perf kvm --host stat live
> When gaming most VM-Exits are msr and interrupt
>
>
> GRUB:
>
> BOOT_IMAGE=/vmlinuz-4.8.0-0.bpo.2-amd64 root=/dev/mapper/debian--vg-root
> ro iommu=pt amd_iommu=on
>
> /etc/modprobe.d/kvm.conf
>
> options kvm              ignore_msrs=1
> options kvm_amd          npt=0
>
> /etc/modules
>
> kvm
> kvm_amd
> vfio
> vfio_iommu_type1
> vfio_pci
> vfio_virqfd
>
> Any advice, quit VM or burn down AMD platform ?
>

Sounds like you're probably over-committing resources for the VM, not
isolating them properly.  For instance, your processor has 8-cores,
therefore you should probably limit the VM to 6-7 vCPU.  You can also use
the isolcpus boot option to make sure the VM CPUs don't get scheduled on
the host.  You could also/instead use emulator pinning in the VM xml to
make sure QEMU only runs on the host CPUs.  You could also setup irqbalance
such that host device interrupts are all affinitized to the host CPUs.
Then there's memory, read up on using hugepages for the VM.

The fact that the issue occurs when you move around makes me suspect that
it's related to loading new textures from the disk, so host I/O activity,
which would cause vmexits if those are happening on CPUs running the VM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20170123/3ce1745a/attachment.htm>


More information about the vfio-users mailing list