Explainer
Tail latency and goodput
Why the average wait hides the slowest requests, and how to count only the answers that were complete, correct and on time.
Illustration: of ten requests, nine finish in 2 seconds and one takes 20. The average is 3.8 seconds, a wait nobody had. Percentiles describe the spread instead:
- p50, the median. Half the requests finish within this time. Here, 2 seconds.
- p95. 95 percent finish within this time. With only ten requests it is the slowest one, 20 seconds; real reports use thousands.
- p99. 99 percent finish within this time, so it shows a plausible worst case.
Google's SRE book warns that “A simple average can obscure these tail latencies”. The slow requests are the tail. A service-level objective, or SLO, writes the target down, for example “95 percent of replies start within 1 second”.
Goodput counts only the useful work: answers per second that were complete, correct and within the target. A server can raise its tokens per second by packing in more requests while more of them run late or get cut off, and then its goodput falls. The DistServe paper counts the rate served “within both TTFT and TPOT constraints”; this site's version also requires a passed quality check, so a fast wrong answer does not count.
Going deeper
Measure percentiles at a stated load, and separately for time to first token and time per output token, since each has its own causes. A p99 from a few hundred requests rests on a handful of slow ones, so collect enough requests to trust it. The SRE book adds that “The higher the variance in response times, the more the typical user experience is affected by long-tail behavior”.
In the long read: Compare the same job. Then try Read a load test and choose a configuration.