Introduced in Windows 2012 R2 Hyper-V, storage quality of service (QoS) provides the Hyper-V administrator with the ability to specify a minimum and maximums value for I/O load associated with the virtual disk of a virtual machine.
Storage QoS allows you to set up reserves and limits associated with the I/O load of a virtual hard disk that is located on shared storage to ensure isolation, as well as plan and allocate resources for a given application or workload.
The following steps show how to configure Storage QoS for a given virtual hard disk:
Storage QoS provides a way to configure and manage storage performance for a given virtual machine's virtual hard disk. This feature automatically improves the storage resource fairness between multiple virtual machines on the same storage fabric and allows specific minimum and maximum performance goals to be configured in units of normalized IOPs. These normalized IOPS are measured in 8 KB increments and any larger IOPS are divided into 8 KB increments for calculation purposes. For example, a 128 KB request is treated as 16 normalized IOPS. Correct planning is key if you are considering implementing Storage QoS because if it is not configured correctly you could end up impacting the performance of the virtual machine.
Storage QoS can be configured in a distributed manner in combination with a Scale-Out file server and you can read more about this in Chapter 7, Configuring High Availability in Hyper-V.
Storage QoS provides the capability to set a minimum value or reserve on a virtual hard disk. This is not a minimum guarantee but by setting a minimum IOPS value, on each virtual hard disk, an event-based notification is generated when the minimum IOPS value is not met.
Any virtual hard disk that does not have a minimum IOPS value defined will automatically default to a value of 0, which effectively is not setting a specific value.
Storage QoS provides the capability to set a maximum value or upper limit on a virtual hard disk. This is the more interesting of the two values, as it lets you limit against aggressive virtual hard disk IOPS, so that you can allocate and manage your storage resources in a more controlled fashion.
Again, any virtual hard disk that does not have a maximum IOPS value defined, will automatically default to a value of 0, which effectively is preventing any IOPS restrictions from being set.
PowerShell also provides a couple of cmdlets for managing Storage QoS, such as Get-VMHardDiskDrive
and Set-VMHardDiskDrive
. In this following example, we get all virtual hard disks attached to SCSI controller 0 for a given series of virtual machines and set the maximum IOPS value to 150, thus, allowing you to configure Storage QoS at scale:
Get-VMHardDiskDrive -VMName Win-2012R2-0* -ControllerType SCSI -ControllerNumber 0 | Set-VMHardDiskDrive -MaximumIOPS 150
18.221.98.71