Jump to content

Windows VM stuttering on upgrade to Unraid 6.11.5


Recommended Posts

Hi all,

 

I upgraded my Unraid server from 6.7.2 to 6.11.5 and started to experience audio and UI stuttering on my Windows 10 VM. I passthrough an Nvidia gpu and have made sure to enable MSI.  All the same setting as I was running on 6.7.2 but now I get audio and UI stuttering. Downgrading Unraid makes everything run smoothly again. I tried linux mint with the same VM settings and it doesn't stutter.  Windows 11 also experiences stuttering on Unraid 6.11.5.

 

Any suggestions?

Link to comment

Here's a copy of the VM configuration xml:

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='3'>
  <name>Productivity VM</name>
  <uuid>ebadb672-b6c9-2a5b-8493-b5a3e325f3d4</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>20</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='10'/>
    <vcpupin vcpu='1' cpuset='30'/>
    <vcpupin vcpu='2' cpuset='11'/>
    <vcpupin vcpu='3' cpuset='31'/>
    <vcpupin vcpu='4' cpuset='12'/>
    <vcpupin vcpu='5' cpuset='32'/>
    <vcpupin vcpu='6' cpuset='13'/>
    <vcpupin vcpu='7' cpuset='33'/>
    <vcpupin vcpu='8' cpuset='14'/>
    <vcpupin vcpu='9' cpuset='34'/>
    <vcpupin vcpu='10' cpuset='15'/>
    <vcpupin vcpu='11' cpuset='35'/>
    <vcpupin vcpu='12' cpuset='16'/>
    <vcpupin vcpu='13' cpuset='36'/>
    <vcpupin vcpu='14' cpuset='17'/>
    <vcpupin vcpu='15' cpuset='37'/>
    <vcpupin vcpu='16' cpuset='18'/>
    <vcpupin vcpu='17' cpuset='38'/>
    <vcpupin vcpu='18' cpuset='19'/>
    <vcpupin vcpu='19' cpuset='39'/>
  </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/ebadb672-b6c9-2a5b-8493-b5a3e325f3d4_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='10' threads='2'/>
    <cache mode='passthrough'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='yes'/>
  </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/user/domains/Productivity VM/vdisk1.img'/>
      <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>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </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:b6:92:0c'/>
      <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-3-Productivity VM/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='2'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x81' 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='0x81' 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>

 

Edited by itstombtw
Link to comment
  • 3 weeks later...
  • 3 weeks later...
  • 7 months later...
On 5/29/2023 at 8:58 PM, itstombtw said:

Hi all,

 

I upgraded my Unraid server from 6.7.2 to 6.11.5 and started to experience audio and UI stuttering on my Windows 10 VM. I passthrough an Nvidia gpu and have made sure to enable MSI.  All the same setting as I was running on 6.7.2 but now I get audio and UI stuttering. Downgrading Unraid makes everything run smoothly again. I tried linux mint with the same VM settings and it doesn't stutter.  Windows 11 also experiences stuttering on Unraid 6.11.5.

 

Any suggestions?


I have largely the same issue.  Not upgrade related but a new VM on 6.11.5 where I get audio stuttering.  No gfx issues.  MSI enabled.  Issue doesn't happen on a win10 system I spun up on the same hardware.

Link to comment

Hey, I've been experiencing similar issues. I've spent days troubleshooting and testing. See my thread https://forums.unraid.net/topic/153038-poor-random-readwrite-nvme-passthrough-performance/

Here are a few things to try, some depend on your hardware, sharing what CPU you are running can help.

1. Try locked memory, this tells Unraid not to swap out the blocks of memory of other uses

<memoryBacking>
    <locked/>
    <nosharepages/>
</memoryBacking>

2. Isolate CPU cores from Unraid `Settings` -> `CPU Pinning` -> `CPU `Isolation`, pin all for best performance or some. This means Unraid will never use these cores. So up to you
3. Emulator Pin, puts kvm activities onto a dedicated thread outside of the VM. Better for latency, for total performance use an isolated CPU core

<cputune>
  ...
  <emulatorpin cpuset='1'/>
</cputune>


4. IOThread, apply a specific thread for all IO tasks, this is only applicable if you use Vdisk, not PCIE or direct disk passthrough.

<iothreads>1</iothreads>
<cputune>
  ...
  <iothreadpin iothread='1' cpuset='1,11'/>
</cputune>


5. Use the newer faster TSC for clock. Most modern CPUs should support TSC. It is generally faster than HPET. I think you will need to be using i440fx-6.0 or higher for TSC. 
 

<clock offset='localtime'>
    <timer name='rtc' present='no' tickpolicy='catchup'/>
    <timer name='pit' present='no' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='no'/>
    <timer name='tsc' present='yes' mode='native'/>
 </clock>


6. I personally have found benefits with migration=off. Migration is useful for kvm in the enterprise space, so give it a try off

<cpu mode='host-passthrough' check='none' migratable='off'>

7. You're using `pc-i440fx-3.1` try using the latest version `pc-i440fx-7.2`

I don't see your GPU passed in the xml, if you do, ensure with using i440fx that you enable multifunction=on and map the addresses correctly

Edited by thatonething
Link to comment

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.

×
×
  • Create New...