Observability and reliability
Utilization and the knee
Queues form when work arrives faster than it is served. Latency stays flat for a long time, then climbs steeply as utilization nears 100%. That bend is the knee, and it is why planning targets sit near 70 to 80%.
A queue forms whenever work arrives faster than it can be served, even for a short stretch. Utilization ρ (the Greek letter rho) is the fraction of time a resource, such as a CPU, thread, connection or disk, is busy. As ρ rises, waiting time rises with it, and the rise accelerates near 100%.
Concept
For a simple model with one server, random arrivals and random service times (M/M/1), the mean time in the system is W ≈ S / (1 − ρ). Here S is the service time when the server is idle, and ρ is utilization from 0 to 1. Real systems have many servers and stages, but the shape of this curve still holds.
Walking through the knee
Take a service that takes S = 50 ms when it is idle.
| ρ (utilization) | Multiplier on S | Time in system |
|---|---|---|
| 0.50 | 2× | 100 ms |
| 0.70 | about 3.3× | about 165 ms |
| 0.80 | 5× | 250 ms |
| 0.90 | 10× | 500 ms |
| 0.95 | 20× | 1,000 ms |
Check one row. At 90% utilization, W = 50 / (1 − 0.9) = 50 / 0.1 = 500 ms. Going from 80% to 90% busy doubles the latency. Going from 90% to 95% doubles it again.
That curve is the knee. Latency looks fine for a long time, then a small bump in traffic doubles p99. This is why "CPU was only 85%" is not reassurance. For latency-sensitive services, plan for 70 to 80% on the scarce resource, which leaves room for variance and for failures.
Variance moves the knee earlier. If service times have a long tail, with occasional queries 10 times slower, the same average utilization gives a worse p99 than the table shows. Caching, fixing slow queries and isolating expensive paths are capacity work too.
Common mistakes
- Trusting averages. The average hides the tail, and the tail is where users feel the queue.
- Planning at 95%. The system is already in the steep part of the curve.
- Ignoring variance. Heavy-tailed service times push the knee to lower loads.
Check yourself
- At 90% utilization with
S = 50 ms, what is the time in the system? Answer: 500 ms, from 50 / (1 − 0.9). - Why is "CPU was only 85%" not reassurance? Answer: Latency climbs steeply near the knee, so 85% can already be past the point where p99 starts moving.
Key takeaways
- Latency rises steeply as utilization approaches 100%.
- Plan for roughly 70 to 80% on the scarce resource.
- Heavy-tailed service times bring the knee forward.
- Use the knee to decide how much headroom to keep.
Further learning
Next, use Little's law to turn these numbers into pool sizes: Little's law and pool sizing.
Related
Capacity planning and load testing
Forecasting demand, finding the latency knee with load tests and keeping headroom for peaks, deploys and AZ loss.
Little's law
A one-line formula that links how many items are in a system, how fast they arrive, and how long each one stays. It sizes queues, worker pools and servers.
Latency budgets
A latency budget splits one end-to-end target across every hop, so each team knows its share. Parallel calls cost the slowest one, and sequential calls add up.