Skip to content
Skip to lesson
Back to Topics
LearnGPU Systems & LLM InferenceServing Benchmark Engineering
HardEvaluation & Benchmarks21 min read

Serving Benchmark Engineering

The server finishes more requests per second, but the first word is slower and some fast answers are invalid. Keep the offered load, the client's timing, and every failure.

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:

RequestScheduled msPrompt tokensOutput policyShared prefixClass
r010320natural stop, cap 96runbook Ainteractive
r02120336natural stop, cap 96runbook Ainteractive
r037004,096natural stop, cap 256noneinteractive
r04760280natural stop, cap 64noneinteractive
r058002,048natural stop, cap 512policy Bbackground
r061,900480natural stop, cap 128runbook Ainteractive

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 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 . Keep output caps separate from actual lengths, since a cap isn't an observed output length. Forcing exact lengths by ignoring 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:

ModeWhat controls arrivalsQuestion it answers
Open-loopStored timestamps or an independent clockCan the system sustain this offered workload?
Closed-loopCompletions and user think timeWhat do this many active users experience?
All-at-onceEvery request released at the startHow does the system handle a batch or arrival burst?
Two client-slot timelines share a 700 to 1400 millisecond clock. With independent arrivals, r03 occupies one slot from its actual send at 705 to terminal completion at 1220, while r04 is due at 760 and occupies another slot from send 765 to terminal 1310. A separate illustrative single-virtual-user model stays occupied by r03 through 1220, then uses a declared 80 millisecond think time before a next send at 1300. The due-time marker remains at 760. This depicts client occupancy and backpressure; server queue timestamps are unknown.
The independent clock sends r04 while r03 still occupies a slot from 705 to 1220 ms. The lower lane models one virtual user waiting for completion plus an 80 ms think time before sending at 1300 ms, isolating client-slot occupancy rather than server queue internals.

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 LL equal accepted arrival rate λ\lambda times mean residence time WW:

L=λWL = \lambda W

At 3.0 requests/s and 0.9 s mean residence, average outstanding work is L=2.7L = 2.7 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.

Little’s Law throughput plot on a 0 to 3 RPS scale compares client concurrency limits from 1 to 8 slots against a dashed 3.0 RPS offered target with 0.9 s mean residence (2.7 average active slots). Deterministic pacing hits 3.0 RPS at 3 slots, whereas Poisson arrival bursts fall behind at 3 slots (2.07 RPS) and require 6 to 8 slots for burst headroom.
At 3.0 accepted requests/s and 0.9 s mean residence, Little's Law yields 2.7 average active slots. A 1- or 2-slot cap throttles throughput below the offered rate, and even 3 slots fall behind under Poisson arrival bursts until 6 to 8 slots leave headroom for spikes.

Report rate, burstiness, and concurrency separately. A Poisson process has exponential inter-arrival gaps with coefficient of variation CV=1CV = 1, while regular spacing has CV=0CV = 0. 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 kk with CV=1/kCV = 1/\sqrt{k}), 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, 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.

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 [0,2000)[0, 2000) 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 ss be client send time, t1t_1 first output-token time, tnt_n final output-token time, and cc terminal completion time. With genuine per-token events on one clock, TTFT, , request-mean , and terminal end-to-end latency are:

TTFT=t1−s,ITLi=ti−ti−1,\mathrm{TTFT} = t_1 - s, \qquad \mathrm{ITL}_i = t_i - t_{i-1}, TPOT=tn−t1n−1(n>1),E2E=c−s.\mathrm{TPOT} = \frac{t_n - t_1}{n - 1} \quad (n > 1), \qquad \mathrm{E2E} = c - s.

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.

Request r01 shares one millisecond clock: send at 0, normalized token events at 240, 280, 320, 440, and 480, and terminal completion at 500. TTFT spans 0 to 240. The four inter-token gaps are 40, 40, 120, and 40 milliseconds. Their first-to-last span is 240 milliseconds over four intervals, giving TPOT 60. Last-token latency is 480, while terminal E2E is 500. The aligned r02 inset has send at 125 and one token at 295, so TTFT is 170 milliseconds and TPOT is not applicable. These token events come directly from logged arrivals rather than reconstructed SSE chunks.
The gap between tokens three and four is 120 ms, while TPOT averages all four gaps to 60 ms. Terminal completion follows the last token, and the single-token inset has a 170 ms TTFT with undefined TPOT.

Three protocol details routinely distort real reports:

  1. Terminal completion isn't the last token. Usage metadata, stop signals, or connection close can follow tnt_n. Replacing cc with tnt_n silently turns terminal E2E into last-token latency.
  2. One-token outputs have undefined TPOT. With n=1n = 1, 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.
  3. 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 observedHonest metricWhat it can't tell you
