FinOps / Guide 2
Measure usage before you pay
What to measure (CPU, memory, disk, network), for how long, and where each cloud shows it.
You can't right-size, schedule or commit sensibly without knowing how resources are actually used. Guessing usually leads to oversized VMs that stay oversized. This guide covers what to measure, over what period, and the built-in tools in each cloud that do most of the work for you.
What to measure
| Metric | What it tells you | Watch out for |
|---|---|---|
| CPU: average and peak (P95) | Whether the VM is too big, about right, or too small | A low average with short, high peaks. Size for the peak that matters, not the average. |
| Memory | Whether a smaller size will still fit the working set | Not collected by default on any of the three clouds. Install the agent first (below). |
| Disk IOPS and throughput | Whether a cheaper disk type or smaller VM will keep up | Smaller VM sizes also have lower disk and network limits. |
| Network | Idle servers (almost no traffic) and data transfer costs | Traffic leaving the cloud or crossing regions costs money; inside a zone it is usually free. |
| Hours running | Candidates for power schedules | Development and test that runs 24/7 but is used 50 hours a week. |
Collect memory, not just CPU
All three clouds show CPU out of the box, but memory needs an agent inside the VM. Without it, rightsizing tools either ignore memory or play it safe.
| Azure | AWS | Google Cloud | |
|---|---|---|---|
| Agent | Azure Monitor Agent with VM insights | CloudWatch agent | Ops Agent |
| Used by the rightsizing tool | Azure Advisor (memory is used for resize recommendations) | Compute Optimizer (memory only when the agent is installed) | Recommender (memory when the Ops Agent is installed) |
How long to measure
Two weeks is the minimum; a full month is better, so the data includes month-end processing, patch weekends and any monthly reports. For workloads with quarterly peaks (finance close, school terms, seasonal sales) look back further or size for the known peak.
| Tool | Lookback |
|---|---|
| Azure Advisor | Configurable: 7, 14, 21, 30, 60 or 90 days |
| AWS Compute Optimizer | 14 days by default; 32 days at no extra cost; 93 days with the paid enhanced infrastructure metrics |
| Google Cloud Recommender | Based on the last 8 days of usage for machine type recommendations |
Let the built-in tools do the first pass
Each cloud already analyses your usage and suggests changes. Start there before building anything yourself.
| Azure | AWS | Google Cloud | |
|---|---|---|---|
| Rightsizing and idle resources | Azure Advisor (Cost) | AWS Compute Optimizer, Cost Optimization Hub | Recommender (Active Assist): machine type and idle VM recommendations |
| Spend by service, team or tag | Cost Management: Cost analysis | Cost Explorer | Cloud Billing reports |
| Commitment recommendations | Reservation and savings plan recommendations in Advisor | Savings Plans and RI recommendations in Cost Explorer | CUD recommendations and CUD analysis in Cloud Billing |
Pull the same data from PowerShell when you want to review it in bulk:
# Azure: Advisor cost recommendations, and 30 days of peak CPU for one VM
Get-AzAdvisorRecommendation -Category Cost |
Select-Object ImpactedValue, @{n='Problem';e={$_.ShortDescriptionProblem}}
$vm = Get-AzVM -ResourceGroupName 'rg-notes-test' -Name 'vm-notes-test-01'
Get-AzMetric -ResourceId $vm.Id -MetricName 'Percentage CPU' -StartTime (Get-Date).AddDays(-30) `
-TimeGrain 01:00:00 -AggregationType Maximum
# AWS: Compute Optimizer findings, and 14 days of hourly peak CPU for one instance
Get-COEC2InstanceRecommendation -Region us-east-1 |
Select-Object -ExpandProperty InstanceRecommendations |
Select-Object InstanceName, CurrentInstanceType, Finding
Get-CWMetricStatistic -Namespace 'AWS/EC2' -MetricName 'CPUUtilization' `
-Dimension @{ Name = 'InstanceId'; Value = 'i-0123456789abcdef0' } `
-UtcStartTime (Get-Date).ToUniversalTime().AddDays(-14) -UtcEndTime (Get-Date).ToUniversalTime() `
-Period 3600 -Statistic Maximum
# Google Cloud: machine type and idle VM recommendations for one zone
gcloud recommender recommendations list --project=prj-notes-test --location=us-east1-b `
--recommender=google.compute.instance.MachineTypeRecommender
gcloud recommender recommendations list --project=prj-notes-test --location=us-east1-b `
--recommender=google.compute.instance.IdleResourceRecommender
Tag what you measure
Usage data is only useful when you know who to ask. Before a review, make sure resources carry at least an owner, an environment (prod, dev, test) and a cost centre. The untagged-resource reports find the gaps: Get-AzUntaggedResources.ps1, Get-AwsUntaggedResources.ps1 and Get-GcpUnlabeledResources.ps1.