Back to Blog

Azure bills grow quietly. You deploy a handful of D-series VMs for a web tier, spin up a SQL Managed Instance with “generous” compute for safety, and leave storage on Hot tier because nobody wants to be the person who broke prod by moving data to the wrong tier. Six months later, you’re spending $14,000/month on infrastructure that could run on $5,000.

This guide walks through the highest-impact Azure cost optimization best practices — with specific instance types, real pricing, and a step-by-step workflow you can run this week.

VM Right-Sizing: D-Series vs B-Series Is the First Question

The most common over-provisioning mistake on Azure is running web application servers on D-series VMs when B-series would handle the workload fine.

Here’s the difference that matters: D-series VMs (like D4s_v3) provide consistent high CPU performance. B-series VMs accumulate CPU credits during low-usage periods and burst when needed. Most web applications — API servers, content delivery backends, admin panels — spend 85%+ of their time below 20% CPU utilization, with occasional spikes during deployments or traffic surges.

Pricing comparison (East US, Linux, pay-as-you-go):

VM SizevCPUsRAMMonthly Cost
D4s_v3416 GB~$280/month
B4ms416 GB~$150/month
D2s_v328 GB~$140/month
B2ms28 GB~$75/month

Switching a 4-vCPU web server from D4s_v3 to B4ms saves $130/month per VM. Across 10 web servers, that’s $1,300/month — $15,600/year — with zero architectural changes.

How to find candidates:

# Pull average CPU for all VMs over last 30 days using Azure CLI
az monitor metrics list \
  --resource "/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vm-name}" \
  --metric "Percentage CPU" \
  --interval PT1H \
  --aggregation Average \
  --start-time 2026-02-18T00:00:00Z \
  --end-time 2026-03-18T00:00:00Z

Any VM averaging below 25% CPU with infrequent bursts is a B-series candidate. Any VM averaging below 10% is a “does this even need to exist?” candidate.

One thing to watch: B-series VMs have a credit cap. A B4ms accumulates up to 2,880 credits. If your workload sustains high CPU for extended periods (multi-hour batch jobs, sustained API load), you’ll exhaust credits and get throttled to baseline performance. Check your P95 CPU before switching, not just the average.

SQL Managed Instance: The Silent Budget Killer

SQL Managed Instance is one of the most over-provisioned services on Azure. Teams pick General Purpose 8-vCore because the migration guide suggested it, then never revisit the decision.

The reality: many SQL MI workloads run comfortably on 4-vCore General Purpose. The jump from 8-vCore to 4-vCore General Purpose saves roughly $800/month in the East US region.

Before downsizing, check these metrics in Azure Monitor:

  • Average CPU over 30 days — if it’s under 40%, 4-vCore is likely fine
  • Max IO throughput — General Purpose caps at 320 MB/s for 8-vCore, 160 MB/s for 4-vCore
  • Storage IOPS — ensure your peak read/write patterns fit within the lower tier’s limits

If your workload is genuinely bursty with occasional heavy query loads, consider switching from General Purpose to Business Critical tier at a lower vCore count. Business Critical uses local SSD storage and delivers significantly better IO latency, which sometimes means you can run fewer vCores because queries complete faster.

Storage Tier Optimization: Hot, Cool, and Archive

Azure Blob Storage pricing varies dramatically by access tier, and most organizations leave everything on Hot because changing tiers feels risky.

Current pricing (East US, LRS):

TierStorage $/GB/monthRead $/10K opsWrite $/10K ops
Hot$0.018$0.004$0.055
Cool$0.010$0.010$0.100
Archive$0.002$5.00$0.100

The storage cost difference is clear: Cool is 44% cheaper than Hot, Archive is 89% cheaper. But the operation costs flip — reads from Cool cost 2.5x more, and Archive reads are 1,250x more expensive.

The decision framework is straightforward:

  • Data accessed multiple times per month → Hot
  • Data accessed less than once per month but needs to be available within hours → Cool
  • Data you keep for compliance/audit that’s accessed less than once per year → Archive

