How to Choose the Optimal Size for Your Azure Virtual Machine

Save to My DOJO

How to Choose the Optimal Size for Your Azure Virtual Machine

You have finally decided to deploy your application in the cloud and now you have to begin the planning process. During this period, you will make some critical decisions, such as the cloud provider, cloud deployment type and cloud capacity that you will need. Selecting the best cloud provider depends on many factors including your current technology stack, which is outside the scope of this blog. We will use Microsoft Azure in our example, but these same best practices are applicable to all cloud providers, including Amazon AWS or Google Cloud.

Choosing your Deployment Method

Next, you need to decide on whether you will use SaaS, PaaS, IaaS, or some combination of deployment types. Software as a service (SaaS) is generally the easiest to use, but it has the least customization since you are restricted to using the software’s limited APIs or features. Platform as a service (PaaS), usually gives you the best performance by building apps that run directly in the cloud fabric, but these again may be limited by the APIs available. The most flexible option is to use infrastructure as a service (IaaS) which lets you deploy your own virtual machines (VMs), networks and storage in the cloud, allowing you to customize what runs inside those VMs. In this blog, we will help you select the best IaaS VM size to optimize your service when it runs in the public cloud.

Evaluating your Workload

Whether you are deploying a virtual machine in the public cloud or on-premises in your own datacenter, you will go through a similar process to figure out which resources need to be optimized. This means that you need to consider the virtual CPU, memory, network utilization and disk I/O just like you would for a physical server. However, unlike with physical hardware, you are not locked into your selection when you procure it, as it is easy to monitor and adjust the utilization so that you are only paying for the capacity which you need. This can provide significant cost-savings and operational flexibility as you can grow or shrink your VMs alongside your business or seasonal fluctuations. Microsoft Azure offers six categories of VMs which are optimized for different types of workloads, including:

  • General Purpose (Av2, B, DC, Dsv3, Dv3, DSv2, Dv2) – Balanced ratio of CPU and memory
  • Compute optimized (Fsv2, Fs, F) – High CPU
  • Memory optimized (Esv3, Ev3, M, GS, G, DSv2, Dv2) – High memory
  • Storage optimized (Lsv2, Ls) – High disk throughput and IO
  • GPU (NV, NVv2, NC, NCv2, NCv3, ND, Ndv2) – Specialized workloads for graphics or AI
  • High performance (H) – These are the fastest (and most expensive) VMs with high CPU and memory for complex computational problems

There are many different variations within a category which can make it confusing to pick the right size. To make the best choice, first understand which category of VM you need for that workload, then you can focus on evaluating the specific series type and VM size.

Selecting a VM size in Microsoft Azure

Figure 1 – Reviewing the numerous Azure VM sizes can be confusing!

General Purpose VMs

The Azure general purpose VMs are recommended for workloads which do not require any significant amount of computation power, network traffic or disk IO. They are recommended for small servers, low-traffic web servers, or development environments. If you are unsure about which type of VM to use, this is a good place to start. Here is a breakdown of the different series of general purpose VMs:

  • Av2 / Dv2 / DSv2 / Dv3 / Dsv3-series VMs are designed as entry-level VMs and offer consistent processor performance with different memory capacity and processors.
  • B-series VMs are designed for burstable workloads which means that they usually operate at a lower-performance CPU baseline, but have the ability to quickly expand and use additional capacity if needed.
  • DC-series VMs are optimized to securely protect sensitive data and applications using Intel processors with SGX technology.

Compute Optimized VMs

Azure’s compute optimized VMs are designed for medium-traffic application servers, web servers or virtual appliances which need a greater ratio of CPU to memory. If your virtualized workload needs a lot of processing power, such as for gaming, analytics or batching tasks, these VMs may be a great fit and include the multiple F-series options (Fsv2, Fs, F).

Memory Optimized VMs

If you wish to run a memory-intensive workload, such as a database server, you should select one of Azure’s memory optimized VMs. These VMs are designed to scale up to support the largest databases without performance impact. Here is an overview of the memory optimized VMs:

  • DSv2 / Dv2 / G / GS-series VMs offer a variety of memory options for different ratios of memory to CPU.
  • Esv3 / Ev3-series VMs offer hyper-threaded processors which mean that they are optimized for virtualized databases, making them more powerful than the D-series.
  • M-series VMs support both massive amounts of memory (almost 4 TB) along with the highest virtual CPU count (up to 128 vCPUs), making them ideal for applications which also have a high CPU processing requirement.

