Five Tips to Help Save Money on Your Azure IaaS Spend

This article looks at ways Microsoft Azure customers can significantly reduce their Azure spend as well as how to keep a track of expenditure.  I have worked with a number of customers to help them save anything between 25-60% of their Azure spend by implementing some of the strategies outlined here.  This article has been written for a business focused audience and is aimed at those who are involved in managing the operational expenditure of their Azure subscriptions.

If we think about costly resources in Azure IaaS many people focus on things like storage and traffic which traditionally would have been costly in on-premises data centres.  These items in Azure typically do not amount to much on the monthly bill in the grand scheme of things.   The main contributors to high costs are misconfigured or mismanaged virtual servers and in the worst cases, servers that are not even being used !  The main areas of concern I see are environments that have no controls or governance in place, with little or no regard to managing costs.   It is very important to audit Azure infrastructure environments to see how implementing some controls can help organisations use the platform more efficiently.

 

1. Virtual Machine (VM) Types and Scaling

Select virtual machine sizes based on expected resource requirements, that are suitable for the role they play and do not over-spec them.  Many standard workloads work well with Standard A series VMs so choose D and above for workloads that really require that extra CPU power and memory capacity.

 

Scale the VMs up or down in size depending on expected usage patterns.  For example, scale down larger VMs in the evenings and weekends when expected usage is lower than that of normal business hours.  This can be done on a schedule or even by monitoring the CPU load on the VMs.  Note that in order to do this the VM would be restarted.    You can also scale out a set of VMs to increase load capacity in the case of a web server farm for example when there are peaks of activity on the farm, and then scale back down during quiet times. 

 

2. Azure Automation to Manage Costs

As mentioned above in the Virtual Machine section it is possible to resize virtual machines according to schedules.  One of the methods to do this is to use automation scripts.   One automation policy I have found to be most effective is to set all non production VMs to shutdown nightly and NOT to start up in the daytime unless required.  If automated start-up is required it is possible, but these cases are usually set for a short period during testing or development cycles, and is not usually an ongoing requirement.  Use custom role-based access to grant developers just enough rights to see their development and test servers as well as manage their power settings but do not allow for any infrastructure level modifications.

3. VM Storage Optimisation

There are several storage types that can be allocated for Virtual Hard Drives(VHDs) for VMs.   These are locally redundant storage (LRS) and geo-redundant storage (GRS) which are both standard disk types.  There are also tiered SSD storage level options called “premium” storage for customers that require higher performance storage.

Generally speaking, LRS is ok for most workloads and provides resilient storage within an Azure data centre.  Many customers choose GRS storage to protect against site outages.   GRS replicates the VHD data across Azure data centres to ensure a copy of the data is available if the primary data centre has an outage.  Geo-redundant storage is approximately double the price of LRS storage.   Depending on the workload it may be better to have offsite regular backups of the VM disks using the Azure backup service or a backup server such as “Microsoft Azure Backup Server” or even System Centre DPM.    For SQL Server VMs, for example, it is recommended not to use GRS storage, as data is copied across datacentres asynchronously and the order of the data being synchronised is not guaranteed.  For SQL it is better to backup at the database level to a GRS account as well as having VM backups as required.   For most servers including, but not limited to domain controllers, it is not usually necessary for premium storage.  Use premium storage accounts for servers that require higher IOPs than standard disks afford.  Also, consider striping of standard disks to increase disk IOPS as 4 x 500 IOPs standard drives would provide you with a logical drive with 2000 IOPs for example.

Be careful when setting up VMs in the GUI as it can default to using SSD disks instead of standard (labeled HDD) disks.  I have seen customers make this mistake / fall into that trap!

 

4. Application Licensing and MSDN Subscriptions

image

Select the correct licensing model for your applications such as SQL Server or even 3rd party appliances for example.   There are many 3rd party images in the market place which you can buy a license for or you can pay as you use.   Consider the lifetime of the product usage as well as the uptime required and compare the bring your own license (BYOL) cost model of that product compared to pay as you go (PAYG) options. For SQL Server, for example, check the feature set required, do you need Standard or Enterprise? Do you already have licenses with Software Assurance you can bring with you (BYOL)?  Or do you need to use the gallery images which have the license costs built in?  With Enterprise versions of SQL check the amount of cores you need.  Do you need 4,8 or more cores ? Licensing will double when you go from 4 to 8 cores for SQL Server Enterprise.  For development environments where you are entitled to use Developer Edition, use a Windows 2012 Server and install SQL Developer Edition.  Where this is not possible for test / dev environments consider a trial license which lasts for 180 days, as this time frame may be sufficient for the requirement.

If users have MSDN subscriptions they can have their own personal MSDN instance (Azure subscription) which includes free credits and reduced hosting costs.   An organisation can also set up a special Development Subscription within their Azure Enterprise Agreement for developers who have an MSDN license.   This type of subscription offers reduced costs (no OS licensing costs for example) as well as more VM template options such as Windows 10 for test and dev workloads.

You may also set up a completely free trial to try out the platform. Click on the image above to set up a free trial or visit https://azure.microsoft.com/free/

 

5. Billing Reports

image

To be able to report on billing easily you can split your Azure resources firstly into subscriptions for clear billing boundaries.  This is a good option to separate production from non-production workloads for example.  Then split resources further into Resource Groups which are logical groups of your Azure assets.  For example, you could group all Azure assets that relate to the HR Development system into a resource group name HR-Dev as shown in the example below.

Use PowerBI to build a report that provides a good high-level view of your subscriptions and resources and allows drill down to specific assets.  You can also filter on months, subscriptions and resource groups for example, as well as object types providing you with greater insight into Azure usage and spend.

To add further information to your objects use Tagging.   These can then be picked up by 3rd party reporting tools and services or you can roll your own feeds into PowerBI after some manipulation of the raw CSV billing files provided by Azure from your EA Portal.

 

 

I hope you found this article interesting and helpful and more importantly, I hope it can provide some assistance in helping to understand and manage your Azure spend.  

Please drop a note below if you found it helpful or if you have any questions or other good ideas on this subject you would like to share.  

 

Thank you for stopping by.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Advertisements

About Mitesh Chauhan
Mitesh Chauhan, Azure Cloud Solutions Architect. This is my blog where I share articles and thoughts on IT Infrastructure and architecture. The topics I am most passionate about are Implementation and architecture of rock solid Cloud Infrastructure based around SQL Server and Windows Server mainly using Microsoft Azure. MCTS - Azure Architecture MCTS - Azure Implementation MCSE Server Infrastructure (Windows Server 2012) , MCITP SQL Server 2008, Togaf Certified, Prince 2 Practitioner.

2 Responses to Five Tips to Help Save Money on Your Azure IaaS Spend

  1. David says:

    Great article…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: