June 11, 20206 yr I started to use my win10 VM for afk online game farming like GTA5. Never had used the VM for gaming before, only for gpu machine learning stuff and the performance for that was fine. But for cpu intensive games, I've noticed that the performance is quite poor. For low cpu utilized games or benchmarks, the gpu performance is fine and is comparable to 980 ti review benchmarks. The system is made from old spare parts, a 4c/8t sandybridge mobile cpu 3.2ghz, 8gb ddr3, 980ti 6gb, and ssd cache for OS vdisk. The system/cpu does have working vt-d / iommu. Some caveats are that the cpu is an engineering sample (roughly equivalent to an intel 2760qm or 2820qm). The motherboard bios has proper microcode for the ES cpu. Also I rigged the 980ti to be external and with its own power supply. The gpu connects to the only pcie 16x slot (mini itx mobo) at only pcie 2.0 x4, using a pcie to m.2 adapter card and a m.2 to pcie slot 50cm riser. I made the gpu external so that I can turn off the gpu when I have VMs off and because the mini itx case has no space to fit such a large card. In terms of graphical performance, this has not been an issue as indicated above. In GTA5, the avg fps struggles to be even 40 fps at 720p low settings when online. Often it is only 30fps when driving through the city. For reference, a baremetal i7 2600k stock with the same gpu easily maintains 60fps at 1080p high settings. The 2600k stock is ~3.5ghz all cores. Monitoring my cpu frequency, it ranges between 2.9-3.1ghz all cores when playing GTA5. Gpu utilization is only 15-30%. Pcie bus utilization is under 10%, so its not choking on the limited pcie bandwidth. CPU utilization is usually 50-70%. I have passed all 4c/8t to the VM. The main cores and ht cores are properly recognized. Ive tried passing just the 4 main cores only to the VM but that didn't help. Nothing significant on unraid is running that could be taking up resources. Ram is limited as I can only allocate 6GB to the VM. In the end, I figure it could just be poor sandybridge architecture virtual performance. So next I looked at i440 vs q35. The original VM I setup as i440 v3.1 OMVF. Had issues in the past getting q35 just to boot, but finally figured it out. I spun up a new VM using q35 4.2 and with a fresh win10 install. Q35 definitely felt snappier and GTA5 benchmarks were noticeably better than i440 VM. I updated the i440 to 4.2 and updated the virtio drivers, but that didn't improve performance. The OS vdisks are both on the same ssd cache drive, and the game install is using the same vdisk from unassigned device hard drive. Everything is mostly identical between the two VMs, except i440 is win10 1909, and q35 is win10 2004. Here are the benchmark results between the two at 720p low settings: Q35: Frames Per Second (Higher is better) Min, Max, Avg Pass 0, 6.083806, 92.755768, 70.928749 Pass 1, 38.062321, 123.438507, 89.306267 Pass 2, 37.336281, 135.876953, 86.687500 Pass 3, 36.661327, 114.695999, 84.057823 Pass 4, 21.455866, 142.184814, 80.043892 Frames under 16ms (for 60fps): Pass 0: 536/656 frames (81.71%) Pass 1: 811/831 frames (97.59%) Pass 2: 767/798 frames (96.12%) Pass 3: 736/777 frames (94.72%) Pass 4: 6723/8590 frames (78.27%) i440: Frames Per Second (Higher is better) Min, Max, Avg Pass 0, 14.443707, 88.500267, 64.930435 Pass 1, 39.493382, 128.247879, 84.682068 Pass 2, 19.617767, 114.792107, 80.661552 Pass 3, 28.310246, 109.051247, 78.101311 Pass 4, 14.648345, 139.142059, 69.131287 Frames under 16ms (for 60fps): Pass 0: 375/600 frames (62.50%) Pass 1: 734/782 frames (93.86%) Pass 2: 645/731 frames (88.24%) Pass 3: 633/719 frames (88.04%) Pass 4: 4540/7312 frames (62.09%) Now I would love to transition everything over the q35 VM. But on that VM, I've experienced a few issues. GTA5 would always eventually hang. Sometimes when GTA5 becomes unresponsive, the gpu driver would reinitialize. Most of the time GTA5 process would eventually terminate. On the i440 VM, it is completely stable. OS page file is set the same for both VMs. I looked at the event viewer or VM logs but don't see anything to indicate what could be the issue. I've tried with hyperV both on and off, and with and without the editted vbios. This is the IOMMU grp for the gpu: IOMMU group 1: [8086:0101] 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 08) [10de:17c8] 01:00.0 VGA compatible controller: NVIDIA Corporation GM200 [GeForce GTX 980 Ti] (rev a1) [10de:0fb0] 01:00.1 Audio device: NVIDIA Corporation GM200 High Definition Audio (rev a1) Is there something I should take a look at? Really appreciate any feedback into this. Thanks for reading. Edited June 11, 20206 yr by kakashisensei
June 12, 20206 yr Author Here is the VM xml for the Q35 setup: <?xml version='1.0' encoding='UTF-8'?> <domain type='kvm'> <name>Win10_Q35</name> <uuid>a0b58003-d5b9-0263-92e4-3d453985f048</uuid> <description>remake VM if switching gpu fixes blank screen</description> <metadata> <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/> </metadata> <memory unit='KiB'>6291456</memory> <currentMemory unit='KiB'>6291456</currentMemory> <memoryBacking> <nosharepages/> </memoryBacking> <vcpu placement='static'>8</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='4'/> <vcpupin vcpu='2' cpuset='1'/> <vcpupin vcpu='3' cpuset='5'/> <vcpupin vcpu='4' cpuset='2'/> <vcpupin vcpu='5' cpuset='6'/> <vcpupin vcpu='6' cpuset='3'/> <vcpupin vcpu='7' cpuset='7'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-4.2'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader> <nvram>/etc/libvirt/qemu/nvram/a0b58003-d5b9-0263-92e4-3d453985f048_VARS-pure-efi.fd</nvram> </os> <features> <acpi/> <apic/> <hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> <vendor_id state='on' value='none'/> </hyperv> </features> <cpu mode='host-passthrough' check='none'> <topology sockets='1' cores='4' threads='2'/> <cache mode='passthrough'/> </cpu> <clock offset='localtime'> <timer name='hypervclock' present='yes'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/local/sbin/qemu</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/cache/domains/Win10_Q35/vdisk1.img'/> <target dev='hdc' bus='virtio'/> <boot order='1'/> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </disk> <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source dev='/dev/disk/by-id/ata-TOSHIBA_MQ01ABD100_15FPT8K0T-part2'/> <target dev='hdd' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/isos/virtio-win-0.1.173-2.iso'/> <target dev='hdb' bus='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='1' port='0x8'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> </controller> <controller type='pci' index='2' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='2' port='0x9'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='pci' index='3' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='3' port='0xa'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='4' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='4' port='0xb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/> </controller> <controller type='pci' index='5' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='5' port='0xc'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/> </controller> <controller type='pci' index='6' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='6' port='0xd'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/> </controller> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <interface type='bridge'> <mac address='52:54:00:95:90:7c'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </interface> <serial type='pty'> <target type='isa-serial' port='0'> <model name='isa-serial'/> </target> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <channel type='unix'> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </source> <rom file='/mnt/cache/isos/vbios/my980tidumpkvmedit.rom'/> <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/> </source> <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> </hostdev> <memballoon model='none'/> </devices> </domain>
June 13, 20206 yr Author Figured out the gta5 hanging was due to it running out of virtual memory. Something with the default paging file wasn't working properly. It's working fine now. My mistake. But going back to the poor performance in general. Is there a big cpu virtualization performance penalty for sandybridge cpus?
Archived
This topic is now archived and is closed to further replies.