On this page
The new serving build finishes more requests per second than the old one. The benchmark says so, and the chart in the pull request climbs up and to the right. Yet users wait longer for the first word, a few streams stall partway through, and some of the fastest responses contain invalid tool arguments.
Did the build improve? A single throughput number can't answer that. Worse, it can mislead you for an uncomfortable reason: when a server slows down, a badly built load test quietly backs off, stops sending, and reports a healthy result.
The stakes go beyond one bad chart. Continuous Batching and Scheduling shows why prompt processing and generation compete, and GPU Profiling, Correctness, and Benchmarking separates kernel timing from wider execution. In GPU Serving & Autoscaling, we assumed one replica sustains five active requests and derived a replica count, warm buffer, and budget from that assumption. If that capacity number came from a flattering benchmark, the fleet plan fails during the surge it was built for. Here we move measurement outward to the client, gateway, and serving system to earn that number honestly: reproduce the offered load, time what clients actually observe, keep every failure in the denominator, and state how sure you are.
Freeze what arrives and when
An average prompt length hides the exact shapes that break tail latency. Keep the real workload: prompts or token IDs, scheduled arrival times, output policies, request classes, and conversation dependencies, including the system prompt, retrieved context, and history the application actually sends.
A six-request trace for an incident-response assistant anchors the accounting math throughout this lesson:
| Request | Scheduled ms | Prompt tokens | Output policy | Shared prefix | Class |
|---|---|---|---|---|---|
r01 | 0 | 320 | natural stop, cap 96 | runbook A | interactive |
r02 | 120 | 336 | natural stop, cap 96 | runbook A | interactive |
r03 | 700 | 4,096 | natural stop, cap 256 | none | interactive |
r04 | 760 | 280 | natural stop, cap 64 | none | interactive |
r05 | 800 | 2,048 | natural stop, cap 512 | policy B | background |
r06 | 1,900 | 480 | natural stop, cap 128 | runbook A | interactive |
Six requests is small, but every row exercises a distinct interaction. The long prompt at r03 lands 60 ms ahead of the short r04, so it can interfere with it. The background request r05 can occupy a decode slot for longer. And r01, r02, and r06 share a runbook, which lets prefix caching save real work when compatible entries stay warm. Repeating one prompt isn't inherently wrong; it's wrong to pass off a cache-friendly test as an unrelated production mix.
Count tokens with the pinned tokenizer and chat template. Keep output caps separate from actual lengths, since a cap isn't an observed output length. Forcing exact lengths by ignoring end-of-sequence (EOS) tokens can isolate scheduler behavior, turning the run into a shape-controlled stress test rather than a natural-response quality evaluation.
Generate the realized trace once, save it, and hash its exact bytes. A seed isn't enough because library or tokenizer upgrades can emit different rows from the same seed. Public traces such as BurstGPT and ServeGen help challenge assumptions about length tails and burstiness,[1][2] but neither represents your own traffic mix. Preserve the length tails, prompt-to-output correlations, tenant mix, prefix reuse, and conversation dependencies that govern your application.
Don't let a slow server turn down its own test
This is the most important distinction in serving benchmarks. An open-loop generator schedules requests independently of completions: if r04 is due at 760 ms, r03 still running doesn't cancel or delay that arrival. A closed-loop generator starts another request only after a virtual user finishes and waits a think time. When the server slows down, a closed-loop generator's offered rate drops, so the slow server quietly turns down its own test.
Neither mode is wrong; they answer different questions:
| Mode | What controls arrivals | Question it answers |
|---|---|---|
| Open-loop | Stored timestamps or an independent clock | Can the system sustain this offered workload? |
| Closed-loop | Completions and user think time | What do this many active users experience? |
| All-at-once | Every request released at the start | How does the system handle a batch or arrival burst? |

MLPerf Inference formalizes distinct scenarios along this line: Single Stream waits for each completion, while Server and Interactive use Poisson arrivals with explicit latency and quality rules.[3]
Rate, concurrency, and burstiness aren't interchangeable
Capacity claims need the open-loop answer. Little's Law then checks whether your load generator can even sustain the rate you asked for.[4] In a stable system with consistent boundaries, average outstanding requests equal accepted arrival rate times mean residence time :
At 3.0 requests/s and 0.9 s mean residence, average outstanding work is requests. A client capped at two concurrent slots can't sustain that rate regardless of how fast the server runs. Even a three-slot cap throttles bursts because an average isn't a maximum, so verify whether any client cap bound during the run.

