Optimize Costs for Azure VMs with Reserved Instances
Optimize Azure cloud costs by finding long-running VMs and applying Reserved Instances. Learn how to get started.
Optimize Azure cloud costs by finding long-running VMs and applying Reserved Instances. Learn how to get started.
With Azure virtual machines (VMs), your organization can rapidly scale computing resources on-demand without the cost of maintaining internal hardware. In exchange for the convenience, Azure VMs can cost you a good amount of money so it’s important to be conscious of your resource allocation.
If you have virtual machines that consistently require a lot of time to run tasks, these long running instances can be especially expensive and represent an opportunity to reduce your costs by up to 72% by switching operations to a different instance type based on predictable usage, Azure Virtual Machine Reserved Instances.
In this guide, we will outline how you can save money with Azure by finding your long-running virtual machines and utilizing reserved instances.
Long running Azure virtual machine instances, by definition, are active for long periods of time throughout the day and commonly perform tasks like background website scripts or complex computing calculations.
These instances could be long running because they are tasked with complex, time-intensive operations. There could also be an issue with long-running operations that have been disrupted or failed. It’s possible that your VM could still be running despite flawed operations and adding to your monthly charge.
Ultimately, your organization can define what long running means to you, as in the number of days since the instances started running. 90 days is a common benchmark.
You can locate your long-running instances with Azure Monitor. Azure Monitor is a product offering from Microsoft that allows you to analyze resource performance.
You can run log queries to get information about long running virtual machines and the types of operations they are running. In this example, there’s a query that shows the operation of a resource over the last 3 days.
You can use a query like this one and adjust the “TimeGenerated” parameter to “TimeGenerated > ago(90d)” to focus on long running instances. There are lots of query types to choose from in Azure Monitor.
After you’ve checked for performance issues, you might find that your instances are healthy and just need time to run your operations. In cases like these, you can consider reducing your costs by applying a reserved instance.
You can use an RI without having to rebuild your VM from scratch. An Azure RI is a VM on the public Microsoft Azure cloud. It is for dedicated use for one to three years and can be purchased with a one-time up-front payment. This can discount your subscription by 72%. That means that if you purchase a 1 year term of Reserved Instances and achieve this ~70% savings, your purchase will break even in a few months and then you’ll see significant cost savings for the rest of the year.
To buy reserved instances:
The RI discount will be applied at the subscription level as opposed to individual VMs. Your number of qualifying VMs depends on the scope you select. After purchasing the RI and getting a discount on your subscription, you can move qualifying VMs to the discounted subscription by doing the following:
This will then move your existing long-running Azure virtual machine to a reserved instance. Repeat the above steps for any other VMs you wish to move and remember that the VMs must match the scope you selected when purchasing the RI.
Before you can make decisions about how to handle a long running instance, you need information about which instances qualify, what their usage data looks like, and the related business-impacts. If it’s hard to get a picture of that data, you might not make any decisions on potential improvements.
Instead of manually searching through your Azure console or scripting a query, there’s an easier way to aggregate reports and take action on long running instances.
With Blink, you can use this automation to regularly identify long running Azure instances and gather details about them.
When this automation runs, it executes the following steps:
You can also customize this automation to add a removal step for old snapshots if approved via Slack.
There are over 5K automations in the Blink library you can use right away, or you can build new automations from scratch with drag-and-drop actions to fit your unique use case.
Get started with Blink today to see how easy automation can be.
Blink is secure, decentralized, and cloud-native. Get modern cloud and security operations today.