A real optimization: Log files. Most teams write application logs to Blob Storage on the Hot tier, query them for troubleshooting within the first 7 days, and never touch them again. A lifecycle management policy handles this automatically:

{
  "rules": [
    {
      "name": "log-tiering",
      "type": "Lifecycle",
      "definition": {
        "filters": {
          "blobTypes": ["blockBlob"],
          "prefixMatch": ["logs/"]
        },
        "actions": {
          "baseBlob": {
            "tierToCool": { "daysAfterModificationGreaterThan": 14 },
            "tierToArchive": { "daysAfterModificationGreaterThan": 90 },
            "delete": { "daysAfterModificationGreaterThan": 365 }
          }
        }
      }
    }
  ]
}

For an organization storing 5 TB of logs on Hot tier, this policy reduces storage costs from $90/month to roughly $25/month — a $780/year saving on just one storage account.

Azure Hybrid Benefit: Free Money If You Have Windows Licenses

Azure Hybrid Benefit lets you use existing Windows Server or SQL Server licenses (with Software Assurance) to reduce VM costs. It’s one of the most under-utilized cost optimizations on Azure because it requires coordination between engineering and procurement.

The actual savings on a D4s_v3 (East US):

OSWithout AHBWith AHBMonthly Savings
Windows Server~$465/month~$280/month~$185/month
SQL Server Enterprise~$3,500/month~$1,200/month~$2,300/month

That’s a 40% reduction on Windows Server VMs and up to 66% on SQL Server workloads — just by applying licenses you already own.

How to enable it on existing VMs:

# Enable Azure Hybrid Benefit on an existing VM
az vm update \
  --resource-group myResourceGroup \
  --name myVM \
  --set licenseType=Windows_Server

# For SQL Server VMs
az sql vm update \
  --resource-group myResourceGroup \
  --name mySqlVM \
  --license-type AHUB

Important detail: Azure Hybrid Benefit for Windows Server allows you to use one license (16-core minimum) on up to two VMs with 8 or fewer cores, or one VM with up to 16 cores. Track your license assignments — over-assigning violates the licensing terms.

Check your Azure portal under Cost Management + Billing → Azure Hybrid Benefit to see how many licenses you’re currently using versus your entitlement.

Azure Reservations: 1-Year vs 3-Year

Azure Reserved VM Instances work the same way conceptually as AWS Reserved Instances: commit to a specific VM size in a specific region for 1 or 3 years, get a discount.

Typical discounts (varies by VM size and region):

TermPaymentTypical Discount
1-yearMonthly or upfront30–40%
3-yearMonthly or upfront55–65%

For a D4s_v3 running 24/7 in East US at ~$280/month on-demand:

  • 1-year reservation: ~$185/month (save ~$95/month)
  • 3-year reservation: ~$120/month (save ~$160/month)

Azure’s exchange policy is more flexible than AWS. You can exchange a reservation for a different VM size, region, or even a different service (within the same reservation type) at any time. The remaining value of your current reservation applies as credit toward the new one. AWS doesn’t offer this — once you buy a Reserved Instance, you’re locked in or selling on the marketplace.

You can also cancel reservations for a prorated refund, but Azure caps total refunds at $50,000 per rolling 12-month period per billing account.

Strategy for teams not sure about commitment: Start with 1-year reservations covering 60–70% of your consistent baseline. Use on-demand for the rest. After a year of data, you’ll have confidence to move portions to 3-year terms.

Step-by-Step Optimization Workflow: Azure Cost Management + Azure Advisor

Here’s the workflow we recommend for teams running their first Azure cost optimization pass.

Week 1: Assessment

  1. Open Azure Cost Management → Cost Analysis. Set the time range to the last 90 days and group by Resource Type. Identify your top 5 cost drivers.

  2. Open Azure Advisor → Cost recommendations. Advisor analyzes your usage patterns and gives specific recommendations — “Shut down VM xyz (avg CPU 2%)” or “Right-size VM abc from D8s_v3 to D4s_v3.”

  3. Export the Advisor recommendations:

