Log inStart free
LESSON 34.05 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Benchmark sweeps and maximum sustainable QPS

Sweep one serving setup until its P99 latency breaks a 2-second SLO.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 34.05 · LOAD TEST BAYPREFILL 33,981 TOK/S · DECODE 131.1 TOK/S
01
Stage 1 of 6 · Prefill and decode
Prefill runs 512 tokens in one 15.1 ms step. Decode makes 1 token per 7.6 ms step.
Explain it simply

Every step reads all the weights once. Prefill does 512 tokens of math per read, so compute sets its time. Decode does 1, so memory sets it. Prefill moves 259 times more tokens a second. A real step adds 2 ms and gets 80% of peak bandwidth. Decode takes 7.6 ms, not 34.01's ideal 4.5 ms.

Two step bars. Prefill: 33,981 tokens a second, limited by compute. Decode: 131.1 tokens a second, limited by memory.

requests, KV cacheweights, settingsthroughput, max QPSover the SLO, no fit
prefill · 512 prompt tokenscompute 13.1 msmemory 5.6 msstep = 2 + 13.1 ≈ 15.1 ms33,981tokens/sdecode · 1 new tokencompute 0.03 msmemory 5.6 msstep = 2 + 5.6 ≈ 7.6 ms131.1tokens/sbar length = time (same scale in both rows)prefill vs decode: one step eachthroughput = tokens ÷ step timeprefill · 512 prompt tokenscompute 13.1 msmemory 5.6 msstep = 2 + 13.1 ≈ 15.1 ms33,981tokens/sdecode · 1 new tokencompute 0.03 msmemory 5.6 msstep = 2 + 5.6 ≈ 7.6 ms131.1tokens/sbar length = time (same scale in both rows)prefill vs decode: one step eachthroughput = tokens ÷ step time
Toy: 512-token prompts, 128-token replies, H100 GPUs, a roofline step model
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
tstep=t0+max⁡(FLOPsC,bytesBW)\sy{t}{out}{t_{step}} = \sy{o}{param}{t_0} + \max\left(\frac{\sy{f}{data}{\text{FLOPs}}}{\sy{c}{param}{C}}, \frac{\sy{b}{data}{\text{bytes}}}{\sy{bw}{param}{BW}}\right)
tprefill=2+max⁡(13.1,5.6)=15.1 ms,tdecode=2+max⁡(0.03,5.6)=7.6 mst_{prefill} = 2 + \max(13.1, 5.6) = 15.1\text{ ms},\quad t_{decode} = 2 + \max(0.03, 5.6) = 7.6\text{ ms}

A step takes its longer time: compute or memory.

Common mix-ups

MYTHThe peak throughput is the rate a server can promise.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01For 8B on 1 GPU, does FP8 grow max QPS less or more than 2 times?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.