Maximum I/O rates for attached HDD's on VMs - HYPER V or VMWARE


  1. Posts : 11,247
    Windows / Linux : Arch Linux
       #1

    Maximum I/O rates for attached HDD's on VMs - HYPER V or VMWARE


    Hi there

    I seem to have problems accessing FAST I/O times from Attached HDD's to a VM which is on the same LOCAL machine as the HOST.

    I have a couple of FAST USB 3 devices which can transfer I/O decently fast.
    These are attached to a LINUX VM as "RAW" devices from a Windows Host -- File system is XFS and these are attached as complete disks.

    When sharing these with Windows - have to do it via SAMBA I can only get data transfer via the real Nic card which on a laptop will give a max rate of about 11 MB/s (11 megaBYTES / sec). -

    Is there a way of getting the data to use the internal virtual NIC (which should be 1000 or 1GB/s). It shouldn't have to go via a wireless card for LOCAL data transfer !!!!.

    Problem seems the same whether I use VMWARE or run the VM as a HYPER V machine.

    HOST is Windows 10, VM is a Linux Guest. The attached USB HDD's work flat out even writing to or copying from an NTFS formatted external SSD attached to the VM - but when using Windows the rate drops to around 11 MB/s. !!!! as it's obviously using my LAN for transfer and using Wifi !!!!. I know it's using wifi as I can see the router going Bonkers with flashing lights for data transfer.

    I must be doing something really stupid here but can't fathom out what.

    Cheers
    jimbo
      My Computer


  2. Posts : 15,480
    Windows10
       #2

    Well I just tried transferring a file from a 2nd hard drive on host to c drive in hyper-v guest and only got around 9 MB/s.
      My Computer


  3. Posts : 11,247
    Windows / Linux : Arch Linux
    Thread Starter
       #3

    cereberus said:
    Well I just tried transferring a file from a 2nd hard drive on host to c drive in hyper-v guest and only got around 9 MB/s.
    Hi there

    It's also going through some sort of physical NIC card -- what should happen on local connections is that the I/O should go through a "Virtual NIC" which could treat the HDD's as locally attached devices -- for example a decent SSD attached to the machine via a SATA-->USB3 connector should be able to write a file to a LOCAL SSD (internal) at around 250 MB/s .

    Perhaps our resident specialist @Kari has some suggestions here.

    @Kari -- any ideas on getting full rate (or at least a decent rate) of I/O from a VM shared with a Windows HOST machine - i.e both HOST and VM on same machine - Host is HYPER V. My HOST has 2 physical NICS so perhaps from another machine on the LAN it would need to use a NIC but for the LOCAL machine it wouldn't need to use a physical NIC -- "Virtual switches or something".

    I capture sometimes a whole slew of programs (1080p) from SKY Q - and want to copy these to a NAS server which I've replicated as a VM before building a physical stand alone one. The capture device only runs on Windows so copying 40 or 50 GB at 11MB/s is a pain.

    (I can speed it up by copying first to a USB3 attached SSD and then attaching that to the VM, mounting it and copy the files but it seems a long winded way to go about this --we used to call this type of Network "Footnet" since it involved physically moving a device from one machine to another !!).

    Cheers
    jimbo
      My Computer


  4. Posts : 17,661
    Windows 10 Pro
       #4

    An easy way to increase transfer speed between a physical device and a Hyper-V virtual machine is to disable Virtual Machine Queue (VMQ) on your Hyper-V virtual switch. This can easily be done using PowerShell:

    Code:
    Set-VMNetworkAdapter –ManagementOS -Name "Name of your External Switch" -VmqWeight 0

    Maximum I/O rates for attached HDD's on VMs - HYPER V or VMWARE-image.png

    You should notice an immediate increase in transfer speed as soon as you have disabled VMQ. I get transfer speeds between 60 and 80 MBps from an external USB3 disk connected to host to a VM on my laptops old 5400 RPM spinner. Not even close to USB3 max speeds but enough for me.

    Another factor is VHD / VHDX disk type; transfer speeds are better using fixed size virtual disks on virtual machines than with dynamically expanding disks.

    Although I have to admit I don't like this site in general, I have bookmarked this particular guide because it is a pretty comprehensive guide to understand Hyper-V vm speed bottlenecks: Troubleshooting Slow VM Performance in Hyper-V (Part 1)

    Kari
      My Computer


  5. Posts : 11,247
    Windows / Linux : Arch Linux
    Thread Starter
       #5

    Kari said:
    An easy way to increase transfer speed between a physical device and a Hyper-V virtual machine is to disable Virtual Machine Queue (VMQ) on your Hyper-V virtual switch. This can easily be done using PowerShell:

    Code:
    Set-VMNetworkAdapter –ManagementOS -Name "Name of your External Switch" -VmqWeight 0

    Maximum I/O rates for attached HDD's on VMs - HYPER V or VMWARE-image.png

    You should notice an immediate increase in transfer speed as soon as you have disabled VMQ. I get transfer speeds between 60 and 80 MBps from an external USB3 disk connected to host to a VM on my laptops old 5400 RPM spinner. Not even close to USB3 max speeds but enough for me.

    Another factor is VHD / VHDX disk type; transfer speeds are better using fixed size virtual disks on virtual machines than with dynamically expanding disks.

    Although I have to admit I don't like this site in general, I have bookmarked this particular guide because it is a pretty comprehensive guide to understand Hyper-V vm speed bottlenecks: Troubleshooting Slow VM Performance in Hyper-V (Part 1)

    Kari
    Hi there

    That did the trick

    No wonder they call you the resident expert on this.

    Just going into a Bar to watch Hull City vs Chelsea -- a goal fest for Chelsea I predict -- I think more people OUTSIDE the UK watch Premier League footie than in the UK -- besides in the UK you can't get the 15.00 (BST) games on Saturdays --no probs here.

    Thanks again

    Cheers
    jimbo
      My Computer


  6. Posts : 15,480
    Windows10
       #6

    jimbo45 said:
    Hi there

    That did the trick

    No wonder they call you the resident expert on this.

    Just going into a Bar to watch Hull City vs Chelsea -- a goal fest for Chelsea I predict -- I think more people OUTSIDE the UK watch Premier League footie than in the UK -- besides in the UK you can't get the 15.00 (BST) games on Saturdays --no probs here.

    Thanks again

    Cheers
    jimbo
    You can in my local pub!
      My Computer


  7. Posts : 17,661
    Windows 10 Pro
       #7

    jimbo45 said:
    That did the trick.
    Makes me just wonder why VMQ is enabled by default, I disable it always after setting up Hyper-V and creating virtual switches.
      My Computer


  8. Posts : 15,480
    Windows10
       #8

    Kari said:
    Makes me just wonder why VMQ is enabled by default, I disable it always after setting up Hyper-V and creating virtual switches.
    I used this and for some reason things are worse!

    How do I reverse the powershell command?
      My Computer


  9. Posts : 17,661
    Windows 10 Pro
       #9

    cereberus said:
    How do I reverse the powershell command?
    By changing the VmqWeight value to 100%:

    Code:
    Set-VMNetworkAdapter –ManagementOS -Name "Name of your External Switch" -VmqWeight 100

    Notice: the PowerShell command enables or disables VMQ on the external switch, for all virtual machines using it overriding individual vm settings. If you have it globally enabled (value 100), you can then toggle VMQ on / off individually on each vm in settings:

    Maximum I/O rates for attached HDD's on VMs - HYPER V or VMWARE-image.png

    Kari
      My Computer


  10. Posts : 15,480
    Windows10
       #10

    Kari said:
    By changing the VmqWeight value to 100%:

    Code:
    Set-VMNetworkAdapter –ManagementOS -Name "Name of your External Switch" -VmqWeight 100

    Notice: the PowerShell command enables or disables VMQ on the external switch, for all virtual machines using it overriding individual vm settings. If you have it globally enabled (value 100), you can then toggle VMQ on / off individually on each vm in settings:
    Maximum I/O rates for attached HDD's on VMs - HYPER V or VMWARE-image.png

    Kari
    Yet again - many thanks.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:31.
Find Us




Windows 10 Forums