Skip to content

Utilisation against latency, the queueing knee

Random arrivals queue long before a server is full: time in the system is S ÷ (1 − ρ), so keep headroom and alert on saturation.

Predict first

Before you read: predict

ExamHall's start service signs each candidate's exam-start token on one worker, one request at a time, in arrival order. Requests arrive at random, independently of one another, and the signing work varies at random from request to request. In the 08:50 rehearsal the worker was busy 50% of the time, and a request spent 16 ms in the service on average, waiting included. At 09:00 the same kinds of request will keep it busy 90% of the time.

About how long will a request then spend in the service on average?

Pick one

The 30-second version

Utilisation ρ is the share of time a server is busy. With random arrivals and varying work, mean time in the system is the work S ÷ (1 − ρ): twice S at 50% busy, ten times at 90%. The p99 is about 4.6 times that mean. Keep headroom, and alert on saturation before latency breaks.

Random arrivals queue long before a server is full: time in the system is S ÷ (1 − ρ), so keep headroom and alert on saturation.

How it works

Step 1 of 14

Utilisation. ρ = arrival rate × average work S: the share of time a server is busy. A random balancer gives each server its share.
In the kitchen
  • the charger busy 90% of the day → utilisation (step 1)

Analogy: The single rapid charger at a quiet motorway service area (motoring)

Drivers stop when their batteries say so, and a charge takes 20 minutes on average, longer for some cars than others.

At the services In the system
the charger busy 90% of the day utilisation (step 1)
three drivers in ten minutes, then nobody for an hour random arrivals bunch (step 3)
at 90% busy, the average driver spends over three hours at the services for a 20-minute charge the knee (steps 4–5)
"it's free one hour in ten" is no room for more cars not 10% spare (step 6)
the driver who pulls in behind a cluster waits far longer than the average the tail (step 8)
a second charger ordered before the busy share passes what the waiting-time target allows headroom (step 12)
a screen at the entrance counting cars in line, watched before angry reviews arrive saturation's own alert (steps 13–14)

Breaks down when: drivers who see a long line drive on to the next services, so arrivals fall as the queue grows; requests keep coming. And a charge's time depends on the car, not on chance.

Contrasting case: a delivery firm books its vans into 20-minute slots, each charging exactly 20 minutes. Every slot is used and no van waits, as in scale-littles-law-capacity's waiting room (step 2).

In real terms: a server near 100% busy looks efficient and is slow; run at the share your latency target allows, and alert when it is passed.

Examples, run for real

4.1 ExamHall EXH-2620: the paper renderer at 09:00

ExamHall's paper renderer builds each candidate's paper on one worker; the work varies with the paper and averages 20 ms. The 09:00 rehearsal sent requests the way candidates press Start, at random:

4.1 one renderer · work 20 ms on average · 90% busy · 2,000,000 requests a run (seed 2620)
4.1 even arrivals, fixed 20 ms work:      mean 20.0 ms · p99 20.0 ms
4.1 random arrivals and work (M/M/1):    mean 195 ms · p99 901 ms · formula 200 and 921 ms
4.1 MR !2920, rendered through check-in: 60% busy · mean 49.9 ms · p99 228 ms · formula 50.0 and 230 ms

At the same 90% busy, even arrivals with fixed work never waited (step 2); random ones made the mean about ten times the work and the p99 over forty times (steps 4–8). MR !2920 renders papers through the 08:45 check-in instead, so the renderer runs 60% busy at 09:00, and opens a ticket when it passes 70% busy for an hour (steps 12–14).

4.2 Payments ledger: the knee, row by row

A posting worker whose work averages 5 ms, at five busy shares:

4.2 posting worker · work 5 ms on average · random arrivals and work · 2,000,000 postings a row
4.2 50% busy · mean  10.0 ms (2.0x the work) · formula 10.0 ms (2.0x)
4.2 70% busy · mean  16.6 ms (3.3x the work) · formula 16.7 ms (3.3x)
4.2 80% busy · mean  25.2 ms (5.0x the work) · formula 25.0 ms (5.0x)
4.2 90% busy · mean  51.1 ms (10.2x the work) · formula 50.0 ms (10.0x)
4.2 95% busy · mean  94.1 ms (18.8x the work) · formula 100.0 ms (20.0x)

Each row is S ÷ (1 − ρ) within the run's noise, and the gaps widen towards 100% (steps 4–5).

Try it

Answer first, then check. Nothing is saved.

Question 1 of 5

A ticket shop's seat-hold API runs on one worker, one hold at a time. Requests arrive at random, and the work per hold varies at random. Each Saturday's 10:00 on-sale peak lasts an hour. Last Saturday a hold spent 40 ms in the API on average, waiting included; this Saturday the peak brought 15% more requests, and a hold spent 120 ms on average.

Which account fits these numbers?

Pick one

Question 2 of 5

A payments ledger checks each account's balance on one worker, one check at a time. Checks arrive at random, and the work per check varies at random, averaging 24 ms. At the month-end peak the ledger's dashboard shows only the mean time a check spends in the service: 120 ms.

