Agent Wranglers

Cost and ownership Recommended

Size servers from what they use

Every quarter, compare each server's size with its measured use over 14 days. Step down one size when its 95th percentile CPU stays under 40 percent and memory under 50 percent.

How to do it

Read peak CPU and memory from the resource metrics. Keep the headroom the service needs for peaks. Change one service at a time, and watch its speed objective for a week. Tools such as AWS Compute Optimizer or Google's recommender give the same advice.

Example

quantile_over_time(0.95, (1 - avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])))[14d:5m]) < 0.40

How to check

The quarterly report lists every server with its 14-day 95th percentile CPU and memory. None is below both limits without a written reason.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers infrastructure playbook: https://agentwranglers.se/playbook/infrastructure/cost-and-ownership/rightsize-from-measurements.