Managing Azure Costs

Managing Azure costs is an important but sometimes overlooked aspect of cloud utilisation. Many customers wrongfully believe moving to the cloud will automatically be cheaper than hosting it yourself. Truth is cloud can be cheaper but it depends on your requirements and managing your costs. There is a wide spectrum of remedies to lower your costs ranging from simple non-technical steps to rearchitecting applications for serverless computing. In this post I’m going to cover some quick wins you can achieve when using virtual machines.

Managing Azure Costs

To reduce your Azure costs you have to measure it first. There are a few ways to view Azure costs depending on whether you are using an Enterprise Agreement, CSP partner or Visual Studio subscription. In the Azure Portal under the Subscriptions blade you will find some basic information for the current month. In the Cost Analysis section you can filter on different resource groups, types and time periods. In the new Cost Management + Billing blade you can sign up for Cloudyn cost management with more detailed analysis. Eventually it will be folded into the Azure Portal but for the moment you are directed to an external website where you have to sign up for a trail that is free until June 2018. Enterprise Agreement customers can use the EA portal and PowerBI to analyse their bill.

First Step

The easiest and first step you can take is to use the Azure Advisor blade to display any cost recommendations. It is very basic but can provide information around virtual machine under utilisation and Azure SQL databases that can benefit from elastic pools. While you are there also take a look at the security and performance recommendations.

Azure Virtual Machines

A few things to keep in mind to manage your Azure costs when using Azure Virtual Machines.

  • Newer generation virtual machines can sometimes be cheaper. Take for example D* v3 and D* v2 machines, taking into account that there is a small difference in RAM and temporary storage, v3 is cheaper. It was a similar situation when D* v1 was superseded by D* v2.

    Managing Azure Costs
    Managing Azure Costs
  • If you have Azure Batch jobs that are not time critical and they can safely be interrupted and resumed Azure Batch low priority virtual machines can offer a good discount, link.
  • If you are running workloads that occasionally consume high CPU cycles Azure B series virtual machines could be cost effective link. In short you build up credits when CPU utilisation is low which you then spend on bursts of high CPU utilisation.
  • Automatically shut down virtual machines when you don’t use them. It used to require a script and automation account but now it is available in the virtual machine blade.

    Managing Azure Costs
    Managing Azure Costs
  • If you have Software Assurance you can use your existing Windows Server licenses in Azure and only pay for the base computer power you consume. You can read more about Azure Hybrid Benefit here.
  • If you are a Visual Studio subscriber using Azure for development and testing you can get a discount on various Azure services by creating Azure Dev/Test subscriptions. These subscriptions are limited to development and testing workloads, link here. Each active Visual Studio subscriber also qualifies for monthly Azure credits but you have to activate the benefit first, more info here.
  • At the time of writing Reserved Instances were not available yet but it can also bring down cost by paying upfront for virtual machines, more info here.
  • Scale in and out by adding and removing VMs as needed rather than using larger VM instances.

Links to further posts covering Azure cost management
Managing costs when using Azure SQL Database and Azure Storage

 
Francois Delport
 

Published by

Francois Delport

I am a cloud and devops consultant, technology fan and previously a professional C# developer with a keen interest in system design and architecture. Currently I am involved in projects using Azure, the Microsoft stack and DevOps. I am based in Melbourne, Australia. Email: [email protected]

Leave a Reply

Your email address will not be published. Required fields are marked *