Choosing the correct Azure VM to deploy is a vital step that one must undertake in Infrastructure as a Service (IaaS) projects. Whether you are building from a new (green fields) environment or migrating current workloads, there is a vast array of Azure VMs to choose from, each with different capabilities and pricing structures.
This article aims to assist with some of the thought process when choosing the best Azure VM and detail some of the tools that are available, and that I use, to help choose the most appropriate Azure VM for the job.
This article grew out of a simple request. “Simon, how do you choose the best VM for the job”. If you want to jump ahead to see my favourite day-to-day tool, then click here to jump to my review of AzurePrice.com
Before we start, it’s important to understand that all Azure VMs are categorized into Virtual Machine series’ (or type) such as A-series, B-series, etc; and within each series there are multiple SKUs (Stock Keeping Unit) or sizes (sometimes known at t-shirt size) that determine the level of resources such as CPU, RAM and storage capabilities in the VM.
Virtual Machine Types
Each VM type is designed to run a different category of workload. For example, the D-Series VMs are a great all-rounder that offer and great balance of CPU and RAM for most enterprise workloads, whereas the E-Series is optimised for heavy in-memory applications such as databases. If you need graphics rendering or video editing, then the N-Series has GPU capabilities.
Below is a list of the Azure VM series, with a brief overview of what their appropriate use case is.
A-Series: Entry-level VMs for Dev/Test
The A-series is Azure’s entry-level series, featuring a balanced CPU-to-memory ratio. These are intended for development workloads, test servers, and low-traffic web servers. NOTE: Sadly the A-Series will be retired in Aug 2024. Basic and Standard A-series VMs will retire on 31 August 2024 | Azure updates | Microsoft Azure
B-Series: Economical Burstable VMs
The B-series VMs offer a low to moderate level of CPU performance as a baseline but have the ability to burst up to much higher CPU utilisation when needed. These VMs are great for workloads that do not need the full CPU continuously, like web servers, small databases, and development environments but require the flexibility to ‘burst’ when under greater loads.
D-Series: General Purpose Computer
The D-series VMs feature a great balance of CPU, memory for most production workloads and are a good choice for enterprise applications, web-servers and entry-level databases.
E-Series: Optimized for In-Memory Applications
The E-series VMs are optimized for heavy in-memory operations like large databases or heavy data-processing and are well suited for memory-intensive enterprise applications, such as SAP, SQL databases, and high-performance computing.
F-Series: Compute Optimized VMs
The F-series VMs provide a higher CPU-to-memory ratio with a focus on compute performance and are ideal for compute-intensive applications such as batch processing, web servers, and analytics.
G-Series: Memory and Storage Optimized VMs
The G-series VMs offer large amounts of memory and storage, up to ½ TB of RAM and 32 CPUs, making them suitable for heavy database workloads.
H-Series: High Performance Computing VMs
The H-series is tailored for high-performance computing, featuring fast CPUs, good memory-to-CPU ratios, and optional higher-throughput network interfaces. These VMs are suitable for scientific modelling, research, and simulations that require heavy computations and parallel processing.
L-Series: Storage Optimized VMs
The L-series VMs are storage optimized for workloads requiring low latency, high-throughput storage such as NoSQL databases like Cassandra and MongoDB.
M-Series: Memory Optimized VMs
The M-series VMs are designed for extremely large databases or other applications requiring a tremendous amount of in-memory capacity and are used for applications such as SAP HANA, SQL Server, and other applications requiring massive memory overhead.
N-Series: GPU Enabled VMs
The N-series VMs feature GPUs for graphics and compute acceleration and are appropriate for workloads that require GPU capabilities like AI, machine learning, and graphics rendering.
Virtual Machine Sizes
When it comes to the different SKUs or VM sizes it is the tools below that are going to help you choose the correct size but it is useful to understand the naming structure.
The full detail of the naming structure with examples are detailed here: Azure VM sizes naming conventions – Azure Virtual Machines | Microsoft Learn
‘Generally’ the structure is:
[Family] + [Sub-family]* + [# of vCPUs] + [Constrained vCPUs]* + [Additive Features] + [Accelerator Type]* + [Version]
From a high-level point of view, we can quickly see the family and the number of CPUs when looking through a list. For example, if we look up the following VMs we can easily understand that they all have 16 vCPUs.
- Standard_D16_v3
- Standard_D16_v4
- Standard_D16_v5
What is harder to tell are the finer details, and these we have to look up. For example:
- Standard_D16_v3 uses Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
- Standard_D16_v4 uses Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
- Standard_D16_v5 uses Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
As the version number increases so does the underlying infrastructure and you get a bit more bang-for your buck as the version numbers rise, so as a rule of thumb go for the latest versions that is available in your region and review these periodically.
NOTE: There are some SKUs that don’t follow the vCPU rules. For example, the D12 VM has 4 vCPUs. These are older Azure VMs (generation 1) so just double check. Also, older versions of certain SKUs come with ephemeral temporary drive that are very high-speed but are wiped with every restart. These should only be used for storage of temporary information or paging files.
As you can see, with each new version of VM family, the processing power tends to increase. You should note this if you are planning a lift-and-shift migration of workloads from aging hardware onto Azure. Just because your on-prem server or VM has 8-cores, does not always mean you need 8-cores when you move into the cloud.
Microsoft have various tooling to help with Migrations that can help correct-size you VMs.
Virtual Machine Pricing
Having reviewed the VM type and size, you also have several pricing models that you can choose from before finilising your decision
Pay-As-You-Go
This is where most people start. It is the most flexible pricing model and essentially a no-commitment, pay-for-what-you-use plan, where you’re billed monthly for the resources you consume. There are cheaper options as detailed below, but as a low-risk entry point into Azure, or if you have fluctuating or temporary workloads, this is the correct plan.
For more info see https://azure.microsoft.com/en-us/pricing/purchase-options/pay-as-you-go/
Reserved Instances
Reserved Instances (RIs) allow you to reserve a virtual machine (VM) for a one- or three-year term which affords you a significant discount over the same VM in the pay-as-you-go model. The commitment is paid upfront or monthly, and in exchange, you get up to a 70% discount compared to the pay-as-you-go pricing.
For workloads that have consistent performance requirements over time, and where the usage is predictable and can be forecasted for the next 1 to 3 years this is a great way to reduce your Azure expenditure significantly.
For more info see https://azure.microsoft.com/en-us/pricing/reservations/
Azure Savings Plan for Compute
Azure savings plans for compute is a pricing model that provides savings up to 65 percent off pay-as-you-go pricing. This is not dissimilar to Reserved Instances, that we covered above but rather than committing to certain VM workloads, this is a commit to spend a certain amount per hour for one or three years.
This is a bit more flexible than RIs in that you can turn on and off, add and remove VMs as your workload requirement fluctuate over time.
If your usage is less than or equal to your hourly amount:
- Get lower, savings plan prices.
- Pay the full hourly amount, even if usage is less.
- Incur no additional costs—usage is covered by the plan.
If your usage is greater than your hourly amount:
- Usage up to your hourly amount is billed at lower prices and included in the cost of your plan.
- Additional usage is billed at pay-as-you-go prices and invoiced separately.
For more info see https://azure.microsoft.com/en-us/pricing/offers/savings-plan-compute/
Spot Pricing
Spot VMs offer unused Azure computing capacity at a significant discount based upon unused capacity in Azure datacentres at any given time. However, these instances can be destroyed (essentially taken back by Microsoft) with little or no notice when Azure needs the capacity.
The price of Spot VMs can vary based on supply and demand and are ideal for workloads that can be interrupted, like batch processing jobs, development, and testing environments.
https://azure.microsoft.com/en-us/products/virtual-machines/spot/
Hybrid Benefit
Not a pricing model but Azure Hybrid Benefit is a price break for customers who already own Windows Server or SQL Server licenses with Software Assurance. It allows these users to use their on-premises licenses to run VMs in Azure at a reduced cost. Read the fine print and at some point, I will write up a post expanding on Hybrid Pricing.
For more info see https://azure.microsoft.com/en-us/pricing/hybrid-benefit/
VM Region
Finally, one should check the different regions that you can deploy in. Regions can make a huge difference to the hour cost of a VM. Just don’t forget to take into consideration the cost of moving data if using multiple regions.
Choosing the Correct Azure VMs
From everything above, you can see that choosing the correct Azure VM SKU is quite an artform all on its own – and one can go quite deep into getting the best VM at the best price. So, let’s look at the various tools that can help with the process.
Microsoft VM Price List
First of all, let’s start with the Microsoft pricing page for VMs. It’s very long but it does have the ability to filter based on OS, Category (general, Compute Optimised, Memory, Optimised, etc), VM series, Region, etc).
https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/
https://azure.microsoft.com/en-us/pricing/details/virtual-machines/windows/
As you review the different VMs you also have the opportunity to add your chosen VM to the Azure Pricing Calculator, which we will discuss next.
Azure Pricing Calculator
The Azure Pricing Calculator is the go-to tool for building out an overall pricing bill of materials (BOM) for your Azure deployment. It is designed to provide users with cost estimates for Microsoft Azure services.
https://azure.microsoft.com/en-us/pricing/calculator/
It’s an interactive online tool that allows you to simulate and calculate the price of your Azure services, and you can create a detailed cost for the various scenarios and the services you plan to use.
The process is quite intuitive; you simply select the Azure products you’re interested in, such as virtual machines, storage, or databases, and adjust their features. You select the region and input configuration, and this produces a BOM.
You can export the BOM to Excel as well as saving for later access. Once saved you can also duplicate so as to compare different configurations (PAYG vs RI for example).
Azure VM Selector
The Azure VM Selector is a tool that steps a user through the process of selecting a VM starting from 3 points: Workload Type, OS and Software or Regions
Once you start stepping through the screen the number of potential VMs is reduced until you end up at a results page with a recommended VM and some additional options.
From the recommendations you can add the VM to the Azure Calculator or click “Add to configuration” to deploy the specified VM via the Azure Portal.
AzurePrice.net
I saved the best for last! AzurePrice.net is my go-to tool when it comes to choosing the correct VM for a use case.
AzurePrice.net has a very simple interface that you can use to filter the list of potential VM but for me where it really come into it’s own is the ability to add so many columns to list.
The list includes (there are lots):
- Max disks
- Price per Memory
- Price per vCPU
- Support Premium Disk
- Performance Score
- Combined IOPS
- Uncached Disk IOPS
- Combined Write B/Sec
- Combined Read B/Sec
You can the sort buy these additional columns so if you or your client have specific requirements, whatever it is this helps with your decision process.
Clicking through to a specific VM gives you all the VM specs on one page.
Also, on the listing page there is a ‘Find Better’ link which gives a list of similar VMs as possible alternatives and price difference percentages. This also appears at the foot of the individual VM pages.
The tool really helps me research the different possibilities and narrow down the most appropriate VM for my projects.
Paid Service
I haven’t tried this out yet but there is also a paid service that offers some additional features.
- View ALL best price regions
- Pricing for Reserved 1-3y
- Compare more than 2 VMs
- VMs recommendations
- Programmatic API access
- Price/Perf for Reserved 1-3y
The full details of these additional features is available on the Pricing page.
Conclusion
I hope this is found to be helpful.
What tooling do you use? What tools have I missed and what additional considerations do you take when making decisions about which Azure VM to deploy.
I’m excited to see if there are other methodologies of tools that people use. Let me know in the comments below.
I also use azureprice.net a lot. I’ve not come across the VM selector tool before – defiantly looks useful. Thanks