Basis Lab

Work That Waits in a Queue

The Average Is Not the Experience

Last timeOne Queue or Several

Nobody experiences the average wait. What people notice is the slow end of the distribution, and a request made of many parts inherits the slow end of every one.

Why the average describes nobody

Waiting times are not spread evenly around their average. They have a short

floor, which is the service time itself, a common case just above it, and a long

thin upper end where a small share of requests take many times as long.

That shape has a consequence for every report. The average is pulled upward by

the long end, so it sits above the common case, and it is nowhere near the bad

case, so it describes neither. A service with an average of fifty milliseconds

might serve most requests in twenty and the unluckiest one in fifty in six

hundred, and all three of those numbers are true at once.

FIG 1One service, measured properly
waiting, in millisecondsshare of requests at lea
the common case181000
half of requests are und24500
nine in ten are under95100
ninety nine in a hundred42010
nine hundred and ninety 19001
the average52260
The last row is the figure that usually appears on its own, and the rows above it are what it is hiding. Two things are worth reading off. First, the average of fifty two is slower than five hundred out of a thousand requests and much faster than the worst ten, so about a quarter of requests are above it, which is the second column of that row. Second, the step from the ninety ninth to the nine hundred and ninety ninth is more than four times, which is where the complaints live: one request in a thousand is a lot of requests on a service handling a thousand a second.

The reason this matters more than it sounds is that the slow end is not a rare

curiosity visited by a few unlucky people. Somebody who makes twenty requests

loading a page meets the one in a hundred case about a fifth of the time, so the

tail of the service is the ordinary experience of the user.

A request made of many parts

The compounding is what turns a mild tail into a serious one. If a request

depends on five other calls and is finished only when all five return, it is

slow whenever any one of them is slow.

Suppose each of the five is slow four times in a thousand, which sounds like a

well behaved service. The chance that the whole request escapes being slow is

the chance that all five escape, which is nought point nine nine six raised to

the fifth power, and the chance that it does not is about two in a hundred. The

assembled request is five times more likely to be slow than any of its parts.

The lesson stops here

4 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01Things Arriving, and Things Being Served
  2. 02How Busy Is Busyopening only
  3. 03Why Waiting Explodes Near the Endopening only
  4. 04Arrivals Come in Clumpsopening only
  5. 05One Queue or Severalopening only
  6. 06The Average Is Not the Experienceyou are here
  7. 07When the Queue Fills Upopening only
  8. 08The One Relationship Worth Memorisingopening only

Read alongside