Azure VM Series Guide
Understand Azure VM series (B, D, E, F, N) and choose the right size for your workload.
Prerequisites
- Azure subscription with compute permissions
- Understanding of CPU, RAM, and storage requirements for workloads
Understanding Azure VM Series and Sizes
Azure offers hundreds of virtual machine sizes organized into families, each optimized for different workload types. Picking the right VM size can mean the difference between an application that performs well at reasonable cost and one that wastes money on unused capacity or struggles under load. This guide breaks down every major VM family, explains the naming convention, provides sizing recommendations for common workloads, and covers cost optimization strategies including Spot VMs and Reserved Instances.
Understanding the VM family landscape is essential not just for IaaS workloads but also for services built on VMs under the hood, including AKS node pools, Azure Batch pools, VM Scale Sets, and even some configurations of Azure SQL and Cosmos DB use VM-based compute. Choosing the right underlying VM size affects performance, cost, and feature availability across all of these services.
VM Family Overview
Azure VM sizes are grouped into families identified by a letter prefix. Each family is designed for a specific balance of CPU, memory, storage, and GPU resources. Selecting the right family is the most impactful decision; choosing between sizes within a family is a matter of scaling up or down.
| Family | Type | Optimized For | CPU:Memory Ratio | Example Use Cases |
|---|---|---|---|---|
| B-series | Burstable | Variable CPU (credit-based) | 1:2 to 1:4 GB | Dev/test, low-traffic web servers, small databases |
| D-series | General Purpose | Balanced CPU-to-memory | 1:4 GB | Enterprise apps, mid-tier databases, web servers |
| E-series | Memory Optimized | High memory-to-CPU ratio | 1:8 GB | SQL Server, SAP, in-memory analytics, Redis |
| F-series | Compute Optimized | High CPU-to-memory ratio | 1:2 GB | Batch processing, gaming servers, CI/CD agents, scientific modeling |
| L-series | Storage Optimized | High throughput, local NVMe SSDs | 1:8 GB | NoSQL (Cassandra, MongoDB), data warehousing, log analytics |
| M-series | Memory Optimized | Extreme memory (up to 4 TB) | 1:16+ GB | SAP HANA, large in-memory databases |
| N-series | GPU Accelerated | GPU compute and visualization | Varies | ML training/inference, rendering, video encoding |
| H-series | HPC | High-performance computing | 1:2 GB | Fluid dynamics, weather modeling, molecular simulation |
| DC-series | Confidential | Hardware-based TEE (SGX/SEV-SNP) | 1:4 GB | Confidential computing, secure enclaves, sensitive data processing |
Understanding the Naming Convention
Azure VM size names follow a structured pattern that encodes the family, generation, processor, additive features, and size. Learning to decode these names lets you quickly understand what a VM offers without looking up documentation.
Standard_D8as_v5
| || | |
| || | └── Version (v5 = 5th generation)
| || └───── Additive features (s = Premium Storage)
| |└──────── Sub-family (a = AMD processor)
| └───────── vCPU count (8 vCPUs)
└──────────── Family (D = General Purpose)
Additive feature letters:
a = AMD processor i = Isolated (dedicated host)
b = Block storage l = Low memory (less RAM/vCPU)
d = Local temp disk (NVMe) m = Memory intensive (more RAM/vCPU)
p = ARM-based processor s = Premium Storage capable
t = Tiny memory C = Confidential
Processor indicators:
(none) = Intel a = AMD EPYC
p = Ampere ARM (Cobalt)
Examples decoded:
Standard_D4s_v5 = General Purpose, 4 vCPU, Intel, Premium SSD, Gen 5
Standard_D8as_v5 = General Purpose, 8 vCPU, AMD, Premium SSD, Gen 5
Standard_E16ds_v5 = Memory Optimized, 16 vCPU, local NVMe, Premium SSD, Gen 5
Standard_B2ms = Burstable, 2 vCPU, more memory, Premium SSD
Standard_F4s_v2 = Compute Optimized, 4 vCPU, Premium SSD, Gen 2
Standard_NC24ads_A100_v4 = GPU, 24 vCPU, AMD, local disk, Premium SSD, A100 GPUAlways Use Latest Generations
Always use the latest generation (v5 or v6) VMs when available in your region. Newer generations use more efficient processors (Intel Sapphire Rapids, AMD Genoa/Bergamo), offer better price-to-performance ratios (typically 15-30% improvement), and include enhanced networking and storage capabilities. A D4s_v5 outperforms a D4s_v3 at a similar or lower price point. Check availability withaz vm list-skus --location eastus --output table.
General Purpose: D-series Deep Dive
The D-series is the workhorse of Azure compute. With a balanced 1:4 CPU-to-memory ratio (approximately 4 GB RAM per vCPU), it handles the vast majority of production workloads. If you are unsure which family to choose, start with D-series. It covers roughly 80% of cloud workloads.
| Size | vCPU | Memory (GB) | Temp Storage | Max Data Disks | Est. Monthly Cost* |
|---|---|---|---|---|---|
| Standard_D2s_v5 | 2 | 8 | No local disk | 4 | ~$70 |
| Standard_D4s_v5 | 4 | 16 | No local disk | 8 | ~$140 |
| Standard_D8s_v5 | 8 | 32 | No local disk | 16 | ~$281 |
| Standard_D16s_v5 | 16 | 64 | No local disk | 32 | ~$562 |
| Standard_D8ds_v5 | 8 | 32 | 300 GB NVMe | 16 | ~$330 |
| Standard_D8as_v5 | 8 | 32 | No local disk | 16 | ~$253 |
*Approximate Linux pay-as-you-go rates in East US 2. Actual costs vary by region, OS, and discount programs.
AMD vs Intel Pricing
AMD-based VMs (the “a” sub-family like D8as_v5) typically cost 10-15% less than their Intel equivalents while offering comparable or better performance for most workloads. The AMD EPYC processors (Genoa in v5) match or exceed Intel Sapphire Rapids in most benchmarks. Always benchmark with your specific application, but AMD is often the better value proposition. ARM-based VMs (the “p” sub-family, powered by Ampere Cobalt processors) offer even greater savings for ARM-compatible workloads.
Memory Optimized: E-series
The E-series provides a high memory-to-CPU ratio (1:8, or 8 GB RAM per vCPU), making it ideal for memory-intensive workloads like relational databases, in-memory caching, and real-time analytics. If your application's primary bottleneck is available RAM rather than CPU, E-series delivers more memory per dollar than D-series.
Common E-series Use Cases
- SQL Server: Database workloads with large buffer pool requirements. E-series provides the memory headroom for in-memory OLTP and columnstore indexes.
- SAP applications: SAP NetWeaver and S/4HANA require significant memory. E-series (and M-series for very large instances) are SAP-certified.
- Redis / Memcached: In-memory caching layers benefit from maximum available RAM.
- Elasticsearch / OpenSearch: Search engines that keep indices in memory for fast query performance.
- Apache Spark: In-memory data processing frameworks that benefit from large executor memory.
| Size | vCPU | Memory (GB) | Est. Monthly Cost* | Notes |
|---|---|---|---|---|
| Standard_E4s_v5 | 4 | 32 | ~$183 | Entry-level memory-optimized |
| Standard_E8s_v5 | 8 | 64 | ~$366 | Good for mid-size SQL Server |
| Standard_E16s_v5 | 16 | 128 | ~$732 | Large databases, Elasticsearch clusters |
| Standard_E32s_v5 | 32 | 256 | ~$1,464 | SAP workloads, large analytics |
| Standard_E64s_v5 | 64 | 512 | ~$2,928 | Very large in-memory workloads |
| Standard_E96s_v5 | 96 | 672 | ~$4,392 | Maximum E-series memory |
Compute Optimized: F-series
The F-series offers a high CPU-to-memory ratio (1:2, or 2 GB RAM per vCPU) and the highest clock speeds in Azure. It is designed for workloads that are CPU-bound rather than memory-bound. F-series VMs use the latest high-frequency processors, making them the best choice for raw single-threaded performance.
F-series Use Cases
- Batch processing: CPU-intensive data processing, media transcoding, and ETL pipelines
- Gaming servers: Multiplayer game servers that need high single-core performance
- CI/CD build agents: Compilation and testing workloads benefit from fast processors
- Scientific computing: Financial modeling, Monte Carlo simulations, molecular dynamics
- Web servers (CPU-bound): Applications with heavy server-side processing and minimal memory needs
Burstable B-series: The Cost Optimizer
B-series VMs use a CPU credit model that makes them dramatically cheaper for workloads with low average CPU utilization. They accumulate CPU credits during idle periods and spend them during bursts. If your workload has an average CPU utilization below 20-30% with occasional spikes, B-series can be 50-70% cheaper than equivalent D-series VMs.
How the Credit Model Works
Each B-series size has a baseline CPU percentage. When the VM uses less than the baseline, it banks credits. When it exceeds the baseline, it spends credits. If credits are depleted, the VM is throttled to the baseline level. This makes B-series unsuitable for sustained high-CPU workloads but ideal for bursty, intermittent usage patterns.
| Size | vCPU | Memory (GB) | Baseline CPU % | Credits/hour | Max Banked Credits | Est. Monthly Cost* |
|---|---|---|---|---|---|---|
| Standard_B1s | 1 | 1 | 10% | 6 | 144 | ~$7.60 |
| Standard_B2s | 2 | 4 | 40% | 24 | 576 | ~$30.40 |
| Standard_B2ms | 2 | 8 | 60% | 36 | 864 | ~$60.70 |
| Standard_B4ms | 4 | 16 | 90% | 54 | 1,296 | ~$121 |
| Standard_B8ms | 8 | 32 | 135% | 81 | 1,944 | ~$243 |
# Check CPU credit balance for a B-series VM
az monitor metrics list \
--resource /subscriptions/<sub-id>/resourceGroups/myRG/providers/Microsoft.Compute/virtualMachines/myBVM \
--metric "CPU Credits Remaining" "CPU Credits Consumed" "Percentage CPU" \
--interval PT1H \
--output table
# List available VM sizes in a region
az vm list-sizes --location eastus2 --output table
# Check which sizes are available in specific availability zones
az vm list-skus --location eastus2 \
--query "[?resourceType=='virtualMachines' && contains(name, 'Standard_D')].{Name:name, Zones:locationInfo[0].zones}" \
--output table
# Resize a VM (may require deallocation for cross-family changes)
az vm deallocate --resource-group myRG --name myVM
az vm resize --resource-group myRG --name myVM --size Standard_D4s_v5
az vm start --resource-group myRG --name myVM
# List Azure Advisor right-sizing recommendations
az advisor recommendation list \
--category Cost \
--query "[?contains(shortDescription.solution, 'virtual machine')]" \
--output tableB-series Credit Depletion
If a B-series VM runs out of credits, performance drops to the baseline level (e.g., 10% of a vCPU for B1s). This can cause application timeouts, failed health checks, and service degradation. Monitor “CPU Credits Remaining” and set up an alert when credits drop below 20% of the maximum banked amount. If you frequently deplete credits, upgrade to a D-series VM. The consistent performance will be worth the additional cost.
GPU Accelerated: N-series
The N-series provides GPU-accelerated compute for machine learning, rendering, and visualization workloads. Azure offers several N-series sub-families with different GPU types optimized for different use cases.
| Sub-Family | GPU Type | GPU Memory | Optimized For | Starting Cost/mo* |
|---|---|---|---|---|
| NCv3 | NVIDIA V100 | 16-32 GB per GPU | ML training, HPC | ~$2,700 |
| NC A100 v4 | NVIDIA A100 | 80 GB per GPU | Large-scale ML training, LLMs | ~$3,600 |
| ND A100 v4 | 8x NVIDIA A100 | 640 GB total | Distributed ML training | ~$22,000 |
| NV-series v4 | AMD Radeon Instinct | 8-16 GB per GPU | Remote visualization, VDI | ~$800 |
| NCads A10 v4 | NVIDIA A10 | 24 GB per GPU | ML inference, rendering | ~$1,300 |
GPU VM Availability
GPU VMs have limited availability and are in high demand. Not all N-series sizes are available in all regions, and quota may be restricted by default. Request quota increases well in advance of need through the Azure portal (Support + troubleshooting → New support request → Quota). For ML training workloads, consider using Azure Machine Learning compute clusters which automatically manage GPU VM allocation and can use low-priority (Spot) instances for significant cost savings.
Storage Optimized: L-series
The L-series provides high local NVMe SSD throughput and IOPS, designed for workloads that need fast local storage access. The key differentiator is the massive local NVMe storage that is directly attached to the VM (not network-attached managed disks). This local storage provides single-digit microsecond latency and millions of IOPS.
L-series Use Cases
- NoSQL databases (Cassandra, ScyllaDB, MongoDB): Benefit from high local IOPS for write-heavy workloads
- Elasticsearch / OpenSearch: Index storage on NVMe for fast search queries
- Data warehousing (ClickHouse, Apache Druid): Analytical databases that scan large volumes of data
- Log analytics: Ingestion and indexing of high-volume log data
Local NVMe Storage Is Ephemeral
Local NVMe storage on L-series VMs is not persistent. Data is lost if the VM is deallocated, resized, or moved to a different host due to maintenance. Always replicate data to managed disks, Azure Storage, or use application-level replication (Cassandra replication, MongoDB replica sets) to protect against local storage loss. Local NVMe is for caching and temporary storage, not as a sole data store.
Managed Disk Types
The disk type attached to your VM significantly affects performance and cost. Azure offers five managed disk types, each suited to different IOPS and throughput requirements.
| Disk Type | Max IOPS | Max Throughput | Latency | Cost (128 GB) | Best For |
|---|---|---|---|---|---|
| Ultra Disk | 160,000 | 4,000 MB/s | Sub-ms | Variable | SAP HANA, top-tier databases |
| Premium SSD v2 | 80,000 | 1,200 MB/s | Sub-ms | ~$10/mo | Production databases, high-perf apps |
| Premium SSD (v1) | 20,000 | 900 MB/s | Single-digit ms | ~$19/mo | Production workloads (default choice) |
| Standard SSD | 6,000 | 750 MB/s | Single-digit ms | ~$10/mo | Web servers, dev/test, light workloads |
| Standard HDD | 2,000 | 500 MB/s | Tens of ms | ~$5/mo | Backup, archival, non-critical data |
Cost Optimization Strategies
VM compute is typically the largest line item in Azure bills. Several strategies can significantly reduce VM costs without impacting performance.
Spot VMs
Azure Spot VMs provide access to unused Azure capacity at discounts of up to 90% compared to pay-as-you-go pricing. The trade-off is that Azure can evict Spot VMs with 30 seconds notice when it needs the capacity back.
# Create a Spot VM with a maximum price
az vm create \
--resource-group myRG \
--name spot-worker \
--image Ubuntu2204 \
--size Standard_D4s_v5 \
--priority Spot \
--max-price 0.05 \
--eviction-policy Deallocate \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_rsa.pub
# Check current Spot pricing for a VM size
az vm list-skus --location eastus2 --size Standard_D4s_v5 \
--query "[].{Name:name, SpotPrice:capabilities[?name=='MaxResourceVolumeMB']}" \
--output table
# Create a VMSS with Spot instances for batch processing
az vmss create \
--resource-group myRG \
--name batch-workers \
--image Ubuntu2204 \
--vm-sku Standard_F4s_v2 \
--instance-count 10 \
--priority Spot \
--eviction-policy Delete \
--max-price -1 \
--single-placement-group falseReserved Instances and Savings Plans
| Option | Commitment | Flexibility | Savings | Best For |
|---|---|---|---|---|
| 1-Year Reserved Instance | Specific VM size + region | Size flexibility within family | ~36% | Stable, known VM requirements |
| 3-Year Reserved Instance | Specific VM size + region | Size flexibility within family | ~56-72% | Long-term, predictable workloads |
| 1-Year Savings Plan | Hourly compute spend amount | Any VM, App Service, Functions, AKS | ~15-30% | Dynamic workloads, multi-service |
| 3-Year Savings Plan | Hourly compute spend amount | Any VM, App Service, Functions, AKS | ~30-65% | Long-term compute commitment |
Azure Hybrid Benefit
If you have existing Windows Server or SQL Server licenses with active Software Assurance, apply Azure Hybrid Benefit (AHUB) to your VMs for up to 40% savings on Windows VMs and 55% on SQL Server VMs. This stacks with Reserved Instances, meaning you can combine a 3-year RI with AHUB for total savings of 80%+ compared to pay-as-you-go with included licensing. Enable AHUB per VM:az vm update --resource-group myRG --name myVM --license-type Windows_Server
Choosing the Right VM Size
Follow this decision framework to select the best VM for your workload:
- Profile your workload: Understand CPU, memory, disk IOPS, and network throughput requirements. Use Azure Monitor to measure actual utilization patterns on existing workloads, or use vendor sizing guides for new deployments.
- Select the right family: Match the CPU:memory ratio to your needs. D-series (1:4) for balanced, E-series (1:8) for memory-heavy, F-series (1:2) for CPU-heavy, B-series for bursty/low-utilization.
- Choose the latest generation: Always prefer v5 or v6 over older generations. Better performance at the same or lower cost.
- Consider AMD vs Intel: AMD VMs are 10-15% cheaper with comparable performance. Test with your workload and choose based on benchmarks.
- Right-size continuously: Use Azure Advisor to identify VMs running below 40% average CPU. Downsize to the next smaller size or switch to B-series for consistently low utilization.
- Apply cost optimizations: Spot VMs for interruptible work, Reserved Instances for steady-state, Azure Hybrid Benefit for Windows/SQL, and auto-shutdown schedules for dev/test.
Check Availability Zone Support
Not all VM sizes are available in all regions and availability zones. Before designing your architecture around a specific VM size, verify availability usingaz vm list-skus --location eastus2 --output table. This is especially important for specialized sizes like M-series, N-series, and H-series which may only be available in specific zones or require quota requests.
Key Takeaways
- 1B-series burstable VMs are cost-effective for variable workloads with low average utilization.
- 2D-series general-purpose VMs are the default choice for most production workloads.
- 3E-series memory-optimized VMs suit databases, caching, and in-memory analytics.
- 4F-series compute-optimized VMs excel at CPU-intensive tasks like batch processing.
- 5N-series GPU VMs support AI/ML training, rendering, and high-performance computing.
- 6Use Azure Advisor and right-sizing recommendations to optimize VM costs.
Frequently Asked Questions
What do Azure VM series letters mean?
Should I use B-series VMs for production?
What is the difference between Dv5 and Dsv5 VMs?
How do I choose between D-series and E-series?
Can I resize a running Azure VM?
Written by CloudToolStack Team
Cloud engineers and architects with hands-on experience across AWS, Azure, and GCP. We write guides based on real-world production patterns, not just documentation rewrites.
Disclaimer: This guide is for educational purposes. Cloud services change frequently; always refer to official documentation for the latest information. AWS, Azure, and GCP are trademarks of their respective owners.