Percentiles, SLOs and goodput
Speed is not one number. Every request has its own latency, and the slow ones matter most.
Averages hide the slow
If 99 requests take 1 s and one takes 100 s, the average is about 2 s. That looks fine, yet one user waited almost two minutes. An average mixes everyone together, so the slow requests vanish into it.
Percentiles
Sort the request times from fast to slow. P50 (the median) is the middle one: a typical request. P95 is the time that 95% of requests stay under, and P99 the time 99% stay under. These show the slow tail. A user who sends 100 messages a day will likely hit the P99 tail on most days, and that is what they remember.
SLOs
A service level objective (SLO) is a promise written as a number, like "P95 TTFT under 500 ms". "Fast enough" can't be checked; an SLO can. A chat app usually sets one for TTFT and one for the gap between tokens.
Goodput
Goodput counts only the requests that met the SLO. Push more load onto a server and throughput may rise, while more requests miss the SLO. Then goodput falls: the server is busier but serves fewer people well.
Run-to-run spread
The same test gives different numbers each time: other jobs on the machine, random prompts, timing. The first requests after a start are often slow, so send a warm-up first and don't count it. Run each test several times and report the spread, like "P95 between 400 and 650 ms". A change smaller than the usual spread is not proven by one run.
Remember
- Averages hide slow requests; look at percentiles.
- P50 is typical; P95 and P99 are the tail.
- An SLO makes "fast" a number you can check.
- Goodput counts only requests that met the SLO.
- Warm up, repeat, and report the spread.