az advisor recommendation list \
  --category Cost \
  --output table
  1. Cross-reference Advisor’s suggestions with your own metrics. Advisor sometimes misses context — a VM averaging 5% CPU might be a build server that spikes to 100% for 20 minutes during deployments. Check your peak usage, not just the average.

Week 2: Quick Wins

  1. Delete idle resources: unattached disks, stopped VMs still incurring disk charges, empty resource groups with lingering resources.

  2. Apply storage lifecycle policies to log containers and backup blobs.

  3. Enable Azure Hybrid Benefit on all eligible VMs.

  4. Resize obvious over-provisioned VMs (the ones averaging under 10% CPU).

Week 3: Reservations and Architecture

  1. Pull your consistent baseline compute from Cost Management. Any VM running 24/7 for the last 6 months at consistent utilization is a reservation candidate.

  2. Purchase 1-year reservations for your baseline.

  3. Evaluate dev/test environments for Azure Dev/Test pricing (separate subscription type with reduced rates — no Windows license charges, discounted rates on several services).

How this compares to AWS: Azure Advisor is roughly equivalent to AWS Trusted Advisor, but Azure Advisor’s cost recommendations are available on all tiers. AWS locks some Trusted Advisor checks behind Business or Enterprise Support plans ($100+/month). Azure Advisor is free for all customers.

Real Scenario: $9,200/Month Reduction on a 50-VM Environment

Here’s a breakdown from a real optimization engagement on a mid-size SaaS platform running 50 VMs, 3 SQL Managed Instances, and roughly 12 TB of Blob Storage on Azure.

Before optimization: $18,400/month

CategoryActionMonthly Savings
VM right-sizing18 D-series → B-series for web tier$2,340
VM right-sizing6 D8s_v3 → D4s_v3 for app tier$840
SQL MI2x 8-vCore → 4-vCore General Purpose$1,600
Hybrid BenefitApplied to 22 Windows Server VMs$2,420
Storage tiering8 TB logs moved Hot → Cool/Archive lifecycle$520
Idle resources4 stopped VMs with Premium SSD, 12 unattached disks$680
Reservations1-year on 20 steady-state VMs$800
Total$9,200/month

After optimization: $9,200/month — a 50% reduction.

The biggest single line item was Hybrid Benefit. The team had Windows Server licenses through an Enterprise Agreement but had never applied them to their Azure VMs. That was $2,420/month sitting on the table for over a year.

The second biggest was the B-series migration. Eighteen web servers were running D4s_v3 instances averaging 11% CPU utilization. Moving them to B4ms took a maintenance window and zero code changes.

What Tools Won’t Tell You

Azure Advisor and Cost Management are good starting points, but they have blind spots.

They don’t understand your application architecture. Advisor will tell you a VM is under-utilized but won’t tell you it’s part of an active-passive HA pair where low utilization is by design. It won’t flag that your 3 SQL Managed Instances could be consolidated into one with elastic pools. It won’t suggest that your batch processing workload running on D-series VMs could move to Azure Batch with Spot VMs at 60–90% discounts.

This is where multi-cloud cost platforms like Xplorr add value — they layer application context, cross-cloud benchmarking, and anomaly detection on top of the raw billing data. If you’re running 50+ resources across Azure (or Azure plus AWS/GCP), having a single view that correlates cost with utilization across all providers saves significant time.

But the fundamentals in this guide work regardless of tooling. Start with VM sizing, clean up waste, apply Hybrid Benefit, and commit to reservations on your baseline. Those four actions cover 80% of the savings for most Azure environments.


Keep reading

See how Xplorr helps → Features


Xplorr finds an average of 23% in unnecessary cloud spend. Get started free.

Share this article

Ready to control your cloud costs?

Join early teams getting real visibility into their AWS, Azure, and GCP spend.

Get started free
← More articles