Jump to content
James_J

Bad windows 10 VM performance with GPU on Dell PowerEdge

9 posts in this topic Last Reply

Recommended Posts

Hi, I am trying to build a gaming VM with Dell PowerEdge

 

Here is my spec

 

R730xd LFF

2 x E5-2630L v3 (total 16 cores 32 threads)

256GB RAM ( 16 * 16GB, 128GB each CPU)

1080 Ti

NVME Drive in PCIe slot

USB 3.0 in PCIe slot

 

VM Setup

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='1'>
  <name>Windows 10 2</name>
  <uuid>8188aa1b-275c-b794-56d1-c1ac11ee55fd</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>33554432</memory>
  <currentMemory unit='KiB'>33554432</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>12</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='5'/>
    <vcpupin vcpu='1' cpuset='21'/>
    <vcpupin vcpu='2' cpuset='7'/>
    <vcpupin vcpu='3' cpuset='23'/>
    <vcpupin vcpu='4' cpuset='9'/>
    <vcpupin vcpu='5' cpuset='25'/>
    <vcpupin vcpu='6' cpuset='11'/>
    <vcpupin vcpu='7' cpuset='27'/>
    <vcpupin vcpu='8' cpuset='13'/>
    <vcpupin vcpu='9' cpuset='29'/>
    <vcpupin vcpu='10' cpuset='15'/>
    <vcpupin vcpu='11' cpuset='31'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/8188aa1b-275c-b794-56d1-c1ac11ee55fd_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='6' threads='2'/>
  </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='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/nvme-KBG40ZNS256G_NVMe_TOSHIBA_256GB_59IPC3SNPSTP'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.160-1.iso'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <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'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:83:67:1f'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-1-Windows 10 2/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x82' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x82' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>

 

Unraid Setup

 

append vfio-pci.ids=1b73:1100 isolcpus=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 initrd=/bzroot

 

 

So isolated the cpus from the unraid and pinned those cpus to VM.

i passed through the NVME using the virtio (should i passthrough by pcie device? i did it to utilize the writeback cache)

everything looks good, but watching youtube sometimes i got audio and video lagging, it happens about once a minute.

one another thing is i pinned only cpu1 to my VM, but i NVME is connected to cpu1 but GPU and USB3.0 is connected to CPU0, this is can cause some problem?

any suggestion?

 

Share this post


Link to post

i saw the from the release 6.8.0 will support hugepages.

so i updated to 6.8.0 rc7, but there is no guide how to enable the hughpage.

can anyone help me how to enable it?

Share this post


Link to post

I had a similar issue caused by latency.  What fixed it for me was to remove all unused USB root hubs in the VM device manager, then in the XML set HPET to present=yes

Edited by toastman

Share this post


Link to post
25 minutes ago, toastman said:

I had a similar issue caused by latency.  What fixed it for me was to remove all unused USB root hubs in the VM device manager, then in the XML set HPET to present=yes

do you mean every controller on the <devices>

type with usb?

Share this post


Link to post

No, the Device Manager within the Windows VM itself.  

 

On first install I have about 6, but I can delete 4 of them without losing anything - the other two have my mouse/keyboard etc., attached.  Delete those and setting HPET to yes drops my idle usage down from ~15-20% to 1-2%, and completely solves my audio sync problems 

Share this post


Link to post
11 hours ago, toastman said:

No, the Device Manager within the Windows VM itself.  

 

On first install I have about 6, but I can delete 4 of them without losing anything - the other two have my mouse/keyboard etc., attached.  Delete those and setting HPET to yes drops my idle usage down from ~15-20% to 1-2%, and completely solves my audio sync problems 

i had one pcie usb controller passed into the VM

 

i found the issue,

i had to change the bios setting to performance.

now it is working great!

thank

Share this post


Link to post
1 hour ago, James_J said:

i had one pcie usb controller passed into the VM

 

i found the issue,

i had to change the bios setting to performance.

now it is working great!

thank

its odd that this was the reason, your cpu should be good enough to watch youtube flawlessly, I wonder....

Share this post


Link to post
4 minutes ago, unrateable said:

its odd that this was the reason, your cpu should be good enough to watch youtube flawlessly, I wonder....

The CPU is good enough but it takes time to set the cpu clock up.

that is why the first few frame is so laggy and later it is fine

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.