Azure Reservations help you save money by pre-paying for one-year or three-years or monthly but commitment for 1 or 3 years of virtual machines, SQL Database compute capacity, Azure Cosmos DB throughput, or other Azure resources. Pre-paying allows you to get a discount on the resources you use. Reservations can significantly reduce your virtual machine, SQL database compute, Azure Cosmos DB, or other resource costs up to 72% on pay-as-you-go prices.
I would like to talk about how best we can utilize reserved instances (RI) and other techniques (runbooks) to bring more cost savings. We will also talk about how we can decide whether we should go with RI or on Demand Virtual Machines (VMs).
Let’s look at the some of the terminologies and how is it being used in the buy the RI from Microsoft.
- 1 Year commitment – Paid upfront or monthly
- 3 Years commitment – Paid upfront or monthly
Microsoft has recently announced monthly payment of RI price which is really a welcome move from Microsoft. You can buy new reservations with monthly payment frequency and you can convert the existing RIs when you renew it to get the bills monthly.
You get the recommendation from the Azure Advisor which is available in the Azure portal for all the subscriptions. It is based on your usage. However, it is good if we could plan to select the right VM SKUs. Will talk about it.
One thing that you must remember that reservation discount is ‘USE IT OR LOSE IT’. You can’t carry forward unused reserved hours.
Generally, you do not get any benefits from RI if the VMs are not utilized above 60-70%. But I will talk about this how we can bring additional benefits on such scenarios.
I will be talking only about VM RI in this blog.
To plan, you need to know few things.
- You must be subscription owner for buy the RI.
- You cannot purchase the RI for future, RI terms starts immediately after purchase.
- For CSP, you need to use the Partner Center to perchance the RI.
- EA customer can limit this to EA admins by disabling the Add Reserved Instances option in EA portal.
- Your reservation discount can be applied to multiple subscription or you can limit to a specific subscription.
- You can update the scope even after buying a RI.
- EA, you will be billed from the EA credit and PAYGO, it will be billed from your credit card upfront.
- Azure Reservation does not allow ‘AutoRenew’. You need to renew it, or you will be charged PAYGO after the reservation is over.
- Software cost is not included in the Azure reserved VM instances. If you do not get hybrid benefits you will be charged for the Windows license cost as well.
- VM reservation does not cover the disk cost and snapshots.
- The reservation does not reserve (guarantee) the VM capacity in that region.
- There are restrictions with RI
- VM series – A-Series, Av2-Series, or G-series.
- VMs in Preview
- German or China regions
- Subscription with insufficient quota.
- Azure capacity restrictions in the region.
- Azure VM RI can be applied to
- VM scale set
- Azure Batch user
- You will be charged 12% as termination charges and you will be refunded prorated basis if you are terminating it.
- There are no charges for the exchange but;
- The new Azure Reserved VM instances purchased must be of equal or greater than the prorated credit from the original Azure reserved instances.
- Exchange can be done only against same Azure services as VM to VM.
When Microsoft has added instance flexibility, which brought in great level of flexibility managing RIs. You need to understand Instance flexibility, VM group and ratio to plan this properly. Ratio would be useful to plan your RIs, but it cannot be used during the RI purchase (no option available to use ratio).
Instance flexibility – Instance size flexibility automatically applies the Reserved Instance savings to any VM that you use within the same region and within the same Azure RI ‘VM group’. Instance size flexibility can apply your RI purchases for the VMs which are not currently being used. if you have purchased a D8s_v3 RI in the East US region, instance size flexibility will look to apply the 8-cores RI benefit to any other Ds_v3 VMs running in the same East US region. That could be a combination of four 2-core VMs (D2s_v3) or two 4-core VMs (D4s_v3) or covering half the cost of a single 16-core VM (D16s_v3).
VM Group – An Azure RI ‘VM group’ is simply a list of VMs to which instance size flexibility can be applied. A VM group is aligned with the existing Azure VM series.
Let’s look at some scenarios and how useful this is. You can use Azure pricing calculator to quickly see how RIs and hybrid benefits provides you the cost saving.
Figure 1 : Without RI and Hybrid benefits
Figure 2 : RI with Hybrid Benefits
It is important that we plan the VM SKUs for our Azure environment to get most benefit out of it. Since Microsoft has introduced the VM instance flexibility, we need to carefully select the VM SKUs those will be used. It is better to limit your large number VM SKUs to few VM Groups which will give greater flexibility in buying RI instances for production workload. It will also help you to manage for your non-production and batch processing workloads as well.
Please look at the table below which explains the discounts it provides with PAYG, 1-year RI and 3 years RI.
Table 1 – Benefit using RI
The Hybrid benefit will bring additional cost savings, but it is not considered in the above table.
You can power off the VMs in non-production environment to save cost when not in use. You can use the runbooks to schedule your VM’s Power on and off.
Table 2 – Saving using Runbooks
You can save cost at great level by powering off the VMs during the off-working hours and holidays. If you compare the Table 1 and 2, you can see the Runbooks help you save more than RI if you can schedule you power off and power on properly. I considered 22 working days with 8 hours of work a day for 3 VMs. It brings down the usage of the VMs to 176 hours from 730 hours. You can further schedule the power off/on on your public holidays, I am sure that would probably bring down another 80 hours per year. You need to use RIs, Runbooks and combinations of both to bring down you cost in the Azure.
If VMs are starting and powering it off at the same time then you should not consider it for the RI. Because you purchased one RI but running two other VMs also in parallel for 8 hours but those are not run for rest of the 16 hours. Please see the below table for the details.
Table 3 – RI applied in Wrong way with Runbook
Last Updates on 12/09/2019