About what is the p99 time in the service at that peak?

Pick one

Question 3 of 5

A chat service's fan-out worker delivers each new message to its room, one message at a time, and every message takes exactly 10 ms of work. Messages arrive at random. At the evening peak the worker is busy 90% of the time.

About how long does a message spend in the worker on average, waiting included?

Pick one

Question 4 of 5

A catalog's image service makes thumbnails on pods that each run one worker; a thumbnail's work varies at random and averages 20 ms. The load balancer sends each request to a pod picked at random, and each pod queues its own requests. At the sale peak 880 thumbnail requests a second arrive, at random. A thumbnail may spend at most 80 ms in its pod on average.

What is the fewest pods that meets that at the peak?

Pick one

Question 5 of 5

A payments ledger posts journal entries on one worker, one at a time. Entries arrive at random, and the work per entry varies at random, averaging 20 ms. Its SLO: at every weekly peak, the p99 time an entry spends in the service stays within 500 ms. The next ten weekly peaks are forecast at 60%, 64%, 68%, 72%, 76%, 80%, 84%, 88%, 92% and 96% busy. The team wants this rule to fire at least two weekly peaks before the first peak whose p99 passes 500 ms:

alert: PostingWorkerSaturated
expr: avg_over_time(posting_worker_busy_ratio[1h]) > 0.95
severity: page

Which part of the rule keeps it from doing that?

Pick one

Go deeper

Pro tips
  1. State the knee as a ratio before any tool is opened: "at 90% busy, expect about ten times the work on average, and a p99 near forty-six times". It explains most "traffic went up a little and latency exploded" incidents in one sentence (the curriculum's pro tip), and it holds only for random arrivals and varying work (steps 9–10). When: someone reads a 90% CPU graph as "10% to spare" (steps 5–8). Verify: tip 4.1's run at 90% busy: mean 9.7x the work · p99 45.1x · formula 10.0x and 46.1x Status: RAN.
Source

Every graded script checks each hash and asserts the passage it relies on before it runs. No item is keyed on a quoted passage; every key is executed. Valid as of 2026-10-02.

  • Google SRE book, Alejandro Forero Cuervo, "Handling Overload": https://sre.google/sre-book/handling-overload/ (sre-handling-overload.txt). The curriculum row's named source. Quoted: "In a majority of cases (although certainly not in all), we've found that simply using CPU consumption as the signal for provisioning works well"; "As utilization approaches configured thresholds, we start rejecting requests based on their criticality (higher thresholds for higher criticalities)" (that rejection is scale-backpressure-admission-shedding's; this lesson only names utilisation as the signal). Supports steps 1 and 13.
  • Google SRE book, Rob Ewaschuk, "Monitoring Distributed Systems": https://sre.google/sre-book/monitoring-distributed-systems/ (sre-monitoring.txt). Quoted: saturation is "How "full" your service is"; "Note that many systems degrade in performance before they achieve 100% utilization, so having a utilization target is essential."; "Latency increases are often a leading indicator of saturation."; "page a human when one signal is problematic (or, in the case of saturation, nearly problematic)"; "If you run a web service with an average latency of 100 ms at 1,000 requests per second, 1% of requests might easily take 5 seconds." Supports steps 8, 12–14.
  • Wikipedia, M/M/1 queue: https://en.wikipedia.org/wiki/M/M/1_queue (wp-mm1-queue.txt). Quoted: "arrivals are determined by a Poisson process and job service times have an exponential distribution"; "We write ρ = λ/μ for the utilization of the buffer and require ρ < 1 for the queue to be stable."; "The average response time or sojourn time (total time a customer spends in the system) … can be computed using Little's law as 1/(μ − λ)"; for first come, first served, "the response time they experience (the sum of both waiting time and service time) has Laplace transform (μ − λ)/(s + μ − λ)", an exponential time with mean 1/(μ − λ), whose p99 is that mean × ln 100. Supports steps 1, 4, 8 and 11.
  • Wikipedia, Kingman's formula: https://en.wikipedia.org/wiki/Kingman's_formula (wp-kingman.txt). Quoted: "an approximation for the mean waiting time in a G/G/1 queue"; "The formula is the product of three terms which depend on utilization (U), variability (V) and service time (T)."; "ca is the coefficient of variation for arrivals … and cs is the coefficient of variation for service times." With random arrivals (cₐ = 1) it gives the exact mean for any work; this lesson runs it for cₛ = 1 and cₛ = 0. Supports steps 9–10.
  • Wikipedia, Kendall's notation: https://en.wikipedia.org/wiki/Kendall's_notation (wp-kendall.txt). Quoted: "A M/M/1 queue means that the time between arrivals is Markovian (M), i.e. the inter-arrival time follows an exponential distribution of parameter λ." Supports the M/M/1 label in step 4.
  • Not fetched: Leonard Kleinrock, Queueing Systems, Vol. 1: Theory (1975), the row's first source. It is a book and not fetchable as text, so it keys and quotes nothing here; the formulas above are checked against the saved Wikipedia text and against the runs.

Checked against the tools and docs as of 2026-10-02.