In a recent design discussion with the development team folks we were talking about the Azure Low Priority VM’s deployment in their next project to save the cost and this is quite natural since after its launch in May it has drawn much attention from the press and many of you like other enterprises are trying to get the advantage of the Azure low cost low priority VM’s, however Azure low priority VM’s needs to have a good business case which can be correlated with good use case. Without a good business case and a good use case it will make no sense to experience the Power of Azure Low Priority VM’s
What is Azure Low Priority VM’s?
Similar to AWS spot instances, Microsoft also came out in last May with Azure Low Priority VM’s. Low Priority VM’s are the VM’s which are available at significant discounted price. Low priority VM’s are provided from the unused set of VM’s in Azure or in other words it can be allocated from the Azure Excess Compute Capacity to the customer who request for it.
Price for Azure Low Priority VM’s
Low-Priority Linux VM’s accompany 80% discount while the Windows VM’s accompany 60% discounted price. The discount is figured in contrast with their On-Demand hourly cost. This is available across most of the VM instance types in Azure.
A sample discounted price for the general purpose standard Av2 series windows instances can be seen below.
For more details on pricing of the Azure Low Priority VM’s please check this URL
Features of this low priority VM’s are as follows:
- Up to 80% discount, fixed price.
- Uses surplus capacity, availability can vary all the time.
- VM’s can be seized at any time.
- Available at all regions.
- Do more with same price.
Up to this everything is fine however please note the point number three where I have mentioned that the VM can be seized at any time so always remember that nodes can go up and down in Low Priority VM’s so all the workloads are not suitable for the Azure Low Priority VM’s, now the question is what type of workloads are suitable for the Azure Low Priority VM’s.
What type of workloads are suitable for the Azure Low Priority VM’S?
- The workload which is tolerant of interruption
- The workload which is tolerant of reduced capacity
Suitable Workloads are as follows
- Batch processing ( Asynchronous distributed jobs and tasks running on many VM’s)
- Stateless Web UI
- Containerized applications
- Map/Reduce type applications
- Job completion time flexible
- Short duration tasks
Low-priority VMs are currently available only for workloads running in Batch however it will be extended to other workloads in future.
Now as you see one of the most common use case is the Batch tasks and when we talk about the batch task one common example which will come to our mind is what will happen if the VMs when a job is interrupted due to VM preemption?
In case of any interruption the tasks will be automatically executed and rescheduled and re executed at a later stage when the VM’s are available again.
Lifecycle of the Low Priority VM’s batch job in case preemption
What are options of creating the low priority VM’s?
There are multiple options available with Azure low priority VM pool creation and it depends on what is the target.
Option 1: Lowering the cost
In this scenario all the VM’s will be configured as the low priority VM in the pool. No dedicated VM’s will be available.
Option 2: Lowering the cost with a guaranteed baseline
In this scenario the pool will be configured for fixed number of low priority VM’s and a fixed number of high priority VM’s (The number of low priority VM’s will be 60 to 80%)
Option 3: Lowering the cost while maintain a capacity
In this scenario pool will have all low priority, set dedicated = preempted. In this case batch will have full dedicated VM’s but if it find low priority VM’s it will scale down to the low priority VM’s
Steps to check number of Low Priority VM’s available currently
First navigate to Azure Batch Accounts
And click on create the batch account in your subscription.
Once the batch account has been created you should be able to find this as shown below
You can view the metrics of your low priority VM’s in the below Metrics tab
You can click on quota to see the available quota limit in this batch account
At present low-priority virtual machines (VMs) can be used to reduce the cost of Batch workloads. Low-priority VMs make new types of Batch workloads possible by providing a large amount of compute power that is also economical. If your organization is running lots of batch workloads everyday low priority is certainly will be one of your choice in Azure.