BlueXP Blog

Azure Linux VM Pricing: Cost Models and Best Practices

Written by Jeff Whitaker, Cloud Data Services | Sep 9, 2020 9:49:11 AM

Azure Virtual Machines (VMs) support a wide range of external solutions, including Linux. Azure VM pricing differs according to payment models and instance types and sizes. There are three Linux VM pricing models you can choose from—pay-as-you-go, reserved virtual machine instances, and spot pricing. Linux VM instance series types include general purpose, compute optimized, memory optimized, storage optimized, GPU, and high performance compute.

In this post, we’ll examine Azure Linux VM pricing models and types in detail, and explore best practices you can use to optimize your. We’ll also show how Azure NetApp Files can help improve availability and performance when deploying Linux on Azure.

In this article, you will learn:

Types of Linux Virtual Machines in Azure

When using Linux virtual machines (VMs) in Azure, there are six primary types you can choose from. Four of these types include sub-options of Azure Linux VM sizes, for further customization. You can see a breakdown of these types and the sizes available in each below.

Type Description Sizes
General Purpose Offer a balanced ratio of CPU-to-memory. These instances are suitable for low to medium traffic web servers, small to medium databases, or testing and development environments. Av2, B, DCv2, Dv2, DSv2, Dv3, Dsv3, Dav4, Dasv4, Ddv4, Ddsv4, Dv4, and Dsv4
Compute optimized Offer a high ratio of CPU-to-memory. These instances are suitable for application servers, batch processing, network appliances, or medium traffic web servers. Fsv2
Memory optimized Offer a high ratio memory-to-CPU. These instances are suitable for in-memory analytics, medium to large caches, or relational database servers. Dv2, DSv2, ev3, Esv3, Eav4, Easv4, Edv4, Edsv4, Ev4, Esv4, M, and Mv2
Storage optimized Offer high disk throughput and IO. These instances are suitable for data warehousing, transactional, SQL or NoSQL databases, and big data. Lsv2
GPU Offer GPU-based processing. These instances are designed for deep learning, model training and inference, video editing, or heavy graphics rendering. NC, NCv2, NCv3, ND, NDv2, NV, NVv3, and NVv4
High performance compute Instances offer premium CPU resources and support high-throughput network interfaces, including RDMA. These instances are designed for mission-critical, high compute workloads. H, HB, HBv2, and HC

Linux VM Pricing Models

When selecting VMs for your deployment, you also need to consider pricing. In Azure, there are three pricing models you can choose from—pay-as-you-go, reserved instances, and spot instances.

Pay-as-you-go
With the pay-as-you-go model you pay for resources used by the second. There is no upfront payment or long term commitments. You can scale your resources on demand and start or stop services at any time.

This Azure Linux VM pricing method is recommended for users who prioritize Azure VM cost and flexibility over performance, applications with short-term or unpredictable traffic, or development and testing.

Reserved Virtual Machine Instances
Reserved Virtual Machine Instances are VMs that you pay for in advance based on a one or three year commitment. This commitment is made in exchange for a discount of up to 72%. Your instances can be modified mid-contract and you can cancel the contract in exchange for switching to the pay-as-you-go price.

This Azure Linux VM pricing method is recommended for users who want to predictably budget costs and applications with reliable traffic flows.

Azure Spot pricing
When using spot instances you are using unused compute capacity from a variety of resources or locations. When using spot instances, you are granted compute power inconsistently as it becomes available. With this model, you exchange reliability for significant savings, up to 90%.

This Azure Linux VM pricing method is recommended for users with restricted budgets and workloads or applications that are not time sensitive and can withstand interruptions.

Azure Linux VM Pricing Per Instance Type

Below we provide pricing details for one representative “size”, from each of the six Azure instance types. You can see up to date pricing and more sizes in the official pricing page.

General Purpose Dsv3 Series

The Dsv3 series is based on Intel Cascade Lake, Skylake, or Broadwell processors and supports premium storage and caching. Below you can see a breakdown of instance sizes available:

