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. We’ll focus on picking the “best” Azure VM size for your workload. 

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.

Which Azure VM sizes should I use?

Azure has many storage options for most workloads you want to run in Azure. Lifting and shifting your apps and workloads to a virtual machine or more than one virtual machine is easily achieved without rearchitecting your apps or writing new code. You can deploy workloads to Azure dedicated hosts that provide single tenant dedicated servers for your organization. This makes it the equivalent of running your datacenter in an Azure cloud datacenter. The comprehensive range of hundreds of VMs offered in Azure allows you to run at the scale and performance you need for both Azure Linux VM sizes and Windows workloads. The Linux kernel is tuned for Azure environments meaning it is tuned for what you need and there is no need to repackage your apps and services. 

You can perform an Azure change VM size to switch among VM types and sizes at any time and leverage free tools like Azure Migrate to assess requirements for on-premises workloads and right-size the VMs in Azure. Azure migrate provides a unified migration platform and a range of tools that allow migrating, servers, databases, and web apps to the Azure cloud without issue. It provides integrated tools that help to discover and assess servers, databases, and web apps.They also give you the CPUs from Intel, AMD, and GPUs from NVidia to take advantage of the latest innovations that are current in the industry.

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. Note the following as we compare Azure VM sizes:

  • General Purpose (Av2, B, Dv3, DsV3, v4 and v5) – Balanced ratio of CPU and memory. Azure VM sizes ideal for testing and development, small to medium databases, and low to medium traffic web servers.
  • Compute-optimized (Fsv2, FX) – Azure VM sizes for high CPU use. Good for medium traffic web servers, network appliances, batch processes, and application servers.
  • Memory-optimized (Ev3, Esv3, v4 and v5  M, Msv2) – Azure VM sizes for high memory to CPU ratio. Great for relational database servers, medium to large caches, and in-memory analytics.
  • Storage optimized (Lsv2) – High disk throughput and IO. Includes Azure VM sizes ideal for Big Data, SQL, NoSQL databases, data warehousing and large transactional databases.
  • GPU (NVv3, NVv4, NCv3 and many others) – Specialized workloads for graphics or AI. Azure VM sizes containing specialized virtual machines targeted for heavy graphic rendering and video editing, as well as model training and inferencing (ND) with deep learning. Available with single or multiple GPUs.
  • High performance (HBv2, HBv3, HC) – Azure VM sizes with the fastest (and most expensive) VMs with high CPU and memory along with high-throughput network interfaces (RDMA) 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, and 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 that 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 / D and DsV3, v4 and v5 series VMs are designed as entry-level VMs and offer consistent processor performance with different memory capacities 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.
  • DCsv3/DCdsv3-series VMs are optimized to securely protect sensitive data and applications using Intel processors with SGX technology, whereas the DCasv5 and DCadsv5 series offer the same functionality based on AMD processors.

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, FX).

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 (large sizes) series VMs offer a variety of memory options for different ratios of memory to CPU.
  • Esv5 / Ev5 (and v3, v4) -series VMs offer hyper-threaded processors which means that they are optimized for virtualized databases, making them more powerful than the D-series.
  • M-series VMs support both massive amounts of memory (over 11 TB) along with the highest virtual CPU count (up to 416 vCPUs), making them ideal for applications that also have a high CPU processing requirement.

Storage Optimized VMs

For workloads that 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.

GPU VMs

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 (NVv3, NVv4, NCv3 and many others) VMs vary mostly based on processing power, however, make sure you’re looking at the right series, depending on if you’re doing  remote visualization, such as graphics rendering or computer-aided design (CAD) or if you’re using the GPUs for Machine Learning training. 

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 (and also physical servers). 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 Azure VMs that match or exceed 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.

Wrap-Up

Azure VM sizes include many different options for organizations looking at taking advantage of the Azure cloud with virtual machines tailored to the specific types of workloads businesses are looking at running in the cloud. Coupled with Azure Migrate, you can seamlessly migrate workloads existing on-premises to the Azure cloud with the assessment and deployment tools needed. 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 with Azure VM sizes you are using and why!

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!

Frequently Asked Questions

Azure VM Sizes come with focuses on different categories. These include general purpose, compute optimized, memory optimized, storage optimized, GPU, and high performance compute. For general purpose workloads, the sizes are: B, Dsv3, Dv3, Dasv4, Dav4, DSv2, Dv2, Av2, DC, DCv2, Dv4, Dsv4, Ddv4, Ddsv4, Dv5, Dsv5, Ddv5, Ddsv5, Dasv5, Dadsv5. Compute optimized Azure VM sizes include the followint: F, Fs, Fsv2, FX. Memory optimized Azure VM Sizes include: Esv3, Ev3, Easv4, Eav4, Ebdsv5, Ebsv5, Ev4, Esv4, Edv4, Edsv4, Ev5, Esv5, Edv5, Edsv5, Easv5, Eadsv5, Mv2, M, DSv2, Dv2. Storage optimized Azure VM Sizes include: Lsv2. Finally, for high performance compute, the Azure VM sizes available are: HB, HBv2, HBv3, HC, H.
These include general purpose, compute optimized, memory optimized, storage optimized, GPU, and high performance compute.
With Azure VM sizes, each data disk can be up to 32,767 GiB. The number of data disks you can use depends on the size of the virtual machine in each virtual machine category. You can also increase Azure VM disk size if you need new Azure VM disk sizes for storage that exceeds what was initially configured.
The term “largest” Azure VM sizes can mean many different things. As you noticed above, there are various categories of Azure virtual machines. Each category is optimized for a specific use case, including CPU, memory, graphics, and storage. So, the largest in one category for CPU, memory, graphics, and storage is usually relative to that specific category. Azure VM sizes such as the Mv2-Series, is by far the largest-memory virtual machine offered on Azure and provide unparalleled computational performance to support large in-memory databases.
Back in 2019, Microsoft announced the introduction of the B-series included in the available Azure VM sizes. The B1ls, which has the smallest memory and lowest cost among Azure VM instances, provides customers who were looking for entry-level offerings with Azure VM sizes including 512 MiB of memory and 1 vCPU. It costs only $0.0052 (US East) per hour

33 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,

    Ioannis

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.