Glossary/ Performance Metric

Throughput vs Latency

A key tradeoff in LLM serving: throughput measures total requests processed per time, while latency measures response time per individual request.

Throughput and latency are opposing forces in LLM inference. Throughput (e.g., requests per second or tokens per second) gauges system capacity-how much work is done in a given time. Latency (e.g., time-to-first-token, TTFT, and inter-token latency) reflects user experience from a single request. Increasing batch size improves throughput by utilizing GPU arithmetic units fully, but it also raises latency because each request waits longer for the batch to fill and for matrix computations to complete. For real-time applications (chatbots, copilots), latency targets are tight: TTFT under 500ms, per-token generation under 30ms. Offline batch processing (data labeling, summarization) prioritizes throughput over latency. Techniques to navigate this: dynamic batching (combine requests arriving close in time), continuous batching (vLLM), and kernel optimizations like FlashAttention reduce latency without sacrificing throughput. Quantization lowers memory bandwidth use, helping both metrics. Speculative decoding trades throughput for perceived latency by generating draft tokens faster. AI builders must define Service Level Objectives (SLOs) like p50 TTFT and p99 total latency, then tune batch size, hardware count, and model size to meet them. Use tools like NVIDIA's FasterTransformer or TensorRT-LLM for profiling. A common pitfall: optimizing for throughput alone degrades user experience, while chasing zero latency at single-batch wastes compute resources.

Common misconception

It's not possible to have both high throughput and low latency simultaneously-engineering tradeoffs always apply.

Canonical reference
https://arxiv.org/abs/2309.04835

Related terms

Concepts you'll usually encounter alongside this one.

Mentioned in tutorials

Hands-on guides that put this concept to work.

VRAM Calculator

See how this term affects your memory budget.

MyAI Bench

Real numbers, real chips, every workload.

Buying guides

Picks for builders, by use case.

Stay Ahead of the AI Curve

Get weekly AI hardware news, benchmark updates, and deals in your inbox. Founding-subscriber list, be one of the first.

✓ No spam✓ Weekly digest✓ Unsubscribe anytime