Slavik Shynkarenko

notebook № 155 plates · 13 min to read, longer to play ·

Paying only for what you use

On rightsizing, idle and waste

part 4 of 7 in What the cloud costs · by

Every cloud bill carries waste: disks nobody attached, test servers awake all weekend, databases sized for a launch that never came. This notebook goes hunting. Fix the cheap things first, size machines to their real peaks, switch things off at night, and see why the order you do it in matters, for the money and for the carbon.

I

plate I · idle and orphaned

The waste hunt

The cloud makes creating things effortless and forgetting them free, until the bill arrives. Disks outlive the servers they were attached to. Snapshots pile up with no retention policy. Load balancers keep serving no traffic. Nothing breaks when you forget a resource, so nothing reminds you.

A first hunt usually turns up a list like the one on the right. The tempting move is to start with the biggest number. The better move is to sort by saving per hour of effort. Deleting orphaned volumes takes an afternoon. Resizing production databases takes a sprint, a change window and a nervous on-call engineer.

Quick wins also build the habit. Once a team has seen a few thousand dollars vanish from its allocated cost in a week, the harder fixes stop sounding like someone else’s project.

Sort by “per hour of effort” and switch on the top four. How much of the total did that take?

fig. 15.1~/findingssort · fix
Findings from an illustrative first scan of a mid-sized account, priced at rounded AWS list prices. Effort is a rough estimate in engineer-hours.
II

plate II · rightsizing

One size too big

Most machines are sized once, at launch, by someone guessing. The guess is nearly always generous, because nobody gets paged for an oversized server. Two weeks of metrics later, the machine idles at 15% and the guess is still on the bill.

Rightsizing is resizing to what the workload really does. The trap is sizing to the average: a server averaging under 3 cores of use can still need 6 at its daily peak. Size to the real peak plus headroom, and check memory as well as CPU, since memory is what usually forces the larger size.

Cloud instance families double at each step, so one step down is half the cost. That’s why rightsizing finds such big savings, and why it needs care: one step too far and the peaks start hitting the ceiling.

Step down from 4xlarge until the peaks start clipping. Which size would you pick?

fig. 15.2~/two-weeksinstance size
Fourteen days of simulated hourly CPU use for one service. Prices are rounded on-demand rates for one general-purpose family in one US region.
III

plate III · scheduling

Lights off at night

Production has to run all week. Development, test and staging environments don’t. Yet they usually do, because turning them off is a chore and turning them on again is a delay. Every idle night and weekend is billed at the full hourly rate.

A simple schedule (on at eight, off at eight, weekdays only) cuts an environment from 168 hours a week to 60, almost two-thirds off. Going further means environments that start on demand when someone opens a pull request and stop when it merges, which a good internal platform makes a one-line setting.

Scheduling is pure usage optimisation: the same machines, at the same rate, for fewer hours. And because non-production is often a third of the bill, it’s one of the largest savings that touches no customer.

Switch from “always on” to “office hours”, then to “on demand”. Watch the grid go dark.

fig. 15.3~/one-weekschedule · fleet
One week of a non-production environment, hour by hour. Each environment costs an illustrative $0.60 an hour across its machines.
IV

plate IV · sequencing

Usage first, then rate

The two levers of optimisation (use less, pay less per unit) look independent. They aren’t. A commitment discount locks in a level of usage for a year or three. Buy it before the cleanup, and the cleanup pulls usage below the line you promised to pay for.

That gap is stranded commitment: money spent on capacity you deleted. On a three-year term, that’s three years of paying for servers you switched off.

Waiting for the cleanup to finish isn’t free either: every month on demand is a month without the discount. The way out is to split the commitment. Commit early to the floor, the usage that survives any cleanup, then clean up, let usage settle, and top up to the new baseline. A discount from month one, and nothing stranded.

Compare all three. Why does waiting cost almost as much as committing too early?

fig. 15.4~/which-firstsequence
A simulation over three years: $100k a month of on-demand compute, 30% of it waste removed over months 3–5. Commitments are three-year terms at 50% off. “Commit first” covers $90k at once. The others cover $63k after the cleanup, and “floor first” commits $60k on day one.
V

plate V · sustainability

The greener bill

Every hour a server doesn’t run is electricity nobody burns. So the usage levers from this notebook (deleting, rightsizing, scheduling, newer and more efficient machine generations) cut carbon in the same proportion as cost. For usage, cheaper and greener point the same way.

Where they split is location. The carbon intensity of electricity varies tenfold between grids: hydro and nuclear in the Nordics and France, gas and coal elsewhere. The cleanest region isn’t always the cheapest, and moving workloads has latency and data-residency costs of its own.

The FinOps Framework treats sustainability as a capability of its own, and the big providers now publish carbon reports per account and service. The data comes late and coarse, but it uses the same allocation as cost, which makes it a natural extra column on every team’s report.

Turn on all three fixes in Virginia, then move the fleet to Sweden. Which change cut more carbon?

fig. 15.5~/two-metersfixes · region
An illustrative fleet of 200 servers. Grid intensities are rough annual averages in grams of CO₂e per kWh, rounded. Providers’ own regional figures and market-based methods differ.

Questions people ask

What is rightsizing in the cloud?

Rightsizing is matching a resource’s size to what its workload actually needs. You look at CPU, memory and network over a few weeks, size for the real peak plus some headroom, not for the average or a guess, and move to the smaller instance type. Typical candidates run below 40% utilisation at their busiest.

Should you rightsize before buying Reserved Instances or Savings Plans?

Yes, in most cases. A commitment locks in a level of spend for one or three years. If you commit first and then rightsize, the usage drops below the commitment and you keep paying for capacity you no longer run. To avoid months without any discount, commit early only to the floor that survives the cleanup, then top up once usage has settled.

What are the most common sources of cloud waste?

Orphaned storage volumes and old snapshots, idle load balancers and IP addresses, non-production environments running around the clock, oversized databases and instances, previous-generation machine types, and logs kept forever in hot storage. Most are cheap to fix once someone owns the list.

Related material

elsewhere in the notebooks

further reading

← the Cloud FinOps series · all notebooks