The performance of your Azure managed disk is set when you create your disk, in the form of its performance tier. The performance tier determines the IOPS and throughput your managed disk has. When you set the provisioned size of your disk, a performance tier is automatically selected. The performance tier can be changed at deployment or afterward, without changing the size of the disk.
In this article, I will share with you how to change the performance tiers of your Azure Managed Disk without virtual machine downtime.
In This Article
Changing the performance tier allows you to prepare for and meet higher demand without using your disk’s bursting capability. It can be more cost-effective to change your performance tier rather than rely on bursting, depending on how long the additional performance is necessary. This is ideal for events that temporarily require a consistently higher level of performance, like holiday shopping, performance testing, or running a training environment. To handle these events, you can upgrade to a higher performance tier for as long as you need it. You can then return (downgrade) to the original tier when you no longer need the additional performance.
The good news is, Microsoft recently announced that you can now change your performance tier of Azure premium SSDs without downtime. This feature is now generally available and known as live tier change.
To follow this article, you need to have the following:
1) Azure subscription – If you don’t have an Azure subscription, you can create a free one here.
2) Changing the performance tier is currently supported only for premium SSDs.
3) A disk’s performance tier can be downgraded only once every 12 hours, however, you can upgrade the tier anytime. If you just upgraded a disk tier, you need to wait 12 hours before you downgrade.
4) You cannot downgrade a disk performance tier below the minimum compatible tier. For example, you have a premium SSD disk size of 127 GB. The minimum supported tier for this disk is P10, you cannot downgrade it to P6.
5) You need to enable the live tier feature on your subscription before you can change the performance tier of a disk (more on this in the next section).
6) At least one Azure virtual machine is deployed with Premium SSD disks in the desired Resource Group. Please check the following quickstart guide to create a Linux or Windows virtual machine.
Register Live Tier Change Feature
Before you can start changing the performance tier of an Azure Managed disk without virtual machine downtime, you must first enable this feature on your subscription.
The following steps will enable the feature on your subscription, you can choose between PowerShell or the Azure CLI.
# Set the Azure context for the desired subscription az account set --subscription "xxxx-xxxx-xxxx-xxxx" # Check if the live tier feature is registered first az feature show --namespace Microsoft.Compute --name LiveTierChange # Register the live tier feature on your subscription az feature register --namespace Microsoft.Compute --name LiveTierChange
Please note that registering the live tier feature might take up to 30 minutes to complete.
Here is the PowerShell version for the same:
# Set the Azure context for the desired subscription Set-AzContext -Subscription "xxxx-xxxx-xxxx-xxxx" # Check if the live tier feature is registered first Get-AzProviderFeature -FeatureName "LiveTierChange" -ProviderNamespace "Microsoft.Compute" # Register the live tier feature on your subscription Register-AzProviderFeature -FeatureName "LiveTierChange" -ProviderNamespace "Microsoft.Compute"
Change performance tiers of a disk
In this section, I will show you how to update the performance tier of a disk even when it is attached to a running VM.
Open Windows Terminal if you have the Azure CLI installed on your machine, or use the Azure Cloud Shell at https://shell.azure.com and run the following commands. You can choose between PowerShell or the Azure CLI.
# Set the Azure context for the desired subscription az account set --subscription "xxxx-xxxx-xxxx-xxxx" # Set the required variables resourceGroupName=<ResourceGroupNameHere> diskName=<DiskNameHere> performanceTier=<DesiredPerformanceTier> #e.g. "P15" vmName=<VMNameHere> # Check Azure VM Status az vm get-instance-view --name $vmName --resource-group $resourceGroupName --query instanceView.statuses --output table # Update the disk performance tier az disk update -n $diskName -g $resourceGroupName --set tier=$performanceTier
Please note that the live tier change (update) operation might take up to 5 minutes to complete for a running VM.
To check the performance tier of a disk after it’s updated, you can run the following CLI command:
# Show the tier of a disk az disk show -n $diskName -g $resourceGroupName --query [tier] -o tsv
Here is the PowerShell version for the same:
# Set the Azure context for the desired subscription Set-AzContext -Subscription "xxxx-xxxx-xxxx-xxxx" # Set the required variables $resourceGroupName = "ResourceGroupName" $diskName = "yourDiskName" $performanceTier = "DesiredPerformanceTier" #e.g. "P10" $vmName = "VMNameHere" # Check Azure VM Status Get-AZVM -Name $vmName -Status | Select PowerState # Update the disk performance tier $diskUpdateConfig = New-AzDiskUpdateConfig -Tier $performanceTier Update-AzDisk -ResourceGroupName $resourceGroupName -DiskName $diskName -DiskUpdate $diskUpdateConfig
To check the performance tier of a disk after it’s updated, you can run the following PowerShell command:
# Show the tier of a disk $disk = Get-AzDisk -ResourceGroupName $resourceGroupName -DiskName $diskName $disk.Tier
That’s it there you have it. Happy Azure Disk Live Tier Change!
In this article, I showed you how to change and downgrade the performance tier of your Azure-managed disk virtual machine without downtime.
When you first deploy or provision a managed disk, the baseline performance tier for that disk is set based on the provisioned disk size. You can use a performance tier higher than the original baseline to meet higher demand. When you no longer need that performance level, you can return to the initial baseline performance tier.
Of course, the price billing changes as your performance tier changes. For example, if you provision a P10 disk (128 GiB), your baseline performance tier is set as P10 (500 IOPS and 100 MBps). You’ll be billed at the P10 rate. You can upgrade the tier to match the performance of P50 (7,500 IOPS and 250 MBps) without increasing the disk size. During the time of the upgrade, you’ll be billed at the P50 rate. When you no longer need the higher performance, you can return to the P10 tier. The disk will once again be billed at the P10 rate.
To learn more about Azure Premium SSDs managed disks pricing, please check the official pricing page here.
Thank you for reading my blog.
If you have any questions or feedback, please leave a comment.