Whether you are deploying a virtual machine on the cloud or on-premises, you will go through a similar process to figure out which resources need to be optimized. Therefore, you need to consider the virtual CPU, memory, network utilization and disk I/O just like you would for a physical server.
Unlike physical hardware, on Azure you are not locked into your selection when you procure it, because is easy to monitor and adjust the utilization so that you are only paying for the capacity which you need.
This can provide you with significant cost-savings and operational flexibility as you can grow or shrink your VMs according to your business needs.
In this sense, 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
- The Azure general purpose VMs are recommended for workloads which do not require any significant amount of computation power, network traffic or disk IO
- Compute optimized (Fsv2, Fs, F) – High CPU
- 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.
- Memory optimized (Esv3, Ev3, M, GS, G, DSv2, Dv2) – High memory
- 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.
- Storage optimized (Lsv2, Ls) – High disk throughput and IO
- For workloads which require high disk throughput and IO, consider selecting a storage-optimized VM.
- GPU (NV, NVv2, NC, NCv2, NCv3, ND, Ndv2) – Specialized workloads for graphics or AI
- Azure’s GPU optimized VMs are designed for specialized workloads which run NVIDIA’s graphical processing units (GPUs).
- High performance (H) – These are the fastest (and most expensive) VMs with high CPU and memory for complex computational problems
- 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.
This categories of virtual machines will have an impact on the price, normally higher performance VM’s tend to be more expensive.
Let’s take for an example, a virtual machine with 24vCPUS, 48GB RAM and 31TB of storage capable of supporting at least 1200IOPS.
How to determine the price? We will make use of our handy Azure Calculator:
Then we can select our region, operating system, tier and instance series. However when selecting the instance type we are drowning inside a sea of different instance sizes, how can we make sure of taking the best decision and choosing the right virtual machine size for us?
If we are technically saavy and now how to code, this is not a big issue, we can use Azure Pricing API to get the prices we require using rest requests:
However this approach might not be the best for most people, is there an easy way? Let me present you Azure Price
You can use this free web application to find and compare Azure Virtual Machines specs and pricing on one page across different tiers, payment types, and regions, you just need to choose your region, number of vCPU, memory and you are good to go!
Check the column Best region price: it will help you to find the region where that particular VM is cheapest. Also, you should know that the prices are different across currencies. Sometimes the difference is significant, so check the exchange rates. To help you find the best VM for your money, please check the price/performance page.
The application is free to use and it has also paying plans to provide you with a simplified API layer to compare prices.
I’m not the author of this aplication, but it is indeed useful and has saved me a lot of time and headaches, kudos to the author and don’t hesitate to check it out!