12 Best Practices to reduce your Microsoft Azure spend

Microsoft Azure offers a plethora of cloud-based services right at your fingertips to enable innovation and collaboration.  However, like most cloud-based systems, due to the flexible on-demand nature of these services, it is important to be responsible, to ensure a cost-effective platform that does not sacrifice productivity or availability.

The following 12 best practices, outline some of the main key areas to consider when looking to save money running in Microsoft Azure:

  1. Delete unattached disk storage: When you launch a virtual machine, disk storage is often attached, however when a VM is terminated, the disk storage remains active and Azure will continue to charge you even if the data is not in use.  By continuously checking for unattached disk storage in your infrastructure, you can save thousands from your monthly Azure bill.
  2. Delete Aged snapshots: It is common to use snapshots on blob or disk storage to create point-in-time recovery points in case of data loss or disaster. Although individual snapshots are not expensive, this can be compounded by users configuring Azure to automatically create subsequent snapshots on a daily basis without deleting older snapshots.  Monitoring snapshots and deleting all snapshots based on a policy of X weeks old will keep you snapshot costs from spiraling out of control.
  3. Remove Zombie Assets: Often, assets are deployed within Azure, such as VMs, Load balancers, Databases, etc, and these sit idle, not being used, but not being turned off, still generating a cost on your monthly Azure bill. Using Azure Cost Manager can help with this process.  You can use  Azure Advisor to find this information for you on a regular basis.   Please note this is a free service with no SLA.
  4. Upgrade your Virtual Machines: Often, it makes sense to take a look at your virtual machine estate and consider the benefits of upgrading.  There is often no price difference, yet there are additional features that can be availed of to enable you to either run fewer VMs, or perhaps to decrease the size of those VMs.  For example, upgrading a D-series VM gives you 35% faster processing and greater scalability for the same price point.
  5. Make sure you Right-size your virtual machines: This is quite a simple thing, yet it often offers the biggest cost savings, as it is common that developers will spin up new VMs that are much larger than necessary. Take a look at CPU, memory, disk, and network in/out utilization.  If you don’t have a tool or service to do this for you regularly,  setup a time on a monthly basis to review and right-size resources.  Pick a conservative number for instance, any resource running at 50% resources for 30 days, then right-size them accordingly.
  6. Right-sizing disk storage is also important: Just like virtual machines, storage can be over-provisioned, or the incorrect tier of storage can be selected. Microsoft offers a standard performance tier, with different levels of redundancy, and a premium storage tier in three different sizes.  Price differences can vary by 3X, so it is very important to ensure you right-size here.  Storage is based on total disk size, regardless of consumption, so use Azure advisor to manually check for utilization of your attached disk storage.
  7. Right-size SQL databases: SQL is a popular choice within Azure and just like Virtual machines, it can be over-provisioned due to the critical nature of databases within an application stack.  The critical factors to measure are database transaction units (DTU), Database Size, and Database capacity.    These SQL databases are purchased based on tiers ,and there is a significant price difference between then three tiers.  It’s also wise to look at leveraging Azure Hybrid benefit, where you can leverage any existing SQL licenses you may have on-premise, as long as you have software assurance. This can bring your SQL VM costs down by as much as 55%.
  8. Switch it off and back on again when not required: Azure will bill you for a VM as long as it is running.  Inversely if a VM is in a stopped state, there is no charge for that VM.  So, if a VM is turned off between 5pm and 9am on weekdays and sopped on weekends and holidays, then the total billable hours per month would range from 152-184 hours per VM, saving you 488-592 VM hours per month.    Although this is an extreme example, often shutting down for several hours per weekday and all weekend is acceptable for any services not required 24×7.  This can be done using scripts, FaaS based solutions, and can be automated through policy or operational platforms.  Many people fear doing this, as it won’t boot back up on a Monday morning, but once this has been tested several times, with less critical systems, confidence will build, and you can start applying this to more business critical applications saving thousands per month.
  9. Buy reserved virtual machine instances: Azure reserved VM instances allow you to make a 1- or 3-year upfront commitment to get a discount up to 72% compared to pay as you go pricing. That is a lot of money and a complete no-brainer.  Although there is concern that you lose the cloud benefits of flexible consumption, you can modify these reservations across subscriptions, regions, series, etc.  You can also cancel reservations for an adjusted refund.  It is so critical to not only purchase reservations, but to constantly modify them, and building a mature policy around this will save you more money than most other activities within Azure.
  10. Leverage Azure Hybrid Benefit: If you are an organisation with a Microsoft license agreement in place that has software assurance, then all of your spare existing Windows and SQL licenses can be utilized while operating on Azure, instead of paying twice for these.  It is very important to ensure your software asset management teams and your cloud operations teams are in constant communication to ensure this benefit is being realized, as this can offer a significant saving.
  11. Right-sizing your Windows Virtual Desktop estate: Whilst a good end-user experience in WVD is imperative, it’s also important not to over-size the azure VM instances hosting the users, resulting in unnecessary spend that could ultimately work against your cloud strategy. Microsoft guidelines are a good starting point but often you need 3rd party tools such as Login VSI to benchmark the number of users you can get per instance type, bearing in mind that you may need different instance types for different end-user groups. Going forward, repeat these benchmark tests on a monthly or quarterly basis to confirm you are still getting the same level of performance per instance type, as before, and then you can hold Azure to account, whilst also understanding the impact of changes in your environment. Finally, Azure Monitor can be used to record metrics in your WVD environment and build a dashboard of metrics\alerts so that you can keep an eye on performance.  More specialised EUX monitoring tools such as Aternity can also be deployed into your WVD environment for gathering metrics from the user’s point of view as opposed to the server performance etc.
  12. Use a Cloud Cost management platform – Solutions such as CloudHealth, through policy, do most of the above in an automated fashion. On top of that, it can help you create budgets, and spending alerts, to keep on top of your cost savings and introduce solid governance into your cloud efficiency processes, as well as other added benefits around security and compliance posture. The recommendation here is that if you don’t have the time to be doing the above 11 points on at least monthly on a manual basis, the investment of a platform such as CloudHealth may be justified.

At Asystec, we have a breadth of experience, and managed services offerings in this space, and are happy to advise you on your best course of action to keep your Azure costs down.  For more information, please contact cis@asystec.ie for further details.