When you’re looking for some serious compute power in the cloud, on-demand and flexible, Azure’s got you covered. The difficulty? Choosing the compute offering that fits your requirement without overpaying on performance you don’t need.
With hundreds of different Virtual Machine sizes (and series) to choose from in Azure, you may get lost in choosing the right size that offers the perfect fit for your requirements. When looking for compute performance, you may be tempted to go for the ‘High performance compute’-series just because you think you need lots of power. Knowing how Azure’s different virtual machine offerings relate to each other gives you a better understanding of your options and enables you to make better choices.
Azure Virtual Machines and CPU types
Azure has segmented its compute offering in several virtual machine ‘types’ or series which represent a group of sizes with a similar compute purpose. These types range from General purpose to High performance compute and include some specialty types like the GPU-series. As per Azure Docs the overview of the currently offered types:
|Virtual machine type||Available sizes||Purpose|
|General purpose||B, Dsv3, Dv3, Dasv4, Dav4, DSv2, Dv2, Av2, DC, DCv2||Ideal for testing and development, small to medium databases, and low to medium traffic web servers.|
|Compute optimized||Fsv2||Good for medium traffic web servers, network appliances, batch processes, and application servers.|
|Memory optimized||Esv3, Ev3, Easv4, Eav4, Mv2, M, DSv2, Dv2||Great for relational database servers, medium to large caches, and in-memory analytics.|
|Storage optimized||Lsv2||Ideal for Big Data, SQL, NoSQL databases, data warehousing and large transactional databases.|
|GPU||NC, NCv2, NCv3, ND, NDv2 (Preview), NV, NVv3, NVv4||Heavy graphic rendering and video editing, as well as model training and inferencing (ND) with deep learning.|
|High performance compute||HB, HBv2, HC, H||Azure’s fastest and most powerful CPU virtual machines with optional high-throughput network interfaces (RDMA).|
Differences between CPU and vCPU, cores and virtual processors in Azure
There is quite a lot of confusion and misunderstanding regarding Azure’s move to Virtual CPU’s or vCPU’s.
In essence the difference between the newer vCPU’s and regular CPU’s (or ‘Cores’ in Azure) is that the vCPU’s are created and managed by the platform’s hypervisor, abstracted from the actual physical processors on a hardware level. Additionally, to make things clear, a ‘core’ refers to a physical core, on a hardware level, while a vCPU or virtual processor (the same thing as a logical processor) as the name suggests is virtualized and thus not physical.
With the newer vCPU-machine series (from v3) supporting hyper-treading, you can end up with more vCPU’s than actual physical cores on a particular machine. This is because hyper-treading essentially doubles the processing units a machine has, so a 2-core machine with hyper-treading will show up as a 4-core (as in 4 logical processors) machine. But does not deliver the same performance as a ‘native’ 4-core machine (far from it).
So having 4 vCPU-processors (using hyper-treading) is performance wise very different to having 4 ‘regular’ physical cores (no hyper-treading). Keep this in mind when estimating your compute needs in Azure. If you want to know which VM series have hyper-treading enabled, look for the vCPU:Core-ratio in the Azure ACU docs where the ratio is 2:1 (Hyper-threaded and capable of running nested virtualization).
Azure Compute Unit and performance benchmarks
If you’re wondering how different VM series compare to eachother in terms of compute performance, Azure has introduced the ACU for that. ACU stands for Azure Compute Unit and is a relative measure of compute power among Azure’s virtual machines. Keep in mind that ACU is only a guideline and not a strict comparison.
For a more strict comparison between virtual machines check out of the Azure VM benchmarks using CoreMark (Linux) and SPECInt (Windows).
CPU benchmarks for Linux VM’s:
CPI benchmarks for Windows VM’s:
Use Azure Advisor to reduce VM cost
Azure Advisor is a free-of-charge service from Azure that helps you optimize your Azure services. Aside from security and availability recommendations, Azure Advisor also provides you with cost recommendations. These can help you gain insight into VM’s that might benefit from right-sizing or even shutdown in the case of under utilization.
A note on migrating from On-Premises to Azure IAAS and VM size
A common approach when migrating machines from on-premises, native or virtualized, is to find a direct match with an Azure virtual machine in terms of cpu type and cores, memory and IOPS.
Albeit this makes sense initially, you have to realize that the power of Azure’s IAAS is its flexibility when it comes to resources and scale. It is generally a solid approach to either starting on a smaller VM size than you have on-prem and scaling up when needed (‘permanently’ or perhaps only during a certain season). Or alternatively starting with a similar VM size and then actively looking to scale down when possible. These strategies harass the flexibility of cloud computing and generally result in a more economical approach to managing VM performance in Azure.