Unit 4 of 13 · about 4 hours · measure
Fair warmup and arrivals, raw traces and tail percentiles with uncertainty
Build on Auditing benchmarks: timing, baselines, parity and cherry-picking. Shared queues and prefix caches make serving requests dependent, so uncertainty needs a serving-specific sampling unit.
You'll be able to
- Run paired serving trials with matched arrivals, cache policy, output contract and warmup boundary.
- Regenerate latency and goodput summaries from raw per-request records, including failures.
- Report p50, p95 and p99 with uncertainty that respects trial or session dependence.
Covers
Read
In this order, only the parts listed
0 of 3 done
- Benchmark state and endpoint boundaryTensorRT-LLM Benchmarking Guide
TensorRT-LLM commit cc63e66: Before Benchmarking; Preparing a Dataset; Online Serving Benchmarking; Startup Metrics (page read 2026-10-14)
Read as governance, not commands to change device settings. Record your GPU's clock, power and thermal state; separate startup and warm serving results.
- Retain the request evidence and observer controlLLM Inference Systems Laboratory - Full Capstone
Milestone B: correlated events, observer overhead, raw timestamps and decode gaps; Milestone E: open-loop final workloads
- Resampling independent experimental unitsSciPy bootstrap confidence intervals
SciPy 1.18.0: Opening resampling procedure; Parameters: statistic, paired, method and rng; Notes: degenerate data; Examples: difference between means and paired-sample statistics (page read 2026-10-14)
Skip plotting and Array API support. Use the procedure on independent replay trials or justified blocks, not on individual dependent tokens.
Focus on
- Warmup ends at a declared readiness condition. Reset or prepopulate caches identically according to the experiment question; cold cache and cold model startup are different states.
- Randomize off/on order within replay pairs. Keep intended arrivals fixed, record actual sends and retain client delays so a concurrency cap cannot conceal overload.
- Keep arrival, admission, first-content, stream-chunk, completion and terminal-error records with token counts and request identity. Client chunk timestamps are not necessarily individual token timestamps.
- Declare the quantile estimator and the population: request TTFT, request TPOT or token gaps. Resample whole independent trial pairs, recomputing the chosen statistic; report sample counts and sparse-tail limitations.
Common mistakes · 3
- Computing percentiles of batch means and calling them request percentiles. Aggregation has changed the population.
- Using more bootstrap resamples to compensate for too few tail observations. Resampling cannot invent an unseen tail.
- Filtering failed requests and presenting the remaining latency distribution as all-user service quality. Report failures and censoring alongside successful latencies.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.Why preserve off/on pairing during resampling?Answer
The pair shares replay conditions. Breaking it discards that dependence and changes the uncertainty of the difference.
2.Is the average of trial p99 values the pooled request p99?Answer
No. Quantiles are nonlinear. Pool raw observations to estimate pooled p99, or explicitly report the mean of trial p99 values as a different statistic.
3.Why not independently resample every token gap?Answer
Gaps share requests, scheduler iterations and cache state. Independent resampling can understate uncertainty; use trials or justified dependent blocks.
4.Does a narrow interval from a tiny sample establish p99 precisely?Answer
No. Tail coverage may be poor or the bootstrap degenerate. Report the observation count and limitation, and collect more independent evidence.
You're done when
A fresh analysis run regenerates your percentile and goodput tables from raw records, and your report justifies cache controls, sampling units and tail uncertainty.
Only when you can do this without notes.
Leads to
Notes
Resources · 3 for this unit, 11 more in the section
- TensorRT-LLM Benchmarking GuideNVIDIA · required
Use the benchmark workflow, configuration capture, startup metrics and online-serving path as a benchmark-governance reference. Apply the same discipline to your engine and never import NVIDIA results as your own evidence.
- LLM Inference Systems Laboratory - Full CapstoneRoadmap-Final · required
Complete the architecture map, contribution, fallbacks, correctness and fault suite, raw benchmark package, negative result, capacity and cost plan, independent reproduction and design defense. This artifact supplies the track milestone.
- SciPy bootstrap confidence intervalsSciPy · support
Read the resampling procedure, paired parameter, Notes on degenerate data and Examples. Apply it to independent trials; do not assume correlated serving requests are independent samples.
Also in this section
- Hands-On LLM Serving and Optimization - Chapters 8 and 9, frameworks and optimization in practiceChi Wang and Peiheng Hu (O'Reilly) · primary
Read Chapter 9 as a worked sequence from traffic generation and baseline through quantized and distributed variants, then the vLLM architecture and scheduler sections of Chapter 8. Replace its model, engine version and hardware with your own fixed contract.
- vLLM V1 Architecture OverviewvLLM Project · required
Map API server, EngineCore, scheduler, KV cache manager, model executor and distributed deployment from the current documentation into exact source files. Select the bounded contribution only after identifying its state and fallback boundaries.
- Nano-vLLM and Mini-SGLang as Engine Reconstruction BridgesGeeeekExplorer and SGLang Project · required
Reconstruct Nano-vLLM first, then compare Mini-SGLang cache, scheduler, overlap and model-runner boundaries. Move to vLLM or SGLang only when you can predict where the same responsibility lives.
- UCSD CSE 291A (Spring 2026) - Guest lecture: Engineering vLLMUC San Diego · support
Read the scribe notes, Sections 3, 6 and 7: the architecture overview, model parallelism and serving topology, and the hybrid KV allocator with offloading. Use it to predict where a change would live before reading code.
- AI Performance Engineering - Inference Engine and Benchmark LanesWafer · reference
A curated index. Use Sections 4 and 5 only to find a mechanism source for the contribution.
- AI Systems Performance Engineering companion code - inference labsChris Fregly (O'Reilly) · required
Use
labs/dynamic_router,labs/cache_aware_disagg_inference,labs/speculative_decodeorlabs/flashinfer_attentionas a pattern for a controlled baseline, optimization and profile. Rerun everything under your own manifest. - Etalon: Holistic Performance Evaluation Framework for LLM Inference SystemsMicrosoft Research · required
Use its per-request SLO and goodput framing to audit the benchmark. Preserve raw outcomes, quality acceptance and load shape so a throughput increase cannot hide missed latency targets.
- Machine Learning Systems, Volume 2 - The Economics and Architecture of InferenceHarvard (Vijay Janapa Reddi) · support
Read the opening sections of Inference at Scale for cost per token, utilization and serving-architecture dimensions, then build your own capacity and cost model from measured numbers.
- MLPerf Inference Datacenter BenchmarkMLCommons · support
Study scenario definitions, audit discipline and reproducibility. Borrow governance ideas appropriate to the capstone; submitting to MLPerf or reproducing its fleet hardware is outside the gate.
- Artificial Analysis - Performance benchmarking methodologyArtificial Analysis · reference
Read how its latency, output speed and price figures are measured. Use its public numbers as an outside comparison for your capacity plan, never as your own evidence.
- Machine Learning Systems, Volume 2 - Sustainable AIVijay Janapa Reddi · support
For optional energy/carbon accounting, read Energy measurement techniques, System-level energy profiling and Operational carbon calculation. State meter boundaries and apply PUE only to complete IT energy, once.