Report rate, burstiness, and concurrency separately. A Poisson process has exponential inter-arrival gaps with coefficient of variation , while regular spacing has . Real traffic often exhibits correlated bursts that neither describes, so save realized timestamps when replay identity matters.
Tool defaults require inspection too. vllm bench serve, for example, exposes --request-rate, --burstiness (a Gamma shape parameter with ), and --max-concurrency. An infinite request rate creates an all-at-once or concurrency-limited stress mode rather than an open-loop test, and its constant-rate path rescales sampled gaps so the final arrival lands at request count divided by rate (whereas self-timed replay uses stored timestamps directly).[5][6] Similarly, time-scaling a stored trace to sweep offered rate compresses its duration: either extend the trace to keep duration comparable or report the shorter window explicitly.
Catch the generator being late
Here is a subtle failure that makes a run look better as the system degrades. Suppose r04 is scheduled at 760 ms, leaves the client late at 800 ms because the load generator fell behind, and still receives its first token at 1,050 ms. Measured from send time, time to first token (TTFT) improves from 285 ms to 250 ms. Generator lateness masquerades as faster inference.
This is one form of coordinated omission: the test stops observing the work that should have arrived during a slowdown.[7] The defense is cheap. Record scheduled_ms and sent_ms on one client monotonic clock, and report send-relative latency alongside schedule lag (sent_ms - scheduled_ms). Declare a schedule-lag tolerance before the run, such as 20 ms. When r04's lag climbs from 5 ms to 40 ms, the run is invalid for its declared offered load. Delayed and unsent requests must stay in the workload denominator.
Monitor the load generator like any service: connections, CPU, memory, and event-loop lag. Some tools (such as vLLM's client_queue_time and e2el_including_client_queue under finite rates with a client concurrency cap) surface client backpressure on successful requests,[6] but they don't replace full offered-request failure accounting. Finally, keep clock domains separate: use client timestamps for client latency, and use server-local spans or measured clock synchronization to attribute server queues.
A client cap of two binds while you test a target of 3 requests/s, and the server's latency stays low. What did you just learn?
Answer
You learned how the system behaves under the throttled workload, not its capacity at 3 requests/s. Keep the delayed arrivals, report schedule lag, and rerun with a generator that can sustain the intended schedule.
Decide which requests belong to the run
Separate every run into four phases: readiness, warmup, measurement, and drain. Warmup covers model loading, kernel compilation, CUDA Graph capture, connection pools, and scheduler initialization. Populate prefix caches during warmup only if the target production scenario actually begins with those prefixes warm.
During the measurement arrival window, such as ms, send the declared workload. Once arrivals stop, retain every in-flight request through drain until it reaches a terminal outcome: success, rejection, cancellation, error, or timeout. Fix timeouts before the run; a late response never erases a timeout the client already experienced.
Two accounting views are valid, and mixing them breaks every rate:
- An arrival cohort includes every request scheduled in the window and tracks all of its outcomes through drain.
- A wall-clock interval counts completions occurring inside a fixed interval, including arrivals from before the interval; track starting and ending outstanding work to interpret it.
Never divide one population's count by the other population's elapsed time. For our finite six-request trace, the cohort horizon runs from window start through the later of window end and final terminal outcome. Because that span includes drain, finite-cohort rates are accounting summaries rather than sustainable-capacity estimates.
For sustained load tests, plot outstanding work over time and compare accepted, completed, rejected, and timed-out rates. A flat server queue alone isn't proof of health because aggressive rejection keeps the queue shallow while users fail. Run long enough to cover warmup, cache turnover, thermal behavior, and traffic cycles.
Time what the protocol actually shows you
Let be client send time, first output-token time, final output-token time, and terminal completion time. With genuine per-token events on one clock, TTFT, inter-token latency (ITL), request-mean time per output token (TPOT), and terminal end-to-end latency are:
Take r01, sent at 0 ms, with token times [240, 280, 320, 440, 480] ms and terminal completion at 500 ms. TTFT is 240 ms, mean TPOT is 60 ms, and terminal E2E is 500 ms. Yet the four inter-token gaps are [40, 40, 120, 40] ms: a real 120 ms mid-stream pause disappears inside the 60 ms average.

Three protocol details routinely distort real reports:
- Terminal completion isn't the last token. Usage metadata, stop signals, or connection close can follow . Replacing with silently turns terminal E2E into last-token latency.
- One-token outputs have undefined TPOT. With , there are zero inter-token intervals, so TPOT is undefined rather than zero. Declare the eligibility rule before scoring: skip the TPOT gate on successful single-token replies while still checking TTFT and quality, and fail empty successful outputs unless the endpoint explicitly allows them.
- A streaming chunk isn't necessarily a token. A server-sent event (SSE) may bundle several tokens, emit metadata without text, or split a multibyte fragment, and TCP reads don't align with SSE frames. Dividing a multi-token chunk's delay by its token count invents timestamps you never observed. Name the exact metric your observations support:
| What you observed | Honest metric | What it can't tell you |
|---|---|---|
| First response byte | Time to first byte | Whether output text has started |
| First content-bearing chunk | Time to first content chunk | Exact first-token emission time |
| Client text chunks | Inter-chunk latency | Individual token ITL |
| Server token events | Server token cadence | Client-visible network cadence |
| Client token-level events | Client-observed ITL | GPU kernel duration |

Tools differ here too. vLLM's benchmark calls gaps between accepted stream events ITL even when speculative decoding bundles several tokens into one event, and its Chat Completions adapter stops latency at the last chunk with nonempty choices (ignoring trailing usage frames and [DONE]).[8][6] Match the endpoint, observed events, token-count source, and adapter version before comparing numbers across tools.
Smoothness depends on event order
A long gap isn't always a visible stall because earlier tokens can arrive ahead of reading speed and build slack. Etalon's fluidity metric evaluates streams against playback deadlines to capture that difference.[9] Suppose token 1 is due at 300 ms and each subsequent token every 80 ms, giving deadlines [300, 380, 460, 540, 620] ms. Our r01 trace (Stream A) meets every deadline despite its 120 ms gap. By contrast, Stream B arriving at [300, 380, 460, 580, 620] ms averages exactly 80 ms TPOT yet misses token four by 40 ms.

Etalon goes further by resetting subsequent deadlines after a stall so sustained freezes weigh more than isolated blips.[9] When playback smoothness matters, keep the ordered timestamp sequence instead of reducing each stream to one mean.
Score everyone you invited
Now build the accounting that catches a flattering benchmark. A request is qualified only if it reaches terminal success, passes your task quality check, and satisfies your declared latency limits. Every other offered request stays in the denominator: wrong answers, partial timeouts, rejections, and requests the generator never sent.
Here is the six-request cohort scored against a 300 ms TTFT limit, an 80 ms TPOT limit, and a 20 ms schedule-lag limit. Quality verdicts are supplied as inputs here because the scorer enforces accounting rather than judging semantics:
scheduled = {"r01": 0, "r02": 120, "r03": 700,
"r04": 760, "r05": 800, "r06": 1900}
# ID, sent, terminal, token times, status, quality verdict
rows = [
("r01", 0, 500, [240, 280, 320, 440, 480], "success", True),
("r02", 125, 310, [295], "success", True),
("r03", 705, 1220, [1045, 1085, 1125, 1165, 1205],
"success", True),
("r04", 765, 1310, [1050, 1111, 1172, 1233, 1294],
"success", True),
("r05", 805, 1180, [1005, 1045, 1085, 1125, 1165],
"success", False),
("r06", 1905, 2500, [2200], "timeout", False),
]
assert len({row[0] for row in rows}) == len(rows)
assert {row[0] for row in rows} == set(scheduled)
successes = qualified = 0
for request_id, sent, terminal, tokens, status, quality in rows:
assert scheduled[request_id] <= sent <= tokens[0]
assert tokens[-1] <= terminal
assert tokens == sorted(tokens)
lag = sent - scheduled[request_id]
assert lag <= 20
ttft = tokens[0] - sent
tpot = ((tokens[-1] - tokens[0]) / (len(tokens) - 1)
if len(tokens) > 1 else None)
success = status == "success"
paced = tpot is None or tpot <= 80
good = success and quality and ttft <= 300 and paced
successes += success
qualified += good
horizon_s = max(2000, max(row[2] for row in rows)) / 1000
assert (successes, qualified, horizon_s) == (5, 3, 2.5)
print(f"attainment: {qualified}/{len(rows)}")
print(f"successful RPS: {successes/horizon_s:.1f}")
print(f"qualified RPS: {qualified/horizon_s:.1f}")
print(f"offered arrival-window RPS: {len(rows)/2:.1f}")attainment: 3/6
successful RPS: 2.0
qualified RPS: 1.2
offered arrival-window RPS: 3.0Those four numbers describe the exact same run, yet a selective report can quote any one of them. Five requests returned HTTP success, so "2.0 successful RPS" is technically true, even though only half of the offered requests delivered an acceptable result:
| Request | Outcome | Qualified? |
|---|---|---|
r01 | TTFT 240 ms, TPOT 60 ms, terminal E2E 500 ms | Yes |
r02 | Single token, TTFT 170 ms; TPOT not applicable | Yes |
r03 | TTFT 340 ms exceeds the 300 ms limit | No |
r04 | TTFT 285 ms and TPOT 61 ms | Yes |
r05 | Fast successful reply, but task quality check fails | No |
r06 | Partial output followed by timeout at 2,500 ms | No |

To run the full CLI validator locally (Python 3.12+ and uv, zero external packages), download the scorer, the scheduling manifest, the sample outcomes, and the accounting tests, then run uv run score_requests.py example-trace.json example-events.jsonl > scored.json and uv run test_score_requests.py.
Notice its strict exit-code and omission contract:
- Exit 0: Schema, cohort completeness, and schedule checks passed (data integrity passed, not deployment approval).
- Exit 1: Malformed or incomplete inputs (for example, deleting
r06's timeout record aborts without printing a report, preventing dropped failures from inflating attainment). - Exit 2: Accounting report printed with all offered requests retained, but the generator missed its schedule (lag exceeded 20 ms or a request stayed unsent, recorded with
status: "not_sent", nullsent_ms, no tokens, a terminal accounting timestamp, andquality_pass: false).
If your client retries requests, keep attempt-level records alongside one logical-request result rather than silently merging duplicate IDs.
Goodput isn't the same as capacity
Goodput counts useful completed work over a declared interval:
SLO-constrained capacity asks a different question: what is the highest tested offered rate that still satisfies your service-level objective (SLO) attainment target while reproducing the load and staying stable?
Here is qualified requests divided by all offered requests. DistServe defines goodput per GPU closer to ,[10] so state your exact definition instead of assuming two tools mean the same quantity.
Goodput and capacity can pull in opposite directions. Pushing a server past its knee can finish more qualifying requests per second while failing a larger share of incoming users. Consider a rate sweep across three replicas running 200 longer incident-summary requests per point, requiring attainment, ms schedule lag, and a flat backlog:
| Offered RPS | Qualified / offered | Attainment | Max lag | Backlog | Point estimate passes? |
|---|---|---|---|---|---|
| 0.5 | 200 / 200 | 100% | 8 ms | flat | Yes |
| 1.0 | 200 / 200 | 100% | 9 ms | flat | Yes |
| 1.5 | 190 / 200 | 95% | 11 ms | flat | Yes |
| 2.0 | 160 / 200 | 80% | 12 ms | growing | No |
| 2.5 | 116 / 200 | 58% | 16 ms | growing | No |
Over the arrival window alone, 200 requests at 1.5 RPS arrive in ~133 s (1.43 qualified RPS), whereas at 2.0 RPS they arrive in 100 s (1.60 qualified RPS). A chart plotting only goodput crowns 2.0 RPS the winner even though one in five users fails the SLO and the backlog grows without bound.

Back to five requests per replica
Now connect this sweep back to GPU Serving & Autoscaling, which needed a per-replica concurrency . Little's Law converts the passing pool rate into active concurrency using the measured mean residence time at 1.5 RPS. Suppose requests average 10.0 s from send to terminal completion (consistent with ~120-token replies at the 80 ms pacing limit):
from math import ceil
passing_rps, replicas, mean_seconds = 1.5, 3, 10.0
rate = passing_rps / replicas
active = rate * mean_seconds # Little's Law: L = lambda * W
print(f"per replica: {rate:.1f} RPS, {active:.0f} active")
surge = 100 # active requests the fleet must carry
print("replicas by concurrency:", ceil(surge / active))
print("replicas by rate:", ceil(surge / mean_seconds / rate))per replica: 0.5 RPS, 5 active
replicas by concurrency: 20
replicas by rate: 20Both routes yield 20 replicas before headroom because five active requests at 10 s each is 0.5 RPS per replica. Keep three guardrails on that conversion: it is a mean (bursts momentarily exceed five), it belongs strictly to this length mix (if replies double, run a new sweep), and three replicas don't automatically scale linearly to twenty (routing, prefix locality, and shared bottlenecks shift with fleet size). Little's Law also sizes the load generator: holding 15 mean active requests requires client concurrency headroom well above 15 during bursts.
How sure are you?
A percentile needs both a defined population and enough observations. Nearest-rank p95 of 20 values is the 19th ordered item; nearest-rank p99 of 80 gaps is simply the maximum. Pooled ITL percentiles weight long responses more heavily because they emit more gaps, whereas a percentile across each request's worst gap weights every request equally. Averaging percentiles across runs reconstructs neither, so retain raw samples and stratify by prompt length, output length, and priority class.
Attainment carries the same sampling uncertainty. Does 190 / 200 truly establish 95% attainment? Under idealized independent Bernoulli trials with constant pass probability at one preselected load, compute the one-sided 95% Wilson lower confidence bound:[11]
from statistics import NormalDist
import numpy as np
z = NormalDist().inv_cdf(0.95)
good = np.array([190, 200, 20], dtype=np.float64)
n = np.array([200, 200, 20], dtype=np.float64)
p = good / n
lowers = (p + z * z / (2 * n) - z * np.sqrt(p * (1 - p) / n + z * z / (4 * n * n))) / (1 + z * z / n)
for g_i, n_i, obs, low in zip(good.astype(int), n.astype(int), p, lowers):
print(f"{g_i}/{n_i}: observed={obs:.1%}, lower={low:.1%}")190/200: observed=95.0%, lower=91.8%
200/200: observed=100.0%, lower=98.7%
20/20: observed=100.0%, lower=88.1%
Real traffic breaks independence via bursts and multi-turn conversations, so resample whole runs or time blocks instead of single gaps. Picking the best point from many noisy sweeps requires a fresh confirmation run. Alternate baseline and candidate run order so neither permanently inherits warm cache or thermal state, separate cold-start from warm-capacity runs, and keep rejected runs alongside passing ones.
Join performance and quality, and leave an auditable record
Performance and semantic quality need linked yet distinct evidence. Check protocol completion, finish reason, output length, and required schema on every performance response so accidental truncation never masquerades as a speedup. When speculative decoding or quantization changes the serving path, verify task quality alongside throughput. If semantic quality is graded only on a separate sampled suite, report performance attainment and semantic suite acceptance separately instead of labeling unscored performance responses semantically qualified.
Record six elements with every benchmark so another engineer can check your claim:
- Identity: model, tokenizer, chat template, quantization, engine, client, and container image.
- Environment: GPU count, placement, drivers, gateway/network scope, and relevant limits.
- Workload: exact trace bytes and hashes, realized timestamps, warmup/cache policy, timeouts, and run duration.
- Outcomes: every terminal outcome, raw timing events, quality verdicts, and system telemetry.
- Analysis: populations, denominators, SLO thresholds, uncertainty rules, repetitions, and rejected runs.
- Decision: chosen operating margin, recovery plan, and untested conditions.
Your report shows strong attainment, a flat server queue, and a local scorer that exited with code 0. Can you approve the serving configuration from that alone?
Answer
No. Exit code 0 confirms schema and cohort accounting integrity, not production readiness. Approving capacity requires reproduced open-loop load, retained failures and rejections, representative workload and quality evidence, repeated runs, and live validation with a stable rollout assignment.