Instance vCPU(s) RAM Temporary storage Pay as you go (per hr) 1 year reserved (per hr, ~40% Savings)
D2s v3 2 8 GiB 16 GiB $0.096 $0.0572
D4s v3 4 16 GiB 32 GiB $0.192 $0.1145
D8s v3 8 32 GiB 64 GiB $0.384 $0.229
D16s v3 16 64 GiB 128 GiB $0.768 $0.4580
D32s v3 32 128 GiB 256 GiB $1.536 $0.9160
D48s v3 48 192 GiB 384 GiB $2.304 $1.3286
D64s v3 64 256 GiB 512 GiB $3.072 $1.8320

Compute Optimized Fsv2 Series

The Fsv2 series is based on Intel Cascade Lake or Intel® Xeon® Platinum 8168 processors and supports premium storage and caching. This series also includes Intel’s hyper-threading technology. Below you can see a breakdown of instance sizes available:

Instance vCPU(s) RAM Temporary storage Pay as you go (per hr) 1 year reserved (per hr, ~41% Savings)
F2s v2 2 4 GiB 16 GiB $0.0846 $0.05
F4s v2 4 8 GiB 32 GiB $0.169 $0.10
F8s v2 8 16 GiB 64 GiB $0.338 $0.1999
F16s v2 16 32 GiB 128 GiB $0.677 $0.3999
F32s v2 32 64 GiB 256 GiB $1.353 $0.7998
F48s v2 48 96 GiB 384 GiB $2.03 $1.2084
F64s v2 64 128 GiB 512 GiB $2.706 $1.5996
F72s v2 72 144 GiB 576 GiB $3.045 $1.7996

Memory Optimized Ev3 Series

The Ev3 series is based on Intel Cascade Lake, Skylake, or Broadwell processors. Premium storage and caching are not supported and storage is billed separately. Below you can see a breakdown of instance sizes available:

Instance vCPU(s) RAM Temporary storage Pay as you go (per hr) 1 year reserved (per hr, 29-41% Savings)
E2 v3 2 16 GiB 50 GiB $0.126 $0.0782
E4 v3 4 32 GiB 100 GiB $0.252 $0.1564
E8 v3 8 64 GiB 200 GiB $0.504 $0.3128
E16 v3 16 128 GiB 400 GiB $1.008 $0.6257
E20 v3 20 160 GiB 500 GiB $1.26 $0.7409
E32 v3 32 256 GiB 800 GiB $2.016 $1.2513
E48 v3 48 384 GiB 1,200 GiB $3.024 $1.7781
E64i v3 1 64 432 GiB 1,600 GiB $3.629 $2.5722
E64 v3 64 432 GiB 1,600 GiB $3.629 $2.3586

Storage Optimized Lsv2 Series

The Lsv2 series is based on the AMD EPYC 7551 processor and is directly mapped to local NVMe storage. It does support premium storage but not premium caching. Below you can see a breakdown of instance sizes available:

Instance vCPU(s) RAM Temporary storage NVMe Disk Pay as you go (per hr) 1 year reserved (per hr, ~36% Savings)
L8s v2 8 64 GiB 80 GiB 1x1.9 TB $0.624 $0.3975
L16s v2 16 128 GiB 160 GiB 2x1.9 TB $1.248 $0.7950
L32s v2 32 256 GiB 320 GiB 4x1.9 TB $2.496 $1.5900
L48s v2 48 384 GiB 480 GiB 6x1.9 TB $3.744 $2.3850
L64s v2 64 512 GiB 640 GiB 8x1.9 TB $4.992 $3.1800
L80s v2 80 640 GiB 800 GiB 10x1.9 TB $6.24 $3.9749

GPU NCv2 Series

The NCv2 series is based on NVIDIA Tesla P100 GPUs and Intel Broadwell CPUs. It supports both premium storage and caching. Below you can see a breakdown of instance sizes available:

Instance Cores RAM Temporary storage GPU Pay as you go (per hr) 1 year reserved (per hr, ~36% Savings)
NC6s v2 6 112 GiB 736 GiB 1X P100 $2.07 $1.3187
NC12s v2 12 224 GiB 1,474 GiB 2X P100 $4.14 $2.6371
NC24rs v2 24

