Find the p90

Play this lesson

Is the target met?

Priya writes a target for Shard Garden's saves: 90% of saves finish within 300 ms. Google's SRE book writes targets the same way: "99% of Get RPC calls will complete in less than 100 ms."

A percentile sorts every measurement from fastest to slowest. The p90 is the time that 90% of them are at or below.

Priya collects 10 saves from one test garden. Their average is 240 ms. Kai says: "Under 300. Done!"

Try it

Find the p90

Sort the 10 saves, then tap the one that 90% of saves are at or below.

Try it in the lesson

Read the result

The average is 240 ms and the p90 is 340 ms. Is Priya's target, 90% of saves within 300 ms, met?

  1. No: only 8 of 10 saves finished within 300 ms
  2. Yes: the average is under 300 ms
  3. Yes: 340 ms is close enough to 300 ms
Show the answer

No: only 8 of 10 saves finished within 300 ms

8 of 10 is 80%, short of 90%. Two slow saves pulled the p90 up to 340 ms, while the average stayed under the target and hid them.

Counting the other way

There are two ways to check a target like Priya's:

Both give the same answer. The second is often easier with lots of data: the counter only needs to know whether each save beat 300 ms. Prometheus, a monitoring tool many studios use, shows how to check a target this way: its example is 95% within 300 ms.

Do the math

On Saturday, 912 of 1,000 saves finished within 300 ms. Is the target, 90% within 300 ms, met?

  1. Yes: 91.2% is more than 90%
  2. No: 88 saves were slow
  3. No: you need the p99 to know
Show the answer

Yes: 91.2% is more than 90%

912 ÷ 1,000 is 91.2%, which beats 90%. A target like this allows some slow saves: here up to 100 in 1,000.

Small samples, different answers

With 10 saves, the p90 here is the 9th: 9 of 10 is 90%. The same idea makes the p95 of 20 saves the 19th. Many tools interpolate instead, picking a value between two saves, so their answer can land between the 9th and the 10th.

The NIST handbook, from the US standards agency, says there is "not a standard universally accepted way" to do this. Methods agree closely on big samples and differ most on small ones.

So compare numbers from the same tool, and collect enough data.

Quick check

With only 10 saves, the p99 shows how slow the slowest 1 in 100 saves are.

Show the answer

False

Ten saves contain no "1 in 100": the p99 of 10 saves is just the slowest one. A p99 needs hundreds of saves before it means much.

Buckets near the target

Real games make millions of saves, so servers count them in buckets, like "under 200 ms" and "under 300 ms", instead of keeping every time.

A percentile from buckets is an estimate. Prometheus's docs say the error "is limited by the width of the bucket". In their example, the real p95 is about 320 ms, but with buckets at 300 ms and 450 ms the estimate is 443 ms.

So put bucket edges close to your target.

Pick the buckets

Priya's target is 90% of saves within 300 ms. Which bucket edges give her the most accurate answer?

  1. 200, 250, 300, 350 and 400 ms
  2. 100 ms, 1 second and 10 seconds
  3. One bucket for every whole second
Show the answer

200, 250, 300, 350 and 400 ms

Edges close to 300 ms keep the estimate accurate where it matters. With edges at 100 ms and 1 second, any p90 between them is a guess somewhere in a 900 ms gap.

On the studio board

Priya writes it up where the whole studio can see it: Saves: 90% within 300 ms. Today: 80%.

Kai finds the two slow saves: both happened while the garden was being backed up. That points to the next question: which part of a slow save made it slow?

Bolt says: Next: SLIs and SLOs turn a target like this into a promise to players. Traces show which part of a save was slow.

Fact-checked 12 October 2026