Skip to content

Right-sizing a cloud database instance in four steps

Cloud database instances are routinely two sizes too big because nobody wants to be the engineer who broke the database. Here is the safe four-step right-sizing pass.

Cloud-managed database instances are the single largest line item on a lot of cloud bills, and they are routinely two sizes too big. The reason is straightforward: nobody wants to be the engineer who right-sized a production database the night before a launch. So instances get bumped up during incidents and never come back down. Here is the four-step pass we run.

What’s happening

Managed database services price on instance size, storage, IOPS, backup retention, and read replicas. Of those, instance size is the most over-provisioned. The default sizing decision was usually made early, against unknown traffic, with a margin. Once production hits a real workload, the original decision is rarely revisited unless something breaks.

The result is instances running at 10–25% average CPU and 30–50% memory, paying for capacity that exists only to handle a peak that may or may not still be representative.

How to verify

Step one is data, not changes. Pull 30 days of metrics:

  1. CPU utilization. Look at the p99, not the average. If p99 is under 60% across the window, the instance is oversized for the workload.
  2. Memory pressure. Look at FreeableMemory (RDS) or memory/usage (Cloud SQL) plus buffer cache hit ratio. A buffer cache hit ratio above 99.5% with stable freeable memory means there is headroom; a falling buffer cache hit ratio means the next size down will hurt.
  3. I/O patterns. If the workload is I/O bound, downsizing the instance may not help — the storage tier (provisioned IOPS, throughput) is the real constraint. Look at queue depth and read/write latency.
  4. Connections. Each instance class has a connection limit. If you are close to it, the size is constrained by clients, not by CPU.

The fix

Once the metrics support a downsize, run the four-step pass:

  1. Plan the target size, one tier down from current. Two tiers is tempting but rarely worth the risk on a first pass.
  2. Restore a recent snapshot to the target size in a non-production environment and replay a representative workload. Synthetic load is fine; production traffic mirroring is better.
  3. Schedule the change in a maintenance window with the rollback path written down. Multi-AZ deployments minimize the blast radius but do not eliminate it.
  4. Watch the same four metrics for two weeks before declaring it done. The savings only count if the workload survives a real peak at the new size.

If the first pass holds, the second pass becomes a much smaller decision.


Stack Harbor runs database right-sizing as a recurring service inside Cloud Compute. If your RDS or Cloud SQL line has not moved in a year, book a sizing review.