Measure available IOPS for Hyper-V drive image QoS

article #1191, updated 391 days ago

A good tool here:

woshub.com/how-to-measure-disk-iops-using-powershell/

Once having downloaded and unpacked this or this, get to an administrative PowerShell, and here’s the command:

.\DiskPerformance.ps1 -TestFileName test.dat –TestFileSizeInGB 1 -TestFilepath C:\temp -TestMode Get-SmallIO -FastMode True -RemoveTestFile True -OutputFormat Out-GridView

It is important to use a -TestFileSizeInGB larger than the cache on the RAID, and set -TestFilePath to a folder on the RAID whose IOPS capacity you need to measure, or else you will not be measuring the correct data.

This is very helpful when we need to increase performance on a Hyper-V guest. After CPU and memory usage are good, with their averages being medium or low, the last bottleneck is hard drive bandwidth. If you get this right you can improve Hyper-V guest performance a lot:

  1. Browse to the Advanced under each VHD, there is a QoS section.
  2. The above performance test will run several times if you let it. Approximate the maximum by a rough average of the list.
  3. For now, let’s say all VHDes are on the same RAID, and that you ran the above correctly on that RAID (-TestFilePath has to be set!), and that you averaged the values given to about 1800.
  4. For each VHD, set the minimum QoS to 100 (5%), and the maximum to 1700 (95%). This makes sure that the hypervisor doesn’t let any of them “spin down” all the way, so latency is nice and low; and it also makes sure that the hypervisor knows to give the guests priority on their RAID volume.

Categories: