# Azure VM High Disk Throughput, Upgrade Disk Tier

> Flags Azure VMs averaging 100 MB/s combined disk I/O over 30 days on non-Premium disks, suggesting a move to Premium SSD.

Source: https://zop.dev/integrations/azure/recommendations/azure-vm-high-disk-throughput-upgrade-disk-tier

---

## Where disk-bound VMs lose time

Every managed disk tier has a throughput ceiling. Microsoft's
[disk types comparison](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types)
lists maximum throughput of 500 MB/s for Standard HDD, 750 MB/s for Standard SSD and 900 MB/s for
Premium SSD, with smaller disks allowed less. The VM size adds a second ceiling:
[the disk performance guide](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-performance)
explains that an application requesting more IOPS or throughput than the VM or its disks allow is
capped, which shows up as higher latency. A database or ETL job waiting on a Standard disk spends its
compute budget in I/O wait.

## Measuring disk throughput on a VM

`Disk Read Bytes` and `Disk Write Bytes` are per-minute totals. Divide by 60 for bytes per second:

```bash
az monitor metrics list \
  --resource /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Compute/virtualMachines/<vm> \
  --metric "Disk Read Bytes" "Disk Write Bytes" --aggregation Total --interval PT1M --offset 30d

az vm show --resource-group <rg> --name <vm> \
  --query "{os:storageProfile.osDisk.managedDisk.storageAccountType, data:storageProfile.dataDisks[].managedDisk.storageAccountType}"
```

## Conditions for the Premium SSD advice

1. The VM is running.
2. ZopNight's scan recorded that not every attached disk is Premium. If that flag is missing or
   unreadable, there is no finding, because telling a Premium customer to buy Premium is the worse
   mistake.
3. Disk metrics exist, and the average read rate plus the average write rate over the last 30 days
   is at least 100 MB/s.

## VMs the rule skips

Sizes whose names start with `Standard_M` or `Standard_E` are left out. A VM with no disk read or write metrics gets no finding, and no customer tag can trigger one.
Disks that are Premium but under-used are the opposite problem, handled by
<a href="https://zop.dev/integrations/azure/recommendations/azure-small-premium-disk-tier-optimization">Azure Small Premium Disk Tier Optimization</a>.

## A performance recommendation with no saving

The finding carries no cost change, but moving a disk to Premium SSD does change its price, so
check [managed disk pricing](https://azure.microsoft.com/en-us/pricing/details/managed-disks/) for
your disk sizes first. The return is lower I/O wait and more work from the same VM.

## Moving the busy disks to Premium SSD

1. In Azure Monitor, open the VM's disk metrics and find which disks carry the traffic.
2. Check that the VM size supports Premium storage; Microsoft notes you need to check each size's
   article for premium storage compatibility.
3. Deallocate the VM, as Microsoft's
   [disk conversion steps](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-convert-types) do:
   `az vm deallocate --resource-group <rg> --name <vm>`.
4. Change each busy disk: `az disk update --resource-group <rg> --name <disk> --sku Premium_LRS`.
5. Start the VM and compare disk latency and throughput with the previous month.

**Note**
A disk's type can only be changed twice per day, so batch the changes.
