Mastering Windows Server 2016 Hyper-V

(Romina) #1

It’s important to remember that policies are enacted at a per VHD level but can be
applied at different levels to ease management, and so the policy type is important
when applying policies to multiple VHDs, VMs, services, and so on. Use dedicated
when you want every VHD to have its own QoS values (for example, if you want per
VHD performance tiers like Silver and Gold) and use aggregated when you want
VHDs to share the QoS values (such as across a multi-VM service). If I set a
Maximum IOPS of 500 with a policy type of dedicated and apply it to five VHDs, then
every VHD has a maximum of 500 IOPS. If I set the same policy as type aggregated
and apply it to the same five VHDs, they would have a combined maximum of 500
IOPS—which means that if every VHD is pushing for maximum IOPS, each would max
out at around 100 IOPS. Note that maximum values are not reserved for each
resource, and throttling starts only when needed. For those same five VHDs sharing
the 500 IOPS maximum, if only one VHD is performing work, it can use 500 IOPS; it
won’t be artificially limited to 100 IOPS just because it’s sharing the maximum with
four others. Only when others in the aggregated policy need the IOPS will it be fairly
distributed. Dedicated is generally easier to manage, because every VHD gets the
values defined in the policy; it gives you “one-minute management.” With an
aggregated policy, understanding the exact performance received per VHD is more
complex, but this type may be needed when a service needs that shared QoS (for
example, giving a group of resources a “bubble” of performance that they can share). I
would create a separate aggregated policy for each “bubble” of resources that need to
be shared. Storage QoS also works for VHD Sets (aka Shared VHDX) and in this
scenario, the IOPS is shared between the nodes sharing the VHD.


You do not have to configure all the attributes of a policy. You may decide that you
want to define only minimums, to ensure that VHDs are guaranteed a minimum
number of IOPS in times of contention but are not limited to a maximum IOPS other
than what the storage can provide. At other times, you may set only maximum values,
which stop VHDs from consuming excess resources but also may artificially limit
performance of VHDs when there is no contention and therefore leave storage
bandwidth unused. Of course, you can configure both a minimum and maximum to
ensure a certain level of performance and limit at another level. Typically, the
maximum is higher than the minimum to give VHDs some fluctuation. However, it is
possible to set the minimum value to be the same as the maximum, thereby setting
consistent performance for the VHDs, essentially locking them to a certain IOPS. This
last scenario is common for hosters where the IOPS per disk should be set; for
example, in Azure, a standard disk has a 500 IOPS limit, so you could imagine the
minimum and maximum set to 500 IOPS as a dedicated policy. In this way, the VHD
should always get 500 when it wants it but never more than 500.


To create a new policy, use the New-StorageQosPolicy cmdlet, and to view existing
policies, use Get-StorageQosPolicy. In the following example, I create a new policy
with a minimum and maximum IOPS value that is of type dedicated. Notice that I save
the policy to a variable so that I can then easily apply it.


$10to100IOPSPolicy = New-StorageQosPolicy -Name "10 to 100 IOPS" `

Free download pdf