Which metrics are essential to debug a P99 TTFT regression in production LLM serving?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Debug a P99 TTFT regression with per-request queue wait and prefill spans, scheduler state like KV-cache pressure and preemptions, and per-GPU resource use; cluster P50 throughput is too coarse.
Imagine a busy coffee shop. A customer's wait from ordering to first sip has two parts: time standing in line, and time the barista spends making it. To fix slow service you must measure both parts separately, and for the unlucky customers, not just the average. You also watch the shop floor: is the line backing up because the counter is full, or because one barista is stuck? A single number like drinks per day tells you nothing, because it stays flat even when the slowest customers wait ages. Good debugging tracks each customer's journey and the shop's live state together. That is what observability for model serving does: it follows each request while watching the system at the same time.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: decompose TTFT into queue wait + prefill, attribute queue growth via KV-cache utilization and preemptions, use per-GPU counters as tiebreaker, explain why P50 throughput is the wrong statistic for a P99 regression.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Watching cluster P50 throughput to chase a P99 latency bug. Averages stay flat while tails blow up, and aggregate throughput hides the unlucky requests you actually need to attribute.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.