Azure Cost Optimization
Azure Cost Optimization
Version: 1.0
Review
What's more, you can now improve budgeting and forecasting with a single upfront
payment (i.e. Pay for a VM Upfront for 1/3 Year or 5 Years) making it easy to calculate
your investments. Or, lower your upfront cash outflow with monthly payment options
at no additional cost.
Azure stores Azure Virtual Machine OS and data disks in Azure storage accounts. When a
VM is deleted from Azure portal, the underlying OS and data disks may not get deleted.
Such disks continue to consume Azure storage and accounts for cost for storing them.
These disks are called Orphaned Disks.
Using a PowerShell script (provided by Microsoft) you can Report on any disks that are not
in use by a VM, and then delete them.
Note: Be VERY cautious doing this, solutions such as Citrix and Azure Image Builder uses unmanaged
disks to create new Session hosts etc, so context is key.
With the Azure Storage accounts, using Blob data – such as Diagnostic Accounts. It’s a
good idea to implement Azure Blob Storage Lifecycle on the storage accounts so we are
only retaining recent and relevant data.
When the budget thresholds you've created are exceeded, notifications are triggered.
None of your resources are affected and your consumption isn't stopped. You can use
budgets to compare and track spending as you analyse costs.
Review Budgets
Make sure you have Azure Budget notifications configured to email Product Owners or
other Stakeholders once a Resource Group or Subscription reaches a specific threshold.
This is set up in the Azure Portal, on the Resource Group under Budgets and set to
email the Application Owner.
• 50%
• 60%
• 70%
Review Tags
Review Tags
You apply tags to your Azure resources, resource groups, and subscriptions to logically
organize them into a taxonomy. Each tag consists of a name and a value pair. For
example, you can apply the name "Environment" and the value "Production" to all the
resources in production.
• Who to bill?
• Who supports it?
The right tags, can mean that the right owners get charged internally and have more
ownership of their resource costs.
Examples below:
Review HUB
To verify if a server is using the Azure Hybrid Benefit
Log in to the Azure Portal and navigate to the Virtual Machine Blade
Make sure that the: OS Licensing Benefit column is selected.
If a Virtual Machine Already has HUB it will have: Azure hybrid benefit listed in the
column, any non-supported workloads (such as Linux) will have ‘Not Supported’.
Note: This is a non-intrusive change that will take effect on the billing immediately and doesn’t cause
any impact on the Virtual Machine.
Review Backups
Review Backups
Azure Backup is simple because it’s built into the platform.
It has one-click backup support for SQL databases and virtual machines running in
Azure. Azure Backup is cost-effective and less complex than other cloud backup
solutions while keeping your data safe from ransomware and human errors.
Sometimes there will be workloads that have been backed up to migrate, test or clone
and that you no longer need to retain the data for.
Review Backups
Note: This can be a tricky one as you will need to talk to product owners to confirm the workloads
were just Dev/Test workloads, and not required, there may be legal implications for keeping
workloads in backup.
Login to the Azure Portal and navigate to the Recovery Services Vault page
Navigate to each one and click on:
Backup:
1. Under Usage, click on Backup Items
2. Click on Azure Virtual Machines
Sort the Backup items by Latest Restore Point (so the older restore points are at the
top)
Using the Latest Restore Point as a guide, IF there are any servers that can have their
Backups deleted:
1. Click on the Name of the Backup Item
2. Click on Stop Backup
3. Select Delete Backup Data (this is non-reversible)
4. Type in the name of the Backup Item and select Stop Backup
Review unused Public IPs
The address is dedicated to the resource until it’s unassigned by you. A resource
without a public IP assigned can communicate outbound. Azure dynamically assigns an
available IP address that isn’t dedicated to the resource.
When resources get created, sometimes they will create a Public IP, these can be
removed as part of the build but left in the Resource Groups. We want to remove
unattached Public Ips to save money.
Note: In some cases, the Product Owner may need to be consulted before any
changes are made, as some of the resources may be inflight projects or required.
• A standard performance tier for storing blobs, files, tables, queues, and Azure
virtual machine disks.
• A premium performance tier for storing unmanaged virtual machine disks.
If a Storage account is Premium but only needs to be Standard (or LRS instead of ZRS),
this can save some money.
Note: In some cases, the Product Owner may need to be consulted before any
changes are made, as some of the resources may be inflight projects or required.
You can also look at the Replication, does that Storage Account need to be Geo-
Redundant if the rest of the application that uses it isn’t?
https://linktr.ee/lukemurray