First response byteTime to first byteWhether output text has started
First content-bearing chunkTime to first content chunkExact first-token emission time
Client text chunksInter-chunk latencyIndividual token ITL
Server token eventsServer token cadenceClient-visible network cadence
Client token-level eventsClient-observed ITLGPU kernel duration
Aligned two-layer timeline on a shared 0 to 500 millisecond clock compares coarse network/SSE chunk timestamps against per-token event logs for request r01. The upper layer bundles all five tokens into one coarse SSE frame timestamp, hiding internal jitter. The lower layer resolves the exact five token arrivals at 240, 280, 320, 440, and 480 ms, exposing inter-token gaps of 40, 40, 120, and 40 ms.
Network reads and SSE chunks bundle multiple tokens behind one frame timestamp, hiding per-token jitter. Genuine ITL requires per-token timestamps like r01's 40, 40, 120, and 40 ms gaps.

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.

Cumulative token-arrival chart compares Stream A and Stream B across tokens 1 through 5 against fixed playback deadlines (300, 380, 460, 540, and 620 ms). Stream A builds early slack and stays under every deadline even with a 120 ms gap before token 4. Stream B averages 80 ms TPOT yet crosses 40 ms past the 540 ms deadline on token 4 (580 ms).
Early slack absorbs later pauses: Stream A stays beneath every deadline despite a 120 ms gap, while Stream B averages 80 ms TPOT yet crosses the 540 ms deadline on token four.

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:

score-six-requests.py
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}")
Output
attainment: 3/6
successful RPS: 2.0
qualified RPS: 1.2
offered arrival-window RPS: 3.0

Those 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:

RequestOutcomeQualified?
r01TTFT 240 ms, TPOT 60 ms, terminal E2E 500 msYes
r02Single token, TTFT 170 ms; TPOT not applicableYes
r03TTFT 340 ms exceeds the 300 ms limitNo
r04TTFT 285 ms and TPOT 61 msYes
r05Fast successful reply, but task quality check failsNo
r06Partial output followed by timeout at 2,500 msNo
Six request identities share a 0 to 2500 millisecond clock. Scheduled arrivals are 0, 120, 700, 760, 800, and 1900; actual sends are 0, 125, 705, 765, 805, and 1905; terminal outcomes are 500, 310, 1220, 1310, 1180, and 2500. The arrival cohort ends at 2000 and drain continues to the r06 timeout at 2500. Requests r01, r02, and r04 qualify; r03 misses TTFT, r05 fails the quality check, and r06 times out. Six offered, five successful, and three qualified give 50 percent attainment. Offered rate is 3.0 per second over the two-second arrival window; success and qualified rates are 2.0 and 1.2 over the 2.5-second cohort horizon. An inset changes only r04 send from 765 to 800 while its first token remains at 1050. Send-relative TTFT falls from 285 to 250 milliseconds, but schedule lag rises from 5 to 40 and exceeds the 20 millisecond limit.
All six offered requests remain in the cohort through drain. Two seconds of arrivals give 3.0 offered RPS, and the 2.5-second horizon gives 2.0 successful and 1.2 qualified RPS. In the inset, delaying r04's send shrinks apparent TTFT while schedule lag breaches 20 ms.

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", null sent_ms, no tokens, a terminal accounting timestamp, and quality_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

counts useful completed work over a declared interval:

Grequests=qualified requestsdeclared elapsed seconds.G_{\text{requests}} = \frac{\text{qualified requests}}{\text{declared elapsed seconds}}.

SLO-constrained capacity asks a different question: what is the highest tested offered rate that still satisfies your attainment target α\alpha while reproducing the load and staying stable?

CSLO=max⁡{λtested:A(λ)≥α ∧ load reproduced ∧ stable}.C_{\mathrm{SLO}} = \max\{\lambda_{\mathrm{tested}} : A(\lambda) \geq \alpha \ \land \ \text{load reproduced} \ \land \ \text{stable}\}.

Here A(λ)A(\lambda) is qualified requests divided by all offered requests. DistServe defines goodput per GPU closer to CSLOC_{\mathrm{SLO}},[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 ≥95%\ge 95\% attainment, ≤20\le 20 ms schedule lag, and a flat backlog:

Offered RPSQualified / offeredAttainmentMax lagBacklogPoint estimate passes?
0.5200 / 200100%8 msflatYes
1.0200 / 200100%9 msflatYes
1.5190 / 20095%11 msflatYes
2.0160 / 20080%12 msgrowingNo
2.5116 / 20058%16 msgrowingNo

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.

Side-by-side operating curves sweep offered rate from 0.5 to 2.5 RPS with a shared vertical dashed 1.5 RPS passing frontier. Left: SLO attainment on a 50 to 100 percent scale holds at 100, 100, and 95 percent through 1.5 RPS before dropping to 80 percent at 2.0 RPS and 58 percent at 2.5 RPS. Right: goodput on a 0 to 3 RPS scale peaks at 1.60 qualified RPS at 2.0 RPS even though that rate fails the 95 percent floor.
The highest passing tested rate is 1.5 RPS (11 ms max lag, flat backlog). At 2.0 RPS, arrival-window goodput climbs to 1.60 qualified RPS even as attainment drops to 80% and queueing grows.

Back to five requests per replica

Now connect this sweep back to GPU Serving & Autoscaling, which needed a per-replica concurrency cc. 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):

earn-five.py
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))
Output
per replica: 0.5 RPS, 5 active
replicas by concurrency: 20
replicas by rate: 20

