Azure Cost Optimization

Ways that you can save money on Azure.

Reservations

You can scope a reservation to a subscription or resource groups. Setting the scope for a reservation selects where the reservation savings apply. When you scope the reservation to a resource group, reservation discounts apply only to the resource group—not the entire subscription.

  • Single resource group scope — Applies the reservation discount to the matching resources in the selected resource group only.
  • Single subscription scope — Applies the reservation discount to the matching resources in the selected subscription.
  • Shared scope — Applies the reservation discount to matching resources in eligible subscriptions that are in the billing context. If a subscription was moved to different billing context, the benefit will no longer be applied to this subscription and will continue to apply to other subscriptions in the billing context.
    • For Enterprise Agreement customers, the billing context is the enrollment. The reservation shared scope would include multiple Active Directory tenants in an enrollment.
    • For Microsoft Customer Agreement customers, the billing scope is the billing profile.
    • For individual subscriptions with pay-as-you-go rates, the billing scope is all eligible subscriptions created by the account administrator.

Purchase reservations

You can purchase reservations from Azure portal, APIs, PowerShell, CLI. Read the following articles that apply to you when you’re ready to make a reservation purchase:

Reservation discounts are currently unavailable for the following:

  • Unmanaged disks or page blobs.
  • Standard SSDs or standard hard-disk drives (HDDs).
  • Premium SSD SKUs smaller than P30: P1, P2, P3, P4, P6, P10, P15, and P20 SSD SKUs.
  • Disks in Azure Government, Azure Germany, or Azure China regions

Details: https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/prepare-buy-reservation

Instance size flexibility

With a reserved virtual machine instance that’s optimized for instance size flexibility, the reservation you buy can apply to the virtual machines (VMs) sizes in the same instance size flexibility group. For example, if you buy a reservation for a VM size that’s listed in the DSv2 Series, like Standard_DS3_v2, the reservation discount can apply to the other sizes that are listed in that same instance size flexibility group:

  • Standard_DS1_v2
  • Standard_DS2_v2
  • Standard_DS3_v2
  • Standard_DS4_v2

But that reservation discount doesn’t apply to VMs sizes that are listed in different instance size flexibility groups, like SKUs in DSv2 Series High Memory: Standard_DS11_v2, Standard_DS12_v2, and so on

More details: https://docs.microsoft.com/en-us/azure/virtual-machines/reserved-vm-instance-size-flexibility

Instance size flexibility ratios

Hybrid Use Benefit / Azure DevTest

Windows Servers and SQL should use HUB – save up to 49%

Do not enable HUB on Windows VMs in the Dev/Test subscriptions

Storage

Azure Blob Storage lifecycle management

Azure Blob Storage lifecycle management offers a rich, rule-based policy for GPv2 and blob storage accounts. Use the policy to transition your data to the appropriate access tiers or expire at the end of the data’s lifecycle.

The lifecycle management policy lets you:

  • Transition blobs from cool to hot immediately if accessed to optimize for performance
  • Transition blobs, blob versions, and blob snapshots to a cooler storage tier (hot to cool, hot to archive, or cool to archive) if not accessed or modified for a period of time to optimize for cost
  • Delete blobs, blob versions, and blob snapshots at the end of their lifecycles
  • Define rules to be run once per day at the storage account level
  • Apply rules to containers or a subset of blobs (using name prefixes or blob index tags as filters)

More details: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-lifecycle-management-concepts?tabs=azure-portal

Legacy storage account types

The following table describes the legacy storage account types. These account types are not recommended by Microsoft, but may be used in certain scenarios:

Type of legacy storage accountSupported storage servicesRedundancy optionsDeployment modelUsage
Standard general-purpose v1Blob, Queue, and Table storage, Azure FilesLRS/GRS/RA-GRSResource Manager, ClassicGeneral-purpose v1 accounts may not have the latest features or the lowest per-gigabyte pricing. Consider using for these scenarios:
Your applications require the Azure classic deployment model.Your applications are transaction-intensive or use significant geo-replication bandwidth, but don’t require large capacity. In this case, general-purpose v1 may be the most economical choice.You use a version of the Azure Storage REST API that is earlier than 2014-02-14 or a client library with a version lower than 4.x, and you can’t upgrade your application.
Standard Blob storageBlob storage (block blobs and append blobs only)LRS/GRS/RA-GRSResource ManagerMicrosoft recommends using standard general-purpose v2 accounts instead when possible.

Azure Boot Diagnostics

Consolidate all diagnostics storage account into 1 or at least 1 per subscription. Then, use the V2 instead of V1. Alternatively, use a managed storage account for the boot diagnostics, see https://docs.microsoft.com/en-us/azure/virtual-machines/boot-diagnostics

Log Analytics

Starting June 2, 2021, Capacity Reservations are now called Commitment Tiers

In addition to the Pay-As-You-Go model, Log Analytics has Commitment Tiers, which can save you as much as 30 percent compared to the Pay-As-You-Go price. With the commitment tier pricing, you can commit to buy data ingestion starting at 100 GB/day at a lower price than Pay-As-You-Go pricing. Any usage above the commitment level (overage) is billed at that same price per GB as provided by the current commitment tier. The commitment tiers have a 31-day commitment period. During the commitment period, you can change to a higher commitment tier (which restarts the 31-day commitment period), but you can’t move back to Pay-As-You-Go or to a lower commitment tier until after you finish the commitment period. Billing for the commitment tiers is done on a daily basis. Learn more about Log Analytics Pay-As-You-Go and Commitment Tier pricing.

Details: https://docs.microsoft.com/en-us/azure/azure-monitor/logs/manage-cost-storage

Understand your usage and estimate costs

If you’re using Azure Monitor Logs now, it’s easy to understand what the costs are likely be, based on recent usage patterns. To do this, use Log Analytics Usage and Estimated Costs to review and analyze data usage. This shows how much data is collected by each solution, how much data is being retained, and an estimate of your costs based on the amount of data ingested and any additional retention beyond the included amount. See: Manage usage and costs for Azure Monitor Logs – Azure Monitor | Microsoft Docs

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s