Optimizing Azure Compute Cost

One question I get often from customers is “How do I save on my Azure compute cost”. There’s no one answer for this and it really depends on the workload you are deploying. I do find that customers must change their consumption habits when moving to public cloud and one of the most challenging things for them to do. Most of the behaviors in IT was run everything 24/7/365, as they already own the hardware\resources. When moving to cloud you need to start thinking about right sizing, steady state, peaks, and does the workload need to be running 24/7.

Below are five ways that you can save on your compute cost, but most important is understanding your workload.

1. Azure Dev\Test Labs

Azure Dev\Test Labs allows admins to set virtual machine policies, quotas, and spending thresholds. This allows developers to have self-service capabilities, while minimizing waste in the environment. Dev\Test labs also has auto-shutdown\startup that can be set on a schedule, so the workload is not running during down times. You can also utilize your MSDN benefits to eliminate Microsoft licensing cost in Dev\Test Labs. Be aware Dev\Test Labs does not have an SLA and should only be used for dev\test workloads.

Dev\Test Labs Overview

2. Scale-Out Architecture

If your application supports scaling out you can utilize Azure VM Scale Sets to scale-out and scale-in your virtual machines based on specific thresholds you set in the VM Scale Set policy. This will allow you to only deploy what’s needed at the the right time. I also think it’s always a recommended practice to identify workloads that can be scaled-out or start thinking how you can refactor your application to support scale-out. This can save a lot of cost and also a host of other benefits.

Scale Sets Overview

3. Right Sizing

When migrating servers to the cloud make sure you identify the workload needs, so you don’t over provision a virtual machine in Azure. It’s best to do this before the migration and always keep an eye on it during it’s life-cycle in Azure. Azure Advisor will also help identify workloads that can be right sized once they are deployed based on performance metrics.

4. Auto Shutdown\Startup

Automating shutdown and startup in Azure is super easy can be automated and set on a schedule. This does require you to identify workloads that do not need to be running 24/7 and also requires change in consumption behaviors.

5. Pre-Compute Purchase

Azure Compute Pre-Purchase Plan is designed for steady state, predictable workloads on Azure. You can save up to 63% on pre-purchased compute, but need to insure you really understand your workload. The biggest limitation here is you’ll be confined to a specific region and VM size, based on your pre-purchase compute. This is a good way to save cost, but just make sure it makes sense for your workload.

Bonus: Hybrid Use benefit

I say this is a bonus as it only applies to Windows virtual machines. The Hybrid Use Benefit allows you to use existing Windows licenses (Software Assurance required) within Azure. You can read more here to understand what you’re entitled to with your Windows Server licensing.

When moving to cloud even in “lift & shift” scenarios make sure you are identifying how you can save cost on compute, as cloud opens up new ways to consume services.

Disclaimer: I work for the Microsoft Azure team