Top 12 ways to optimize the cost in Azure, with detail explanation on Azure Reserved VM Instances
As an Azure Pre Sales or Delivery Architect, there must be lots of pressure on you to find various ways to save/reduce the cost/spend in the cloud. Your KPI and KRA may be also integrated with the cost savings which you can show at the end of the year. How to save the operational cost in Azure, this question is going to be one of the main headache of the CIO organisation going forward, since for the last couple of years we have seen many organizations has moved a significant number of their on-premises workload to Azure/AWS without much planning on the cost saving part. It may be because of the well-known joke in the Azure world where someone had asked the CIO why you are moving to the public cloud and CIO answered, since everyone is moving so we are.
Since the original estimates were failing and spend on the azure budget is overshooting month by month, most of the public cloud architect jobs will need this important skill, as a top demanding skill in their role. With the introduction of Azure Advisor and Cost Management, you can get some insight definitely, but there are many things you should plan well in advance before your next deal which can provide a significant lead against your competitors.
There are many cost savings measures which you can take and the top 12 initiative I have listed below. And all of them can be planned well in advance during the planning stage of the deal. Once you win the deal and project is in the delivery stage there will be ongoing initiatives to bring the down the Azure spend as well.
- RI’s (Reserved Instances), Pre-pay, on demand, Dedicated Hosts, BYOL etc.
- Usage duration of the Azure Resources. (For Example, if you pause the azure analysis services, you will not be billed)
- Selecting the right storage and using the Storage Pool and Stripped Volumes (IOPS calculation plays a big role here, also selection of storage policy like when data will move to cold and archive storage is important)
- Right Instance types (B Series VM’s etc.)
- Estimation of data volumes for the client proposal (Network capacity planning, ExpressRoute or Site to Site VPN etc.)
- Turn on / Off (Deallocating the VM when not in use.)
- Resize instances/change instance types.
- Scale Up/ Scale Down
- Conversion to PaaS services.
- Public cloud Waste management. (By right tagging the resources with the department which introduces responsibilities against over spending. )
- Low priority VM’s (Already I have explained this in detail in my older blog post.)
- HA planning with a single instance with limited allowed downtime.
There are other areas also where you can plan very well in advance and they are related to BCP and DR and the areas related to backup and recovery. In some of my upcoming blog post, I will discuss more on the Azure.
Based on my experience I have seen one of the major cost reduction can be achieved if we can implement Azure Reserved instances for the Production and QA workloads. Today I am going to discuss in details about that, in my later blogs I will write more on other cost-saving measures.
What is Azure Reservations (Reserved Instance)? ( One of the best option to reduce cost)
Azure reservation is a way to pre-purchase your virtual machines (Compute Usage) for a duration 1 to 3 years. If you are using a VM 24 x7 and up to 365 days you can save up to 60-70-80% of the cost of Azure. It’s like a huge amount of savings and how you can achieve this or why MS is giving this discount? There are really two things why you will get this discount.
You are committing for a longer period of time.
- Capacity planning will become easier for MS because they know that this many numbers of VM’s will be available for a longer commitment.
In this case, you need to pay upfront and Azure will stop charging an on-demand basis for the instances.
How does it work?
You need to buy the reservations for a region and for a particular VM size. When you prepay for that matching that VM size in a particular region it will apply to that. Please note that in this case if you switch off the VM, still you need to pay for it. Unlike to the low priority VM’s about which I have already written a detailed post here (They are for compute workload that are bursty), these VM instances should be considered for your 24 x 7 production or QA workloads which you don’t plan to shut down any time other than patching window or any other major upgrade.
How to find the right candidates for the reserved instances?
Once you migrate your QA and Production workload to Azure you start looking at your usage and see what VM’s and which regions you are using it consistently and determine the right candidate for the reserved instances.
What will happen if you need to change the instance during the tenure?
Now there may be a question on your mind that what will happen if you buy reserved instances for 3 years and after 18 months you want to change the size of the VM. In this case, you can exchange the reservations. There is unlimited exchange possible during a tenure. But there is a catch, the new value of reservation should be greater than currently what you are paying. So basically there is only upgrade exchange possible but not downgrade.
What will happen if you want to terminate the lease in advance? That means if you wanted to terminate the contract before the end of the tenure.
In case you wanted to cancel it early, there is a 12% early termination fees which will be deducted. And there is a limit of up to USD 50K in a year. That means you can cancel only up to USD 50K in a year.
What will happen to the VM after the committed term?
Suppose you have opted for three years term and after that, you have not renewed your VM reserved instances after 3 years Azure will again start charging you on pay as you go model. In other words, It will go to regular billing.
Where can I find the reserved instances in the Azure Portal?
You can go to the All Services in the Azure portal and click on Reservations.
As you can see I have already created a reservation
To Create new VM instances you can click on Add and you can see the below screen. Please note that if you select the scope as shared it will be applicable to all your subscription but if you select a particular subscription it will apply to only that subscription. I have also noticed another thing that based on my usage azure also recommend the VM size but it’s up to me about which VM I’ll choose.
The cost will vary instance to instance if you choose a larger instance the cost savings will be 70% as you can see below.
As you can see above the operating system will not be discounted by reservations it will only be applied to the compute usage. Your OS cost will be charged separately. But if you have a software assurance agreement and you are an enterprise customer and you have already paid for the licenses. In this case, you can combine the reservations and Azure hub (The license will be stored in Azure HUB for more details you can read here) benefits.
What is Azure HUB?
Hybrid Use Benefit (HUB) is available to customers with Enterprise Agreements and Software Assurance that enables Windows Server licenses on-premises to be leveraged in Azure which results in Windows VMs costing the same as Linux VMs (since there is no charge for the Windows Server license).
With the combination with HUB you can save up to 80% of the total running cost. To know about the Azure Reserved Instances cost kindly check the Azure Pricing calculator here.
That’s all for today. I hope you have a good time reading this blog and you have learned a good thing. You have a very good rest of your day.
In the next few of my blog post, I will discuss how we can optimize the cost in Azure and other various ways to do so. Stay tuned for more.