Jump to content
We're Hiring! Full Stack Developer ×

Windows VM performance


beire

Recommended Posts

I have been experimenting with windows VM's on my unraid v6 setup since updating from v5.

 

However it seems all windows VM's seem to suffer from very poor performance.

When i open the task manager, very often disk usage is at 100% overall while individual processes use almost nothing......

 

My linux VM's seem fine.

Also i have passed through an AMD 6450.

Running plex is impossible. Navigating through the menus is slow as hell. So here again performance is extremely bad. I don't know if it's related to the disk usage or the gpu.

Playing tunein radio from the browser stutters alot. youtube videos are fine...

Again my linxu vm's run's plex fine (not so good as bare metal though).

 

Before i ran this same setup in ESXI with an OSX vm as htpc. This ran 100% fine.

 

I have tried virtual disk with RAW and qcow2.

 

This is my current windows 10 VM XML (windows 8.1 same results)

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Windows 10</name>
  <uuid>89b8c3d7-2eb0-daff-3b00-48a582bfe593</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="windows.png" os="windows"/>
  </metadata>
  <memory unit='KiB'>10485760</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>8</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='5'/>
    <vcpupin vcpu='6' cpuset='6'/>
    <vcpupin vcpu='7' cpuset='7'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='8' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/Virtual Machines/Windows 10/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/Virtual Machines/Windows Server/virtio-win-0.1.105.iso'/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:e0:70:f2'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/Windows 10.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.0,bus=pcie.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:1d.0'/>
  </qemu:commandline>
</domain>

 

Without any device passed through i have the same results.

Is there anyone experiencing the same behaviour?

 

I'm running:

 

X9scm-f

e3-1230v2

24gb Ram

Vm's are stored on the cache disk, which is a WD red 1TB disk.

Link to comment

Windows 10 isn't fully supported yet. Until virtio drivers are updated, I'd call it experimental. Have you tried windows 8.1?

Yes i have. With same results.

I gave up on 8.1 to try if 10 was any better.

 

I'll reinstall 8.1 again.

Link to comment

I saw mention of QCOW2 format for the virtual disks.  In my experience the RAW format seems to give significantly better performance.  Having said that I can see the QCOW2 format being desirable in the future when support for snapshots is added back to the unRAID VM manager.

Link to comment

I was indeed using q35. Don't remember the reason though. Just rebooted using i440... Same results. 100% disk right away.

Memory is also at 73 % just after boot.

Is this normal for the amount i allocated?

 

I'm not running qcow2, i'm using RAW.

I read somewhere that raw would give better performance so i stayed away from qcow2.

 

 

Link to comment

Just to double check. You started with a fresh install of Windows when you started? I reads like you did but thought I would ask. It looks like you are giving the VM 8 cores?

 

Here is what I would try first (just to test)

1. Create a fresh Windows 8.1 VM - New disk image - 2 CPU Cores - 4 GB of Ram - Do not pass through anything

2. Now once Windows is done installing, use VNC to mess around Windows to make sure it works well

3. If it is working as expected, try passing through your GPU

 

Lets us know the results of the above.

Link to comment

It appears in your XML that memory ballooning is enabled and you are doing GPU pass through. I'm not sure how this is working as its not technically supported, but maybe that's the issue right there.

 

Turn on advanced view when editing your VM and make sure both memory fields are assigned the same number.

Link to comment

It appears in your XML that memory ballooning is enabled and you are doing GPU pass through. I'm not sure how this is working as its not technically supported, but maybe that's the issue right there.

 

Turn on advanced view when editing your VM and make sure both memory fields are assigned the same number.

Yeah. I don't have a clue :D

However i've set the memory to the same value but the VM stays very slow.

 

I had an update for the AMD drivers. It yakes minutes just tot extract the package...

 

I'll now wait untill i've found the time to test with Windows 8.

 

I do remember when installing Windows 10 onder vnc only, the last setup stage took ages to complete. So i'm quite sure it had nothing to do with the gpu.

 

I've got an ssd from my previous esxi datastore. But i'm still hesitant to use it for kvm.

Link to comment

I saw the 100% disk usage issue early on in my win10 installs.  I was able to band aid it so it didn't occur ALL of the time, but it was frequent enough that I didn't like it.  When it'd occur, I'd also see a spike in the servers cpu usage.  One thing I never checked was if it was related to virtual memory or not.  Instead, I shot gun fixed this puppy since I have things I'm trying to run in the vm's.

 

Ultimately, I made the following changes.  These gave me some incredible performance gains.  I can remote into the VM's and I get incredible video playback and application performance.

  • Increased ram from 4gb to 6gb
  • Increased number of CPU's from 2 to 4 (one vm is set to 6)
  • Moved from cach HDD to dedicated VM SSD

Link to comment
  • 1 month later...

OK.

I have since changed my hd6450 x1 to an nvidia gt640 with a x1 to x16 adapter.

Windows vm performance has greatly improved.

I can now use it for plex no problem.

Seems the hd6450 was not liking being passed through.

 

I suspected this because in my previous esxi setup I could only get it to play nice on an osx vm.

But since esxi was a pita for gou pass through I never thought it was the card.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...