← Measures

Throughput (Tokens per Second)

How much work a system can actually push through, not how fast any single request feels. The number that decides your serving costs.

At a glance

Full name Throughput, commonly measured in tokens per second or requests per second
What it measures The total volume of work a system processes per unit of time, across all concurrent requests
Formula Total tokens (or requests) completed ÷ time elapsed, usually measured per GPU or per server to allow capacity planning
Typical range Highly dependent on model size, hardware and batching strategy; reported in tokens/second or requests/second
Used for Capacity planning, cost estimation and comparing serving infrastructure for generative AI
Best used for Deciding how much hardware is needed to serve an expected volume of users
Pair with Latency percentiles, since the two usually trade off against each other through batching

Latency describes how long one request takes. Throughput describes how much total work the whole system gets done. A system can have excellent latency for a single user and terrible throughput under real load, or the reverse, and most of the hard engineering decisions in deploying AI at scale live in the tension between the two.

What it is and how it’s computed

For a language model server, throughput is usually measured in tokens generated per second, aggregated across all the requests being served concurrently, often reported per GPU so it can be used directly for capacity planning: if one GPU serves 1,000 tokens per second and expected peak demand is 50,000 tokens per second, that implies roughly 50 GPUs are needed, before accounting for headroom and failover. For simpler systems, requests per second is the more natural unit. The key engineering lever behind throughput is batching: processing multiple requests together lets hardware (especially GPUs) do far more total work per second, because the expensive part of running a model, loading its weights, gets amortised across many requests at once rather than paid freshly for each one.

A worked example

A team serving a large language model finds that handling one request at a time, with no batching, a single GPU produces about 40 tokens per second, limited mostly by the time spent moving model weights rather than by actual computation. By batching 16 concurrent requests together, the same GPU produces an aggregate 640 tokens per second across all of them, a sixteen-fold throughput improvement, but the latency experienced by any single request in that batch rises somewhat, since it may have to wait briefly for a batch to fill. This exact trade-off, more aggregate throughput at the cost of somewhat higher per-request latency, is the central tuning decision in nearly every production language model serving stack.

Where it matters

Throughput is the number that drives infrastructure cost directly: higher throughput per GPU means fewer GPUs needed to serve the same user base, which is often the single largest cost line item for a generative AI product. It is the headline metric in serving-system research and engineering, and the paper that introduced PagedAttention, Kwon and colleagues’ 2023 work on the vLLM serving system, specifically targeted throughput improvements through smarter memory management for the key-value cache that language model generation relies on, a technique now widely adopted across the industry precisely because of the throughput gains it unlocked.

Strengths

Throughput translates directly and transparently into infrastructure cost, which makes it one of the most actionable numbers for planning how much hardware a given level of demand will require. It is straightforward to measure under controlled load testing, and improvements to it, through batching, caching, quantisation, or better memory management, show up immediately and unambiguously in the number.

Limitations, and the things that go wrong

Chasing throughput alone, without a latency constraint, can degrade the user experience badly, since more aggressive batching generally means longer waits for an individual request, especially its first token. Some serving teams have adopted the related idea of “goodput,” throughput measured only across requests that also meet a latency target, specifically because raw throughput can be optimised in ways that make the system technically faster in aggregate while making it worse for any individual user. Throughput numbers are also highly specific to the hardware, batch size and request-length distribution they were measured under, so a throughput figure quoted without that context, a different GPU, a different average prompt length, cannot be compared fairly against another system’s number.

When I would use it, and what to pair it with

I use throughput for capacity planning and cost estimation, always measured under a realistic request-length and concurrency profile rather than an artificially clean benchmark. I never optimise it in isolation: I set a latency target first (for instance, p95 time-to-first-token under some threshold) and then maximise throughput subject to that constraint, which is closer to what “goodput” actually measures and far closer to what users experience than raw throughput alone.