What traces and metrics do you need to debug a P99 TTFT regression in production LLM serving?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A team's P99 TTFT regressed from 400ms to 1.8s overnight while the model and code are unchanged. Describe the observability you'd want and how you'd use it to localize the regression to a root cause. List the specific metrics and traces involved.
Split TTFT into queue_wait plus prefill, instrument each as a per-request span, then read scheduler state for queue blowups and per-GPU counters plus prompt-length drift for prefill blowups.
Imagine a restaurant where the wait for your first bite is the number you care about. That wait has two parts: how long you stood in line before a table opened, and how long the kitchen took once you sat down. If first-bite time doubled overnight, you must know which part grew. Maybe the line got long because the dining room is full and nobody leaves. Maybe cooking got slow because one stove broke, or because everyone suddenly ordered huge meals. A serving system is the same. You stamp every order with a clock at each step, so you can see whether the line or the kitchen caused the slowdown. Without those stamps you are only guessing which half of the wait went wrong.
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.
5 min: decompose TTFT into queue wait plus prefill, list scheduler metrics for the queue branch and per-GPU plus prompt-length metrics for the prefill branch, then explain request-id correlation across OpenTelemetry spans and Prometheus.
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.
Treating TTFT as one opaque number. Without splitting queue wait from prefill, you cannot tell a scheduler admission problem from a slow prefill, so every fix is a guess.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.