What makes an AI assistant feel slow? It is rarely the total time the model spends computing. More often, it is the pause before the first word appears, the stutter between tokens, or the occasional request that hangs for thirty seconds while everything else finishes in two. LLM latency monitoring is the practice of catching those moments with data instead of guesswork, and it has become one of the most practical skills for anyone running a language model in production.
This article walks through the metrics that matter, the traps that make dashboards lie, and the habits that separate teams who understand their latency from teams who just stare at a green graph.
Why Average Latency Is a Misleading Number
If a team reports that its model responds in 1.2 seconds on average, that number hides almost everything useful. Averages blend fast and slow requests into a comfortable middle that no real user experiences. Production systems have long relied on percentiles instead, because tail latency is what people remember. A p50 of 900 milliseconds with a p99 of 11 seconds means one in a hundred users waits more than ten times longer than the typical user, and those are the users who abandon the product.
The Google SRE Book’s discussion of tail latency and cascading failures explains why this amplification happens: a single slow dependency can multiply across retries and fan-out calls until a small percentage of slow requests turns into a broad outage. For LLM systems, the same logic applies. A retried request duplicates token generation, doubles cost, and often lands on an even busier server.
Practical rule: report p50, p90, p95, and p99 side by side, and alert on p99 rather than on the mean. If the p99 moves and the p50 does not, something structural changed. If both move together, the model or the infrastructure itself got slower.
Split the Request: TTFT and Time Per Output Token

