Navigating the complexities of cloud costs is a challenge every FinOps practitioner faces. In this guide crafted for Azure users, we describe steps you can take to optimize your Azure costs in just 30 days. These cloud cost optimization techniques are designed for easy implementation without compromising application performance. This makes them easily actionable for engineers, distinguishing them from more time-consuming and risky tasks such as rightsizing.
Create a Plan and Start with Low Hanging Fruits
Before starting work to reduce Azure cloud costs, establish a robust cost optimization plan tailored to your Microsoft Azure environment. Use Azure Cost Management to review your Azure services and define realistic targets to reduce costs. Start with quick wins, demonstrating to your organization that optimizing cloud resources yields significant reductions in Azure costs.
- Remove unused and idle resources.
- Update previous generation Virtual Machine and App Service instance types to the latest generation ones.
- Use Azure Hybrid Benefit.
- Buy Azure Reserved Instances and Savings Plans.
- Update previous generation volume types, such as Premium SSD disks, to the latest generation ones.
- Create lifecycle policies for blob storage accounts.
- Set retention policies for Azure monitor insights and logs.
Remove Unused and Idle Resources
Launching resources in the cloud for testing purposes is simple, but it’s common to overlook them later. Other times, resources may be left unused when applications are decommissioned, teams undergo restructuring, or individuals are laid off. All of these scenarios can result in idle or unused resources.
Azure Cost Management and Advisor
To identify and prevent unnecessary charges for idle or unused resources, use Microsoft Azure Cost Management. This tool provides insights into the costs of your Azure services, allowing you to focus your Azure cost optimization efforts. Azure Advisor is another key tool that you should use. It identifies idle resources and recommends Azure cost optimization, such as shutting down idle virtual machines, idle databases, network gateways, and unattached storage volumes. Also, check Managed Disk Snapshots, which can contribute to elevated storage costs; review and delete those no longer needed to trim down your cloud expenses.
Monitoring Your Cloud Environment
To find or verify resources with consistently low or no usage patterns, Azure offers several tools for monitoring and analyzing usage:
- Azure Monitor: provides insights, visualization, and analysis of data
- Application Insights: helps gain insights into how people use your apps
- Azure Monitor Metrics: allows you to gather and analyze metrics data from various Azure resources
Once you’ve pinpointed the resources to be deleted, establish a decommissioning plan, ensuring the secure backup and migration of essential data as part of your Azure cost optimization process. Proceed to terminate the identified resources and regularly revisit and refine this process to prevent incurring unnecessary Azure costs from unused resources.
Update Previous Generation Instance Types
Azure provides engineers with various instance types, including Virtual Machines and App Services. They frequently introduce new instance types with better CPU utilization and enhanced capabilities, such as advanced networking, improved computing power, and superior storage options. However, many organizations are unaware of these new instance types and their benefits, usually available at similar or better pricing than previous generation instance types.
Consider upgrading DS series machines to Dav4, Dv4, or Ddv4 using a newer processor for better price performance. A DS4 instance (with 8 vCPUs, 28 GB RAM, and 56 GB temporary storage) has a monthly cost of $449 (East US region); in comparison, a D8 v4 instance (8 vCPUs, 32 GB RAM, only remote storage) costs $280. This is a 38% saving for a more performant machine.
Consider upgrading Standard service plans to Premium v3. The Premium v3 pricing tier gives faster processors, SSD storage, and memory-optimized options and quadruples the memory-to-core ratio of previous pricing tiers. With the performance advantage, you could save money by running your apps on fewer instances. For example, the S2 plan provides 2 cores, 3.5GB of RAM, and 50 GB of storage for $139/month. The P1v3 plan gives 2 cores, 8 GB of RAM, and 250 GB for $124/month, savings of 10% at significantly increased performance. Additionally, Premium v3 plans are eligible for savings plans and reserved instance pricing, opening opportunities for further savings.
Infracost helps engineers optimize cloud costs by enabling the shift-left of the FinOps process. It scans all your cloud infrastructure code repositories to identify instances that need updating to take advantage of cloud cost optimization techniques. You can download a CSV of these recommendations to form an upgrade plan. Once engineers make the changes, Infracost tracks the changes, calculates the cost savings, and updates the recommendations in real time. This way, you can clearly chart how well you follow this FinOps best practice.
Azure Hybrid Benefit
Azure Hybrid Benefit is a cost-saving program that allows you to utilize your on-premises licenses with Software Assurance or subscription licenses to get Windows Server virtual machines (VMs) on Azure at a reduced cost.
Azure Hybrid Benefit enables you to exchange your existing licenses for discounted rates on Azure SQL Database and Azure SQL Managed Instance. By utilizing your Software Assurance-enabled SQL Server licenses on Azure, you can save up to 30% or more on SQL Database and SQL Managed Instance.
One of the key advantages of Azure Hybrid Benefit is that it helps you optimize costs by avoiding double license payments. You can use Azure Cost Management and Infracost to identify the servers not using this setting and review or enable it to maximize your savings.
Buy Reserved Instances and Savings Plans
After removing unused or idle virtual machines and upgrading previous generation instance types, you should consider procuring Reserved Instances (RIs) and Savings Plans in Azure. This key cloud cost optimization strategy usually significantly reduces cloud spending. Azure RIs and Savings Plans operate on commitment-based pricing, presenting a significant cost advantage over on-demand instances and establishing a reliable expenditure structure and savings plans so you can implement their cost optimization best practices.
Azure Reserved Instances enables users to commit to a one- or three-year term for Azure services including Virtual Machines (Windows and Linux), SQL Databases, Cosmos DB, Synapse Analytics, App Service and Azure Storage. This results in significant discount rates of between 38% to 80% compared to pay-as-you-go pricing, which makes them a great way to reduce cloud costs. By making this commitment, users gain cost predictability and stability for their compute usage over the chosen term. Azure RIs are well-suited for workloads with consistent and high resource utilization needs. Microsoft Azure Cost Management provides recommendations on RIs.
Savings Plans are another pricing option designed to provide significant cost-saving opportunities compared to pay-as-you-go pricing. They can be used with the following Azure services: Virtual Machines (Windows and Linux), App Service, Functions premium plan, Container Instances, Dedicated Host, and Container Apps. Microsoft Azure Cost Management also provides recommendations on Savings Plans.
With Savings Plans, users commit to a consistent amount of cloud spending (measured in $/hr) for a one- or three-year period. Unlike RIs, Savings Plans offer broader flexibility by automatically applying the committed usage rate to any virtual machine instance in the specified region, regardless of family, size, OS, or tenancy. This flexibility makes Savings Plans particularly advantageous for dynamic and variable workloads, allowing users to optimize costs while maintaining adaptability – however, the savings are usually lower than RIs.
Update Volume Types
Since introducing Azure Managed Disks, Microsoft has rolled out four distinct disk types, each marking a notable leap in storage capabilities. These encompass Standard HDD, Standard SSD, Premium SSD, and Ultra Disk, each designed to address specific performance and cost optimization requirements.
Consider the following cloud storage recommendations to reduce your cloud spending on this cloud provider.
Consider Updating Premium SSD Disks to v2
Premium SSD v2 disks enable you to separately provision size, IOPS, and throughput and are around 30% cheaper than equivalent V1 disks. For example, a v1 disk with 1TB of storage, 5,000 IOPS, and 200 MB/s throughput costs $135/month vs $95/month on v2. The Azure Well-Architected Framework recommends v2 disks as long as these limitations don’t apply.
Standard SSD Disks Billing Caps
Customers with high IO workloads in Standard HDDs can now upgrade to Standard SSDs and benefit from better performance, SLA, and a limit on the maximum number of billed transactions.
Use Standard Storage to Store Managed Disks Snapshots
To save 60% on costs, use Standard Storage for Managed Disks snapshots regardless of parent disk type. You can also migrate snapshots from Premium to Standard Storage.
Like previous instance types, Infracost generates a report of the volumes that need to be updated for cost optimization.
Create Lifecycle Policies for Blob Storage
Much like AWS S3, Azure Blob Storage often accumulates large volumes of data over time. Azure Blob Storage has four access tiers: Hot tier, Cool tier, Cold tier, and Archive tier. Azure provides lifecycle management capabilities, allowing organizations to automate data management by setting rules for transitioning or expiring objects based on factors like age or access frequency. This helps seamlessly move less frequently accessed data to more cost-effective storage tiers or delete outdated information, aligning storage costs with actual usage. Azure Cost Management and the Azure portal can be used to see a breakdown of which tier a storage account is using.
Imagine a situation where data sees frequent use in its initial stages, becomes sporadic after two weeks, and is rarely accessed beyond the first month. During the early stages, opt for hot storage, while occasional access fits well with cool storage. As the data ages past a month, archive storage proves to be the most cost-effective option. Utilizing lifecycle management policies, you can seamlessly transition data between these storage tiers based on age, designing an efficient and budget-friendly solution. These lifecycle management policies are applicable to block blobs and append blobs in general-purpose v2, premium block blob, and Blob Storage accounts.
Infracost shows that Azure storage accounts do not have a lifecycle policy. You can review these and define policies to automate the transition of your data based on its usage pattern to optimize storage costs, improve performance, or delete no longer-needed blobs. Azure Cost Management can also be used to see the reduction in cloud spending.
Set Retention Policies for Azure Monitor
Azure Monitor is the main Azure service for monitoring and logging. Over time, it accumulates extensive data from all of your cloud resources and deployments. Establishing rules for data retention helps organizations achieve a balance between compliance requirements and cost-effectiveness. This Azure cost optimization is achieved by avoiding retaining analytics data indefinitely and accumulating storage costs.
Consider this Azure cost optimization best practice if your cloud spending on Azure Monitor is significant. For example, if an application generates 5GB of logs daily, you will accumulate 1.8TB of logs in a year without any retention policy. Data retention costs $0.10 per GB monthly after the first month in the Azure East US region. This means you’ll incur an additional yearly cost of around $1,000 compared to a service that has a simple 30-day retention policy.
Infracost scans your Azure Monitor Application Insights to identify logs that do not have a retention policy in place. You can quickly reduce your cloud spend by setting the number of days that logs should be retained. Infracost highlights this information and shows you how to take action.
Reducing Costs May Seem Challenging, But It’s Doable Within 30 Days
It is important to understand your cloud bill, review the cloud cost optimization recommendations in this article, and collaborate with engineers to implement changes to cloud resources across all cloud environments. Start with quick wins such as removing unused and idle resources, updating previous generation virtual machines and storage types, using Azure Hybrid Benefits, and buying Reserved Instances and Savings Plans.
Microsoft Cost Management, Azure Advisor, and Infracost are valuable tools to help you implement cost optimizations. These tools check your cloud environment and make various Azure cost optimization recommendations. Put these recommendations into action. Start your 30-day journey today and make significant cost savings!