<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 23, 2017 at 9:48 AM, Tiit Talts <span dir="ltr"><<a href="mailto:itvend@gmail.com" target="_blank">itvend@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">QEMU 2.8+<div>Kernel 4.8 @ Debian 8</div><div><br></div><div>Guest OS: Windows 10</div><div><br></div><div>H/W: CPU: AMD FX-8300, MB: GA-990XA-UD3, GPU: GTX 1080</div><div><br></div><div>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.<br><br></div><div>Other info:<br><br><br>perf kvm --host stat live<br>When gaming most VM-Exits are msr and interrupt<br><br><br></div><div>GRUB:<br><br>BOOT_IMAGE=/vmlinuz-4.8.0-0.<wbr>bpo.2-amd64 root=/dev/mapper/debian--vg-<wbr>root ro iommu=pt amd_iommu=on<br><br></div><div>/etc/modprobe.d/kvm.conf<br><br>options kvm              ignore_msrs=1<br>options kvm_amd          npt=0<br><br></div><div>/etc/modules<br><br>kvm<br>kvm_amd<br>vfio <br>vfio_iommu_type1 <br>vfio_pci <br>vfio_virqfd<br><br></div><div>Any advice, quit VM or burn down AMD platform ?<br></div></div>
</blockquote></div><br></div><div class="gmail_extra">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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">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.</div></div>