Storage Optimized VMs

For workloads which require high disk throughput and IO, consider selecting a storage-optimized VM. These VMs are designed for large databases, warehouses, and big data, and support SQL, NoSQL, Cassandra, MongoDB, Cloudera, Redis and much more. If you are unable to use PaaS for the data layer and have to set up a full database server within a VM, then select from the Lsv2 or Ls-series.


Azure’s GPU optimized VMs are designed for specialized workloads which run NVIDIA’s graphical processing units (GPUs). These processors are usually used for graphics, visualizations or compute-intensive artificial intelligence or machine learning applications. The GPU series (NV, NVv2, NC, NCv2, NCv3, ND, Ndv2) VMs vary mostly based on processing power, however, the NV and NVv2-series are recommended specifically for remote visualization, such as graphics rendering or computer-aided design (CAD).

High-Performance VMs

The final category of specialized VMs is for high-performance computer workloads which the GPUs cannot support, such as developing neural networks for AI, DNA modeling, or prime number factorization. These servers are often configured as nodes in a high-performance computing (HPC) cluster. As these VMs are expensive, they are usually run on a case-by-case basis for testing specific applications or workloads and are usually decommissioned when they are dormant.

Sizing Guidance with the Azure Migrate Service

Although we presented you with a lot of different considerations, Microsoft has tried to make the migration to Azure easy through its Azure Migrate service. This suite of utilities will help you determine which of your existing on-premises workloads are suitable for Azure, sizing recommendations, and estimated monthly costs. Not only will this assess your Hyper-V VMs running on Windows Server, but also any VMware VMs managed by vCenter. When looking at the storage, Azure Migrate tries to map every physical disk to a disk in Azure to evaluate the disk I/O. For the network, Azure Migrate will inventory the network adapters and measure their traffic. With the memory and CPU, Azure Migrate will recommend an Azure VMs which matches or exceeds the same resources running in the original virtual machine. Once you have successfully deployed your VMs in a public cloud, make sure that you continually monitor them for performance and regularly check your bills. It is easy for you to make adjustments with virtualized resources so that you can optimize the size of your VMs for the public cloud.


What about you? What VM sizes have worked well for your own workloads? Have you found some that fit your uses better than others? Let us know in the comments section below!

Thanks for reading!

Altaro Hyper-V Backup
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

31 thoughts on "How to Choose the Optimal Size for Your Azure Virtual Machine"

  • Ioannis Sfetsas says:

    Hi Symon,

    My name is Ioannis from Greece.

    Please I would like to ask a question for a future project.

    I would like to be advised what azure VM machine and sources would I need and of course the monthly price for a project with the following futures:

    1. Around 50 representatives around Greece, will login into the platform in azurewebsites and mostly will enter data for customers such as Name, Nationality, Sex, Date of Birth, Tour Name, Price and maybe 2-3 more fields. Each representative will be able to print to a local printer or send by e-mail via the platform, a personal voucher or a boarding pass on a A4 paper.

    2. Around 15 ticket centers, should be able to login into the platform, enter the same data as above for every customer and also print a ticket to a local thermal printer.

    3. From the Main office of the company, 5 people should be able to login to the platform, create reports such as list of passengers on a specific tour, turnover of the day, and many more reports

    4. In a period of 5 months, should be around 70,000 such passengers

    5. Each day will be maximum 600 customers taking some tour.

    The project is written using Angular (front end) and node.js (back end) and SQL Server

    Please contact me at [email protected] for any questions you might have.

    The project should start running middle of this coming May/2021

    Thanks in advance,


Leave a comment or ask a question

Your email address will not be published. Required fields are marked *

Your email address will not be published.

Notify me of follow-up replies via email

Yes, I would like to receive new blog posts by email

What is the color of grass?

Please note: If you’re not already a member on the Dojo Forums you will create a new account and receive an activation email.