# P99 latency for LLM apps: what it means and how to track it

> P99 latency is the time that 99% of requests beat. For LLM apps, track it per metric (TTFT, total time), by output length, and never average percentiles.

Source: https://www.honeyhive.ai/learn/p99-latency (updated 2026-11-17)

P99 latency is the response time that 99% of requests beat, so the slowest 1% take longer. It tells you what your unluckiest regular users experience, which an average hides. For an LLM app, report it separately for [time to first token](/learn/time-to-first-token) and for total request time, and slice it by output length.

## Why the average misleads

Google's SRE book [warns](https://sre.google/sre-book/monitoring-distributed-systems/) that an average latency of 100 ms at 1,000 requests per second can coexist with 1% of requests taking 5 seconds. It recommends collecting request counts bucketed by latency, with bucket boundaries spaced roughly exponentially, instead of keeping only a mean.

| Percentile | Reads as | Use it for |
|---|---|---|
| p50 (median) | Half of requests are faster | The typical experience |
| p95 | 1 in 20 is slower | Routine service targets |
| p99 | 1 in 100 is slower | Worst regular experience, early saturation signal |

The SRE book also [notes](https://sre.google/sre-book/monitoring-distributed-systems/) that measuring the 99th percentile over a small window can be a very early signal of saturation.

## Why p99 matters more with agents

One call that has a 1% chance of landing in the tail is rare. A request that makes several calls is not. The chance that at least one of n independent calls hits its p99 is 1 minus 0.99 to the power n: about 4.9% for 5 calls, 9.6% for 10 and 18.2% for 20. An agent run that chains model and tool calls therefore meets a slow call far more often than any single call's p99 suggests.

Dean and Barroso [made the general point](https://research.google/pubs/the-tail-at-scale/) in "The Tail at Scale": latency episodes that are unimportant in a moderate-size system can come to dominate overall performance at large scale. The SRE book [adds](https://sre.google/sre-book/monitoring-distributed-systems/) that the 99th percentile of one backend can easily become the median response of the frontend that calls it.

## What to measure for an LLM call

LLM latency has parts, and each has its own tail. [NVIDIA](https://docs.nvidia.com/nim/benchmarking/llm/latest/metrics.html) defines time to first token as the time from query submission to the first received token, and end-to-end latency as TTFT plus generation time. Its inter-token latency is the average time between consecutive tokens, with TTFT excluded.

| Metric | Why track its p99 |
|---|---|
| Time to first token | Queueing, long prompts and network delay show up here, and it sets how responsive a streamed answer feels |
| Inter-token latency | Stalls during streaming |
| End-to-end latency | What the caller waits for, including a non-streaming caller |

NVIDIA's [formula](https://docs.nvidia.com/nim/benchmarking/llm/latest/metrics.html) sets inter-token latency to generation time divided by output tokens minus one, so at a steady token pace end-to-end latency grows with output length. A p99 that rises can mean answers got longer, not that the service got slower. Slice latency by output token count, model and prompt version before you blame the provider. See [LLM monitoring](/learn/llm-monitoring) for the other signals to watch next to it.

## Computing p99 without fooling yourself

- **Do not average percentiles.** The Prometheus docs [state](https://prometheus.io/docs/practices/histograms/) that averaging quantiles yields statistically nonsensical values. Summaries are not aggregatable; histogram buckets are, with the quantile computed afterward.
- **Know the bucket error.** For classic histograms, [error is limited](https://prometheus.io/docs/practices/histograms/) by the width of the bucket the quantile falls in. Wide buckets around your target blur the answer.
- **Watch the sample size.** A p99 needs enough requests in the window. With 100 requests, the p99 rests on about one request; use a longer window, or alert on p95 when traffic is low.
- **Keep percentiles per segment.** One overall p99 mixes short chat replies with long reports. Group by model, route and prompt version.

## Lowering p99 for an LLM app

OpenAI's [latency guide](https://developers.openai.com/api/docs/guides/latency-optimization) lists seven principles: process tokens faster, generate fewer tokens, use fewer input tokens, make fewer requests, parallelize, make your users wait less and don't default to an LLM. Anthropic's [guide](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-latency) adds that a `max_tokens` limit caps output length, which bounds the slowest generations, and that streaming can significantly improve perceived responsiveness, since users see output in real time. See [LLM inference](/learn/llm-inference) for what happens on the serving side.

## Tracking p99 in HoneyHive

HoneyHive's [custom charts](https://docs.honeyhive.ai/v2/monitoring/charts.md) offer a 99th percentile aggregation on the duration metric, which the docs call system latency, and can group by properties such as model or prompt version. [Alerts](https://docs.honeyhive.ai/v2/monitoring/alerts/alerts.md) support P90, P95 and P99 aggregations on `duration`, as absolute thresholds or as drift alerts that detect relative change against a previous period.

## FAQ

### What does p99 latency mean?

It is the value that 99% of requests finish within, so 1 request in 100 is slower. If p99 is 8 seconds, one user in a hundred waits longer than 8 seconds.

### Why not just track the average?

An average can look fine while a slice of users waits far longer. Google's SRE book [gives](https://sre.google/sre-book/monitoring-distributed-systems/) the example of an average of 100 ms at 1,000 requests per second where 1% of requests might easily take 5 seconds.

### Can I average p99 values across servers or time windows?

No. The Prometheus docs [say](https://prometheus.io/docs/practices/histograms/) averaging quantiles yields statistically nonsensical values. Aggregate histogram buckets or raw durations, then compute the percentile.

### Which LLM latency should I measure at p99?

Both time to first token and total request time, since a fast first token can be followed by a slow stream. [NVIDIA](https://docs.nvidia.com/nim/benchmarking/llm/latest/metrics.html) defines end-to-end latency as TTFT plus generation time.

### How do I lower p99 latency for an LLM app?

Cut output tokens, shorten prompts, pick a faster model for simple steps, stream, and make fewer or parallel calls. OpenAI's [latency guide](https://developers.openai.com/api/docs/guides/latency-optimization) lists these as principles.
