27/39
Part 5 of 6 · Queueing and overloadLearn

Eight workers, one queue: read the p99 curve

The same bend shows up in the slow tail, and with many servers too.

Here's the same effect with 8 workers sharing one queue, each taking 400 ms on average, like a small batch sampling service. The curve is p99 latency against offered load. Drag the load from 50% to 95%, then past 100%.

Utilization and tail latencyInteractive
over capacity: no steady state02.5 s5.0 s0%50%100%150%
p99 time in the system (waiting plus service) on the y axis, 8 workers at 400 ms a request on average.
Stable: p99 is 1.9 s
Served per second
14.0
p50
327 ms
p99
1.9 s
Waiting, on average
0.6

What to read off it:

  • At low load, p99 is the work itself. Service times averaging 400 ms put the slowest 1% near 1.8 s, with no waiting at all. At 70% load, p99 is about 1.9 s.
  • The knee. At 90%, p99 is about 2.8 s, and at 95% about 4.9 s. The last 5% of utilization costs more than the first 90%.
  • Past 100%, there's no steady state. More arrives than leaves, and the queue grows as long as the overload lasts.
  • Shedding bounds it. Shed past 64 waiting, and at 120% load about a sixth of requests are turned away, while p99 stays near 5 s.

Real servers add their own slowdown on top of the queueing. Amazon's builders find in load tests that a server's latency is lower at low utilization than at high. Under heavy load, contention, context switching and garbage collection all grow. Google's SRE book turns that into a rule: many systems degrade before 100% utilization, so a utilization target is essential.