Rightsizing

On this page 7

Rightsizing is the practice of matching the size and type of cloud resources to the measured demand of the workloads that use them, so that capacity is neither wasted nor insufficient. In cloud economics, it is one of the first and most effective levers of cloud cost optimization, because overprovisioned virtual machines, databases and containers are among the largest sources of avoidable spending.

Rightsizing is a continuous, data-driven process rather than a one-time cleanup. Workloads change, providers release new instance families, and pricing commitments such as reserved instances and Savings Plans depend on sizes chosen correctly beforehand.

How rightsizing works

Rightsizing follows a measure, analyze, change and verify cycle. Utilization data is collected over a representative period, usually at least 14 to 30 days so that weekly cycles and month-end peaks are included. The data is then compared with the capacity of the current resource, and a smaller, larger or different resource type is proposed.

The analysis must look at peaks and percentiles, not averages. A server averaging 15 percent CPU may still reach 90 percent for an hour each night. Practitioners therefore size against the 95th or 99th percentile of usage plus headroom, often 20 to 30 percent, to absorb spikes without throttling.

MetricWhat it revealsTypical signal of overprovisioning
CPU utilizationCompute demand over timePeak percentile consistently below 40 percent
Memory utilizationWorking set and cache needsPeak usage well below half of allocated memory
Network throughputBandwidth requirementsTraffic far below the instance bandwidth limit
Disk IOPS and throughputStorage performance needsProvisioned IOPS largely unused
CPU credit balanceBurstable instance behaviorCredits accumulate and are never spent
Metrics used in rightsizing analysis

Memory metrics are often not collected by default on virtual machines, because the hypervisor cannot see guest memory usage. An agent inside the operating system is needed, and recommendations made without memory data can cause out-of-memory failures after a downsize.

Types of rightsizing actions

Rightsizing is broader than shrinking a virtual machine. The following actions all count, and the best savings often come from changing the resource family rather than only its size.

ActionExampleTypical effect
DownsizingEight vCPU instance moved to four vCPUCost roughly halved within the family
Family changeGeneral-purpose to memory-optimizedBetter fit for memory-heavy workloads
Generation upgradeOlder instance family to current generationBetter price-performance
Processor architecture changex86 to ARM-based instancesLower price where software supports it
Storage tuningOverprovisioned IOPS reducedLower storage charges
Container request tuningPod CPU and memory requests loweredMore pods per node, fewer nodes
TerminationIdle instances removedSpending on that resource eliminated
Common rightsizing actions

In Kubernetes, rightsizing targets resource requests and limits. Inflated requests reserve capacity that nothing uses, so the cluster autoscaler adds nodes unnecessarily. Tools that recommend requests from observed usage address this layer.

Rightsizing interacts closely with other cloud economics practices, and the order in which they are applied matters.

PracticeGoalRelationship to rightsizing
RightsizingCorrect size and type per resourceFoundation for the other practices
AutoscalingAdjust the number of instances to loadRightsize the unit, then scale the count
Reserved instances and Savings PlansDiscount committed usageCommit after rightsizing to avoid locking in waste
Spot instancesUse spare capacity at a discountApplies to interruption-tolerant workloads
SchedulingStop resources outside working hoursComplements sizing for non-production
Rightsizing and neighboring practices

The key rule is rightsize before you commit. Purchasing a three-year commitment for oversized instances locks in waste, while rightsizing afterwards can leave commitments underused. Within FinOps, rightsizing recommendations are typically reviewed with application owners through showback or chargeback reports, which make each team aware of what its resources cost.

Running a rightsizing program

Successful programs treat rightsizing as an engineering workflow with clear ownership, not as a finance request. Recommendations from provider tools or third-party platforms are a starting point, but an engineer who understands the workload must approve each change.

SituationRecommended approachReason
Idle non-production resourcesTerminate or schedule shutdownLowest risk, immediate savings
Stateless services behind a load balancerDownsize one instance group at a timeEasy rollback, gradual exposure
Production databasesChange during a maintenance windowResize often requires restart or failover
Licensed software per corePrioritize core reductionLicense savings can exceed infrastructure savings
Prioritizing rightsizing candidates

Each change should be verified with before-and-after performance metrics such as latency and error rates, and every resize should be defined in infrastructure as code so that the next deployment does not restore the old size.

Pitfalls and limitations

  • Sizing on averages hides peaks and causes throttling or outages after a downsize.
  • Ignoring memory because it is not measured by default leads to out-of-memory crashes.
  • Too short an observation window misses monthly batch jobs and seasonal peaks.
  • Overlooking instance limits: smaller instances also have lower network bandwidth and fewer attachable disks.
  • Changes that do not stick: manual resizes are reverted by templates that still specify the old size.

Rightsizing also has diminishing returns. After the large, obvious cases are fixed, further gains require more engineering effort per dollar saved, so mature organizations automate recommendations and review them on a regular monthly or quarterly cadence.

A non-technical view

Rightsizing is like choosing the right size of moving truck. A truck that is too large wastes money every day. A truck that is too small cannot carry the load.

In the cloud, companies rent computers by size and pay every hour. Many rent bigger computers than they need, just to be safe. Rightsizing means checking how much power is really used and switching to a better fit. The work keeps running, and the bill shrinks.

A concrete example

A software company runs 120 virtual machines for its web application, internal tools and test environments. A FinOps review shows that 30-day CPU usage at the 95th percentile stays below 25 percent on most web servers, and memory data from an installed agent confirms they use less than half of their allocated memory.

The team moves the web tier from eight vCPU instances to four vCPU instances of a newer generation, changes the test environments to shut down at night and terminates 14 idle machines. Latency and error rates are watched for two weeks with no regression. Monthly compute spending falls by about 35 percent, and only then does the company buy Savings Plans sized to the new, smaller footprint.