Skip to content

Virtual Machines

Recommendation types

Terminate

Fires in two distinct cases.

Deallocated for the full lookback window. When a VM has been in the deallocated state for every day in the lookback window, compute billing is already paused. The ongoing cost is disk storage and any applicable software licensing. The recommendation is to delete the VM to eliminate those costs entirely.

Running but CPU is below the idle threshold. When a VM is running and billing compute, and average CPU stays below cpuPctTerminate (default 1%) across the lookback window, the engine considers it for deletion. A low average alone is not enough, because a job that runs for a few minutes a day on a large SKU averages out to almost nothing. Terminate is suppressed, and rightsize is evaluated instead, when any of these guards trips:

  • The 95th percentile of daily CPU peaks reaches cpuPctTerminateMax (default 10%). Using the 95th percentile lets a single patch-day spike through but catches a peak that recurs most days.
  • Any daily CPU peak reaches cpuPctMaxSafe (default 50%).
  • Average used memory reaches memPctMin, or resident memory reaches memIdleMaxGiB (default 16 GiB). Memory in use points to an in-memory database or cache that shows little CPU activity.
  • Peak disk IOPS consumption reaches diskIopsMaxSafe (default 70%).
  • Mean daily outbound network traffic reaches netOutIdleMaxMiBPerDay (default 50 MiB). A VM that sends data out every day is serving something.
  • Memory or network data covers less than half the lookback window. Missing data blocks the recommendation.

These guards follow the shape of the Azure Advisor shutdown criteria, which combine a CPU peak percentile with outbound network utilization.

Rightsize

Fires when average CPU and average memory are both below their minimum thresholds, and neither CPU peak, memory pressure peak, nor disk IOPS consumption has exceeded its safe ceiling during the lookback window. The engine suggests the next smaller size within the same VM family (e.g. Standard_D4s_v5 to Standard_D2s_v5).

When memory data is unavailable (the Azure Monitor agent is not installed or not reporting), rightsize can still fire based on CPU alone, at reduced priority.

Burstable candidate

Fires for D-series and E-series VMs that meet the same low-CPU conditions as rightsize and have positive CPU credit accumulation throughout the lookback window. The engine suggests switching to the B-series equivalent, which costs less for workloads with low average CPU and occasional burst demand.

When both rightsize and burstable candidate qualify simultaneously, the engine emits a single recommendation. The option with higher estimated savings becomes the primary; the other is stored as an alternative in the recommendation evidence.

Upgrade generation

Fires independently of utilization. When a VM is running on an older generation (e.g. Standard_D4s_v3) and a newer generation with the same vCPU and RAM count (e.g. Standard_D4s_v5) is available in the same region at a lower price, the engine recommends migrating. Detection is based on the live pricing table, so new Azure generations are picked up automatically when pricing data is refreshed.

Thresholds

Threshold Default What it means
CPU min % 5 Average CPU must be below this for rightsize or burstable to fire
CPU terminate % 1 Average CPU must be below this for a running VM to receive a terminate recommendation
CPU max safe % 50 Peak CPU above this blocks rightsize and burstable
Memory min % 20 Average memory must be below this for rightsize to fire
Memory available min safe % 20 Available memory % must not have dropped below this at peak (equivalent to 80% memory pressure). Blocks rightsize if exceeded
Disk IOPS max safe % 70 Maximum daily-average disk IOPS consumed as a percentage of the VM's IOPS limit. Blocks rightsize if exceeded

Auto-implementation

The engine detects implementation automatically on each run. Detection applies to any recommendation in the In Review, Planned, Snoozed, or Ignored status. A team member may act on a recommendation that was not formally planned, and those savings are captured regardless of what status the recommendation was in at the time.

  • Terminate: when the VM's inventory status changes to Deleted, the recommendation is marked implemented.
  • Rightsize / burstable candidate / upgrade generation: when the current VM size in inventory matches the recommended size, the recommendation is marked implemented. This also applies when the alternative recommendation from a merged rightsize+burstable pair was applied instead of the primary.