Both 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]

attainment-bound.py
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%}")
Output
190/200: observed=95.0%, lower=91.8%
200/200: observed=100.0%, lower=98.7%
20/20: observed=100.0%, lower=88.1%
Zoomed 85 to 100 percent plot of one-sided 95 percent Wilson lower confidence bounds against a dashed 95 percent floor. Only 200 of 200 passes (98.7 percent lower bound). Both 190 of 200 (95 percent observed, 91.8 percent lower bound) and 20 of 20 (100 percent observed, 88.1 percent lower bound) fall below the 95 percent threshold.
Sample size tightens the one-sided 95% Wilson lower bound under independent trials. Only 200/200 clears a 95% lower-bound rule (98.7%), whereas 190/200 (91.8%) and 20/20 (88.1%) fall short.

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.
Check your understanding

Mastery Check

Check each question as you go, or answer all of them and check together. Score 75% or higher to complete this lesson.

0 of 10 answered
1.A request sends at 60 ms, has token events at 260, 310, 360 and 510, then terminates at 550. What are TTFT, mean TPOT and terminal E2E?
2.Eight offered requests arrive within four seconds. Six succeed, five qualify, and the final outcome is at five seconds from the window start. Which attainment and qualified cohort rate follow?
3.The client sends at 100 ms and observes only text chunks at 260 and 420, each containing multiple tokens. No token-level trace exists. Which report matches those observations?
4.A request is scheduled at 620 ms with a 30 ms lag limit. Its first token stays at 860. Compare send A at 640 with send B at 655. Which tuple is correct?
5.Two runs use the same eight-request manifest. In both, seven requests were sent on time and have valid outcome records. In run A, the eighth request timed out after send, and its outcome record is missing. In run B, the send log confirms that the client never sent the eighth request, and its outcome file includes a valid not_sent record. What exit code and offered count does the scorer report for each run?
6.A load sweep requires attainment ≥95%, lag ≤20 ms and flat backlog. At 2 RPS it has 98%/15 ms/flat; at 2.5, 96%/25 ms/flat; at 3, 94%/15 ms/growing. Which tested point passes?
7.At one preselected load, 98 of 100 independent constant-probability trials pass. The resulting one-sided 95% Wilson lower bound is 94.1%. A policy requires 95% attainment. Which pair of decisions follows?
8.Response A contributes 90 gaps of 2 ms, response B contributes 6 gaps of 30 ms, and response C contributes 4 gaps of 100 ms. Using nearest-rank p95, what are pooled-gap p95 and p95 across per-request worst gaps?
9.A passing four-replica run accepts 2 requests/s with 12 s measured mean residence. For the same mix, what mean active count per replica and ideal replica arithmetic for 60 active requests follow?
10.All 50 benchmark requests return protocol-valid answers, and 44 meet the latency limit. A separate run generates new answers for 12 of the same prompts. Reviewers accept 10 of those 12 new answers. Alongside the suite result of 10/12, what should the team report for the benchmark?

10 questions remaining.

References

BurstGPT: A Real-World Workload Dataset to Optimize LLM Serving Systems

Wang, Y., Chen, Y., Li, Z., et al. · 2025 · arXiv preprint

https://arxiv.org/abs/2401.17644

ServeGen: Workload Characterization and Generation of Large Language Model Serving in Production

Xiang, Y., Li, X., Qian, K., Zhang, Y., Yu, W., Zhai, E., Jin, X., and Zhou, J. · 2026 · NSDI 2026

https://www.usenix.org/conference/nsdi26/presentation/xiang-servegen

MLPerf Inference Benchmark Rules.

MLCommons · 2026 · Official benchmark rules

https://github.com/mlcommons/inference_policies/blob/master/inference_rules.adoc

A Proof for the Queuing Formula: L = lambda W

Little, J. D. C. · 1961 · Operations Research

https://doi.org/10.1287/opre.9.3.383

Benchmark CLI

vLLM Project · 2026 · Official vLLM documentation

https://docs.vllm.ai/en/stable/benchmarking/cli/

vLLM Serving Benchmark: Client Queue and Metric Accounting

vLLM Project · 2026

https://github.com/vllm-project/vllm/blob/main/vllm/benchmarks/serve.py

wrk2: A constant throughput, correct latency recording variant of wrk

Tene, G. · 2014

https://github.com/giltene/wrk2

vLLM Streaming Benchmark: Token Events and Request End Timing

vLLM Project · 2026

https://github.com/vllm-project/vllm/blob/3c062d391d15cfa41d3f321cad24f3030c892a97/vllm/benchmarks/lib/endpoint_request_func.py

Etalon: Holistic Performance Evaluation Framework for LLM Inference Systems.

Agrawal, A., et al. · 2024 · arXiv preprint

https://arxiv.org/abs/2407.07000

DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving.

Zhong, Y., et al. · 2024 · OSDI 2024

https://arxiv.org/abs/2401.09670

NIST/SEMATECH e-Handbook: Confidence Intervals for Proportions

NIST/SEMATECH · 2026

https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm

Discussion

Questions and insights from fellow learners.

Discussion loads when you reach this section.