A single latency number for a streaming response is too coarse to diagnose anything. The vLLM research paper, which introduced PagedAttention and described how modern serving engines evaluate performance, separates latency into time to first token (TTFT) and time per output token (TPOT), sometimes called inter-token latency. The vLLM paper’s evaluation methodology treats these as distinct because they are governed by different phases of computation. (Latency (engineering)))
TTFT is driven mainly by prefill, when the model processes the whole prompt before it generates a token. Long prompts, large system instructions, and retrieved context add to this time. TPOT is driven mainly by token-by-token generation, where each new token is produced in sequence; it grows with output length and batch pressure.
| Metric | What it captures | Typical cause of a spike |
|---|---|---|
| TTFT | Time from request to first streamed token | Long prompts, queue wait, cold starts |
| TPOT | Average gap between output tokens | Batch contention, GPU saturation, long outputs |
| End-to-end | Total wall-clock time for the full response | A combination of the two, plus network time |
Monitoring them separately turns a vague complaint into a diagnosis. Users who say the answer “takes forever to start” point at TTFT. Users who say it “types slowly” point at TPOT. The fix for each is different, and a blended metric would hide which one is broken. Teams that want a repeatable procedure for the full measurement chain can follow this guide on how to measure inference latency end to end.
Measure on Both Client and Server
One of the most common mistakes is trusting the latency number reported by the serving engine or the API provider. That number describes how long the model spent computing. It does not describe how long the user waited.
Client-observed latency includes network round-trip time, TLS handshakes, retries after a rate-limit error, tokenization done on the client, and the time your own application spends assembling the response. In a mobile app on a weak connection, these can easily outweigh the model’s compute time. Instrument the client. Record a timestamp when the user hits send, when the first byte arrives, when the first token arrives, and when the stream closes. Those four timestamps give you a latency budget you can actually defend.
A second mistake is measuring only successful requests. Timeouts and errors are latency events too, and excluding them from the percentile calculation makes the system look healthier than it is. Count failures separately, but never let them silently vanish from the dataset.
Batching Changes the Shape of Latency
Modern inference servers use continuous batching, a technique introduced by the Orca system, which schedules work at the level of individual iterations rather than whole requests. The Orca paper on iteration-level scheduling explains how this raises throughput dramatically by packing many requests into each decoding step.
The trade-off is that per-request latency now depends on what else is in the batch. A request that arrives during a traffic spike waits behind everything already queued. This means latency monitoring must capture queue time as its own signal, separate from compute time. If queue time grows while compute time stays flat, the answer is capacity, not optimization. If compute time grows while queue time is stable, the model or the hardware is the problem.
In practice, many teams add a simple derived metric: requests per second divided by the batch size the server reports. When that ratio drifts, the batch composition is changing, and latency will follow.
Standardized Benchmarks as a Reference Point
It helps to know what “good” looks like outside your own system. MLPerf Inference, the benchmark suite maintained by MLCommons, added a dedicated LLM category in its v4.0 round, with latency-constrained scenarios that report TTFT and TPOT under load. The MLPerf datacenter inference benchmark documentation describes the scenarios and metrics, which makes it a useful neutral reference when comparing hardware or serving configurations.
Benchmarks are not a substitute for production monitoring, though. They run on clean data with controlled prompt lengths. Production traffic is messy, with wildly varying input sizes and bursty arrival patterns. Use benchmarks to pick a configuration, then use production telemetry to confirm it holds up.
Consistent Instrumentation Across Providers
When a product routes requests across multiple model providers, latency data becomes hard to compare because each provider names and defines its metrics differently. Semantic conventions solve this by standardizing attribute names. OpenTelemetry publishes generative-AI semantic conventions for spans and metrics that define how to label the model, the operation type, and token counts, so a TTFT measurement from one backend lands in the same field as one from another. (OpenTelemetry documentation)
Adopting a convention early saves months of cleanup later. Even if the specification is still evolving, aligning field names now means dashboards, alerts, and historical comparisons keep working when providers change.
Five Habits That Actually Work in Practice
Experienced teams tend to converge on a similar set of practices, often after learning them the hard way.
- Log token counts next to latency. Token generation time scales with output length, so a slow response may simply be a long one. Recording input and output token counts lets you separate “the model got slower” from “the answers got longer.”
- Tag every request with its route and prompt template. Prompt templates with large retrieved contexts add to TTFT. Without a tag, that increase looks like random noise.
- Set alerts on percentiles with a minimum sample size. A p99 computed from nine requests is meaningless and will page someone at 3 a.m. for nothing.
- Watch cold starts separately. The first request after a scale-to-zero event can be ten times slower than the rest. Mixing it into the general pool distorts every percentile.
- Keep a latency budget per feature. A chat interface can tolerate a slower first token than an autocomplete box. One global threshold misleads both.
A common failure mode is building a beautiful dashboard that nobody checks during an incident. The fix is boring but effective: put the p99 TTFT and TPOT numbers directly in the on-call runbook, alongside the first three things to check. For teams tracking how these practices evolve across tooling and releases, the news section and the blog are worth following.
What to Do When Latency Regresses
When a percentile moves, resist the urge to guess. Work through the layers in order.
Start with the client. Did a release change how streaming is handled, or add a retry loop? Next, check queue time. A jump there points at capacity or a traffic pattern shift. Then check TTFT against prompt length. If prompts grew, retrieval or prompt assembly is the culprit. Finally, check TPOT against output length and batch size. If output tokens are stable and TPOT still rose, the model or the hardware changed.
This order matters because the cheapest explanations are usually the right ones. A surprising share of latency incidents turn out to be a prompt template that quietly gained two thousand tokens of context, not a degraded GPU.
Conclusion
LLM latency monitoring is less about collecting numbers and more about collecting the right ones. Split TTFT from TPOT, measure on the client, watch queue time alongside compute time, and report percentiles instead of averages. None of these ideas is exotic, but together they turn latency from a vague complaint into a signal a team can act on. The systems that feel fast are rarely the ones with the fastest models. They are the ones whose operators know exactly where the time goes.
Frequently Asked Questions
What is LLM latency monitoring?
It is the practice of continuously measuring how long a language model takes to respond, broken into stages such as time to first token, time per output token, and total end-to-end time. The goal is to detect slowdowns, diagnose their cause, and connect the numbers to what users actually experience.
Why is time to first token more important than total response time?
For streaming interfaces, users judge speed by how quickly the answer starts appearing. A response that begins in 400 milliseconds and takes twelve seconds to finish feels responsive, while one that stays silent for six seconds and then dumps the whole answer feels broken. TTFT captures that first impression; total time does not.
Should latency be measured on the server or on the client?
Both, but the client measurement is the one that reflects user experience. Server-side numbers exclude network delays, retries, and client-side processing. Client timestamps for send, first byte, first token, and stream close give a complete picture that server metrics alone cannot provide.
What percentiles should a team track?
At minimum, p50, p90, p95, and p99. The median shows the typical experience, while p95 and p99 reveal tail behavior where most user complaints originate. Alerting on p99 with a minimum sample size avoids noisy pages while still catching real regressions early.
How does batching affect LLM latency?
Continuous batching raises throughput by processing many requests together, but it makes each request’s latency depend on what else is in the batch and how long it waited in the queue. That is why queue time needs to be monitored as a separate metric from compute time.
What is a realistic latency target for a production LLM?
It depends heavily on the use case. Interactive chat generally benefits from a first token under one second, while background summarization can tolerate several seconds. The more useful exercise is establishing a budget per feature and monitoring against it consistently rather than chasing a universal number.
One last habit worth adding: review latency data on a fixed cadence, not only during incidents. A weekly look at p50 and p95 by route catches slow drift that never trips an alert but gradually erodes the experience. Pair that review with a short note on what changed — a model upgrade, a prompt edit, a new retrieval source — so future regressions can be traced to a cause instead of reconstructed from memory. Latency work compounds: each fix you document makes the next diagnosis faster, and the runbook slowly becomes an asset rather than an afterthought.







