Sub topic 1
Why Compute Is Over-Provisioned and What You Pay For
Prerequisites
This chapter assumes you understand EC2 instances, instance types, AMIs, basic CloudWatch metrics, and the AWS CLI. You should also be comfortable with Linux commands.
Why Compute Is Over-Provisioned and What You Pay For
Compute is often over-provisioned because teams choose capacity for launch-day peaks, uncertain growth, or worst-case traffic. They may also keep the same instance type after a workload becomes smaller. An instance with low average utilization still incurs its full hourly charge while running.
EC2 cost is only one part of the bill. Consider these related costs:
| Cost area | What affects it |
|---|---|
| EC2 compute | Instance family, size, Region, operating system, and running hours |
| Storage | EBS volume type, size, and provisioned IOPS |
| Data transfer | Traffic between Regions, Availability Zones, or the internet |
| Commitments | Savings Plans or Reserved Instances |
Measuring Real Utilization with CloudWatch
Use a representative window that includes normal traffic, releases, batch jobs, and known peaks. CPU alone is insufficient. Check memory through the CloudWatch agent, plus network throughput, disk operations, disk latency, and application response time.
aws cloudwatch get-metric-statistics \
--namespace AWS/EC2 \
--metric-name CPUUtilization \
--dimensions Name=InstanceId,Value=i-0123456789abcdef0 \
--start-time 2026-11-01T00:00:00Z \
--end-time 2026-11-15T00:00:00Z \
--period 3600 \
--statistics Average MaximumReview averages and high percentiles together. A low average with regular saturation is not evidence that downsizing is safe.
A Repeatable Right-Sizing Method
- Record two to four weeks of utilization and service-level indicators.
- Identify the limiting resource: CPU, memory, network, storage, or a dependency.
- Select a smaller size or a different family that matches the workload.
- Load-test the candidate and compare throughput, latency, errors, and cost.
- Roll out gradually with alarms and a tested rollback.
Using AWS Compute Optimizer Recommendations
Compute Optimizer analyzes historical utilization and proposes instance configurations. Enable the service first, then inspect its recommendation, projected savings, performance risk, and lookback period.
aws compute-optimizer get-ec2-instance-recommendations \
--instance-arns arn:aws:ec2:us-east-1:111122223333:instance/i-0123456789abcdef0Treat the result as evidence, not an automatic change. Check workload seasonality, hidden memory pressure, licensing constraints, and deployment limits before accepting it.
Exercise
Why can a low average CPU value still make downsizing unsafe?
Show answer
Short CPU spikes, memory pressure, latency requirements, or another resource may limit the workload even when average CPU is low.