448 GiB

2,948 GiB

4X P100

$9.108 $5.8015
NC24s v2 $8.28 $5.2742

High Performance Compute HBv2 Series

The HBv2 series is based on AMD EPYC 7742 processors and supports premium storage. Each core includes 4GB of RAM. Below you can see a breakdown of the series specs:

Instance Cores RAM Temporary storage Pay as you go (per hr) 1 year reserved (per hr, ~25% Savings)
HB120rs v2 120 480 GiB 900 GiB $3.60 $2.70

Mv2 Series

The Mv2 series is based on Intel Skylake processors and supports premium storage. This series is designed specifically for large in-memory workloads and databases. Additionally, these VMs are certified for use with SAP HANA online analytical processing (OLAP) and online transactional processing (OLTP) workloads. Below you can see a breakdown of instance sizes available:

Instance Cores RAM

Temporary

storage

Pay as you go

(per hr)

1 year reserved

(per hr,

~42% Savings)
M208s v2

208

3.1TB 4.4TB $22.31 $12.9753
M208ms v2 6.1TB $44.62 $25.9505
M416s v2

416

8.8TB $49.58 $28.8352
M416ms v2 12.2TB $99.15 $57.6645

Best Practices to Optimize Azure Linux VM Costs

When selecting your Linux VMs in Azure, several best practices can help you optimize your costs without sacrificing performance.

Consider B-series virtual machines for general purpose
When running Azure Linux VMs, the biggest issue in terms of cost control is that machines typically require minimal resources and have inconsistent usage. This is an issue because machines are charged as long as the VM is active, regardless of if it’s currently being used.

A possible solution for this is to use B-series or burstable machines. These machines are designed for workloads that are inconsistent but need to always be available. When using B-series machines you can gain a discount between 15 to 55% off comparable D-series machines.

Find the right resource size
Right-sizing your resources can save you significant costs by minimizing the amount of idle resources you’re paying for. When right-sizing you want to choose resources that are as close to your workload requirements as possible.

If your workload is mission-critical, you should err on the larger side or the size closest to your maximum demand. However, if you can tolerate some latency, erring slightly under may be better.

When you are unsure how to size, there are dedicated cloud optimization tools that you can use to determine your optimal amount. These tools monitor your workloads and can provide feedback and recommendations based on test workloads or a period of standard use.

You can also use the metrics provided through the Azure Portal. In particular, you should pay attention to the Memory Percentage and CPU Percentage stats. If these stats are consistently under 50% you can reduce your machine sizes with minimal fear of performance impacts.

Use machines flexibly
Using mixed machines and incorporating spot instances into your deployment can help you reduce costs without affecting mission-critical workloads. In particular, you should consider using these instances for any batch processing you need to perform. These processes often are less time restricted and can be performed in the background or overnight.

Spot instances are also good for development and test environments. In these cases, you may not need to be as concerned about service level agreements or long term performance.

Leverage the Azure Hybrid Benefit
Azure Hybrid Benefit enables you to use existing SQL Server or Windows Server licenses with Azure resources. This can enable you to migrate workloads or extend workloads to the cloud without having to pay for additional licenses. You can also use this benefit with the SQL Database service and Azure Dedicated Hosts.

Azure Linux VM Pricing Optimization with Azure NetApp Files

Azure NetApp Files is a Microsoft Azure file storage service built on NetApp technology, giving you the file capabilities in Azure even your core business applications require.

Get enterprise-grade data management and storage to Azure so you can manage your workloads and applications with ease, and move all of your file-based applications to the cloud.

Azure NetApp Files solves availability and performance challenges for enterprises that want to move mission-critical applications to the cloud, including workloads like HPC, SAP, Linux, Oracle and SQL Server workloads, Windows Virtual Desktop, and more.

In particular, Azure NetApp Files frees up the storage bottleneck for VMs so compute services can operate at maximum performance. This may enable your organization to switch to lower-cost compute options, as there is no longer a need for overprovisioning to hit application or workload performance targets.