Benchmark recipes
Baseline on one GPU
On a compatible CUDA host with vLLM installed, record the GPU, driver, vLLM version, model revision, dtype and cache configuration. Start the server in one terminal. In another, warm it with a short run, discard warmup and repeat each measured cell three times. Start direct, then repeat through the gateway.
vllm serve Qwen/Qwen2.5-0.5B-Instruct --port 8000 vllm bench serve --backend vllm --base-url http://localhost:8000 \ --model Qwen/Qwen2.5-0.5B-Instruct --dataset-name random \ --random-input-len 256 --random-output-len 64 --ignore-eos \ --num-prompts 200 --request-rate 2 --seed 42 \ --percentile-metrics ttft,tpot,e2el --metric-percentiles 50,95,99 \ --save-result
The direct command exercises /v1/completions. For the chat-only gateway use --backend openai-chat --endpoint /v1/chat/completions and the same tokenizer, workload and served model alias at both URLs. Check flags with vllm bench serve --help. vLLM · serving benchmark CLI
A / Find the saturation knee
Fix prompt/output lengths at 256/64. Sweep 1, 2, 4 and 8 requests/s; extend until the queue grows. Repeat at 2,048/64 and 256/256. Compare completed output tokens/s to p95 time to first content token (TTFT). Per-request TPOT = (last − first token time)/(output tokens − 1), defined for two or more output tokens.
B / Burst and recovery
On the mock, send one request/s for 60 s, ten/s for 30 s, then one/s for 120 s. Schedule arrivals from a monotonic clock independently of previous completions. Repeat with fixed and dynamic replicas. Log scheduled vs actual arrivals, queue peak, time back to baseline and replica-seconds. Kill one worker at the burst midpoint on a separate run.
C / Isolate rollout cost
Run a steady stream during a rolling update. Compare a fresh node against a warm node with cached weights. Timestamp pod creation, image availability, model loaded, ready and first successful stream. Repeat three times. Record interrupted streams and rejected requests independently.
D / Compare routing policies
Use the same seeded sequence of 80% short and 20% long requests. Slow one of two mock workers by 2×. Compare round-robin, least-in-flight and estimated queued tokens. Record per-class TTFT and rejected fraction; a fleet average can mask long-prompt starvation.
Results sheet
One row per run: environment · commit · seed · workload · offered req/s · completed/attempted · p50/p95 TTFT · p95 TPOT · tokens/s · SLO-good req/s · replica-seconds. Pick practice limits before running (e.g. TTFT ≤ 1 s and TPOT ≤ 80 ms). Goodput counts completed requests satisfying both limits per wall-clock second. Include censored timeouts and errors in the attempted denominator. Treat a p99 from 200 requests as exploratory.