Save to My DOJO
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.
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.
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.
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.
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!
Not a DOJO Member yet?
Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!