---
title: "Size servers from what they use · Agent Wranglers"
url: https://agentwranglers.se/playbook/infrastructure/cost-and-ownership/rightsize-from-measurements
updated: 2026-10-20
licence: "All rights reserved"
---

# Size servers from what they use

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [Cost and ownership](https://agentwranglers.se/playbook/infrastructure/cost-and-ownership)
- Rule: 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: Read peak CPU and memory from the [resource metrics](https://agentwranglers.se/playbook/operations/metrics-and-traces/resource-metrics). Keep the [headroom](https://agentwranglers.se/playbook/operations/capacity-and-cost/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.
- 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.

Example:

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

**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`.

- Previous: [Delete resources that sit idle](https://agentwranglers.se/playbook/infrastructure/cost-and-ownership/delete-idle-resources)
- Next: [Show the cost of each change in review](https://agentwranglers.se/playbook/infrastructure/cost-and-ownership/cost-in-review)
- [Cost and ownership](https://agentwranglers.se/playbook/infrastructure/cost-and-ownership)
