Answers · The systems around the model
Why does latency explode when utilization gets close to 100%?
In shortWaiting time grows as one over the capacity you have left, so halving the spare capacity doubles the wait and the last few percent of load dominate.
Latency explodes near saturation because the wait is governed by the capacity still unused, not by the capacity in use. In the simplest single-server queue, the time a job spends in the system is service times, where is the fraction of capacity in use. Halve the spare capacity and you double the wait.
That formula is for one server with arrivals that arrive independently and service times that vary. The constants change under other assumptions, but the dependence is the part that survives, and it is the part that produces the knee.
The arithmetic
At half load, , a job spends service times in the system and of those waiting. At eighty percent, service times. At ninety, . At ninety-five, . At ninety-eight, . The spare fraction went and the time went . Every halving of the headroom doubles the wait.
| utilisation | headroom | time in system | waiting time |
|---|---|---|---|
| 0.50 | 0.50 | 2.0 | 1.0 |
| 0.80 | 0.20 | 5.0 | 4.0 |
| 0.90 | 0.10 | 10.0 | 9.0 |
| 0.95 | 0.05 | 20.0 | 19.0 |
| 0.98 | 0.02 | 50.0 | 49.0 |
The linear guess
The natural guess is that wait grows in step with load. If it did, the step from ninety to ninety-five percent would add a small constant. It doubles the wait, from 10 to 20. The step from ninety-five to ninety-eight is three points of load, a tenth of the earlier thirty-point step from fifty to eighty, and it multiplies the wait by 2.5, the same factor the thirty-point step bought. That is the knee: not a change in the machine, but the reciprocal turning a small remaining fraction into a large time.
The reciprocal has a mechanical reading. A backlog of jobs drains at a net rate of jobs per service time, because the server completes one job per service time and new work arrives at rate . So the time to clear the backlog is . A backlog of 20 jobs at eighty percent load takes service times to clear; the same backlog at fifty percent takes . The queue length that forms during a burst is what matters, and the drain rate is the headroom.
Little's law ties the queue to the latency: . If a thousand requests arrive per second and each must finish within a tenth of a second, no more than can be in flight. If the same service lets drift to half a second, the same arrival rate puts in flight. The queue depth grows with the latency, so a latency problem is always also a memory and concurrency problem.
Variability makes the reciprocal worse. A burst of twenty jobs arriving at once at eighty percent load has to drain at the spare rate of jobs per service time, taking service times. The same twenty jobs spread evenly add of a service time each and never form a queue. Two services with identical average load can therefore have queues that differ by the whole burst size, which is why smoothing arrivals buys latency without buying machines.
Where it stops
The explosion is capped when you stop letting the queue hold work. A bounded queue with admission control keeps finite and turns excess load into rejections, so the failure mode changes from slowness to dropped requests. A deterministic service process halves the waiting time, which becomes ; the shape is the same but displaced. At the queue never drains and there is no steady state at all: the wait is unbounded and the formula has already told you so through a zero or negative denominator. More servers move the knee to the right but do not remove it, because the reciprocal of the headroom returns.
An operating point near sixty-five percent leaves of capacity free, so the time in system is service times. At ninety percent it is service times. The extra idle machines between those two points are not waste; they are the reserve that absorbs a burst and drains the backlog afterwards. Above seventy percent the same reserve is doing both jobs and runs out in both at once.
Worth keeping
- Waiting time in a queue scales as one over the fraction of capacity still free, not as the fraction already used.
- A service at ninety-five percent utilisation has twenty times the time in system of an empty one, and at ninety-eight percent it has fifty times.
- Bursty arrivals queue far worse than the same average load spread evenly, so smoothing arrivals buys headroom without buying machines.
Where this goes next
This question is one step of Running a Service That Stays Up, a course that works through its subject from the beginning. The page that teaches this part of it is Why It Falls Over All at Once, and it reads the whole way through whether or not you have an account.
What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.
Read that pageThe whole courseOther questions people ask about this
- Does a server being up mean my service is available?No. A server being up only says a check got an answer; availability is the share of user requests that succeeded, measured where users are.
- Why do retries make an overloaded service worse?Retries add extra requests precisely when a service is already too busy, so they turn a small overload into a much larger one and can keep the failure going by themselves.
- What's the difference between a CDN cache and caching inside my own app?A CDN cache sits near the user and can only hold answers that are identical for everyone, while a cache inside your app can be personal but exists once per process.
- What's the difference between LRU and LFU, and which one should I use?LRU drops the item unused for longest; LFU drops the item requested least often. Both guess at future use, and the cheap win is refusing one-off arrivals rather than counting requests.
- Why can't a system just stay consistent and available when the network splits?During a split, a cut-off machine can only answer from the data it already holds, so it must either risk being wrong or refuse to answer.
- How can I tell if my traffic is bursty or just high volume?Compare the variance of the gaps between arrivals with the square of their average gap: high volume alone does not make traffic bursty.