Inferensys

Glossary

Throughput

Throughput is the rate at which an inference system processes requests, commonly measured in queries per second (QPS), inferences per second (IPS), or tokens per second (TPS).
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
INFERENCE PERFORMANCE METRIC

What is Throughput?

Throughput is the primary metric for measuring the processing capacity of an inference system.

Throughput is the rate at which an inference system processes requests, measured in units like queries per second (QPS), inferences per second (IPS), or tokens per second (TPS). It quantifies the total work a system can accomplish over time, representing its maximum processing capacity. In performance benchmarking, throughput is analyzed alongside latency to understand the system's efficiency and scalability under load, often visualized on a throughput-latency curve.

Optimizing throughput involves techniques like continuous batching to maximize GPU utilization and reduce idle time. The goal is to reach a high saturation point—where throughput is maximized—before latency degrades excessively. For cost-sensitive deployments, high throughput directly translates to lower inference cost per request, making it a critical metric for CTOs and engineering managers focused on infrastructure efficiency and scaling.

INFERENCE PERFORMANCE

Key Throughput Metrics

Throughput quantifies the processing capacity of an inference system. These core metrics define the rate of work completed, each offering a distinct perspective for capacity planning and optimization.

01

Queries Per Second (QPS)

Queries Per Second (QPS) measures the number of complete inference requests a system can process in one second. It is a holistic, end-to-end metric for request-level throughput.

  • Use Case: Best for measuring overall system capacity for request/response APIs, where each query (e.g., a classification task, a short text completion) is a discrete unit of work.
  • Limitation: QPS does not account for variable request complexity or output size. A system with high QPS for simple requests may struggle with longer, more complex prompts.
02

Tokens Per Second (TPS)

Tokens Per Second (TPS) measures the total number of output tokens generated across all active requests in one second. It is the fundamental throughput metric for autoregressive text generation models.

  • Calculation: TPS = (Total Output Tokens Generated) / (Measurement Window).
  • Key Insight: TPS directly correlates with GPU compute utilization during the generation phase. Optimizations like continuous batching aim to maximize this metric.
  • Context: For a fixed model, TPS is influenced by batch size, sequence length, and the efficiency of the KV cache.
03

Inferences Per Second (IPS)

Inferences Per Second (IPS) is a general throughput metric representing the number of model forward passes completed per second. It applies broadly across model types, not just language models.

  • Use Case: Common for non-autoregressive tasks like computer vision (image classification, object detection) or embedding generation, where each input yields one output.
  • Relationship to QPS: For single-pass models, IPS and QPS are often equivalent. For generative models, one "query" may require many sequential "inferences" (steps) to produce the full output.
04

Throughput-Latency Trade-off

Throughput and latency have a non-linear relationship defined by the throughput-latency curve. Increasing load (to raise throughput) eventually causes queueing delays, increasing latency.

  • Underloaded System: Latency is stable and low; throughput increases linearly with concurrent requests.
  • At the Knee: The system approaches its saturation point. Latency begins to increase noticeably.
  • Overloaded System: Throughput plateaus at its maximum while latency grows exponentially due to queueing.
  • Engineering Goal: Operate just before the knee of the curve to maximize throughput while adhering to latency SLOs.
05

Hardware Utilization

Hardware Utilization measures the percentage of available computational resources actively used during inference. High throughput requires high utilization, but the relationship is not always linear.

  • GPU Utilization: Percentage of streaming multiprocessors (SMs) actively executing kernels. Aim for >90% during steady-state inference.
  • Memory Bandwidth Utilization: Critical for memory-bound workloads. Low utilization here can indicate inefficient memory access patterns.
  • The Roofline Model: This analytical tool helps determine if a workload/kernel is compute-bound (limited by FLOPs) or memory-bound (limited by data movement). True maximum throughput is achieved when the system operates at the "roofline."
06

Saturation Point & Scaling

The Saturation Point is the maximum sustainable throughput a single instance can deliver. Beyond this point, tail latency spikes and request failures may occur.

  • Identification: Found via load testing and stress testing, observing where the throughput-latency curve flattens.
  • Horizontal Scaling: To increase total system throughput beyond a single node's saturation, instances are added behind a load balancer. Total throughput scales near-linearly if the workload is stateless and there is no resource contention for shared services.
  • Vertical Scaling: Increasing the resources (e.g., a larger GPU) of a single instance can raise its individual saturation point, often a simpler initial optimization.
INFERENCE PERFORMANCE

The Throughput-Latency Trade-off

A fundamental engineering constraint in machine learning inference systems where optimizing for one metric inherently impacts the other.

The throughput-latency trade-off is the inverse relationship between a system's request processing rate (throughput) and its request response time (latency). Maximizing throughput, measured in queries per second (QPS) or tokens per second (TPS), typically requires batching multiple requests, which increases latency for individual queries due to queueing and sequential processing. Conversely, prioritizing low latency by processing requests immediately often reduces overall throughput due to underutilized hardware and increased overhead.

This trade-off is visualized on a throughput-latency curve, where latency remains low until load approaches the system's saturation point. Performance tuning involves selecting an operating point on this curve that meets Service Level Objectives (SLOs) for tail latency while maximizing resource efficiency. Techniques like continuous batching and dynamic scheduling are engineered to optimize this frontier, pushing the saturation point higher to deliver more throughput without proportionally increasing P99 latency.

INFERENCE PERFORMANCE

Core Throughput Optimization Techniques

Throughput, measured in queries per second (QPS) or tokens per second (TPS), is the fundamental rate of work an inference system can sustain. Optimizing it requires a multi-faceted approach targeting hardware utilization, request scheduling, and computational efficiency.

01

Continuous Batching

A dynamic scheduling technique that groups multiple inference requests (batches) together for parallel execution on the GPU. Unlike static batching, it continuously adds new requests to the batch as others finish, maximizing GPU utilization and overall system throughput. This is critical for handling variable-length requests, like chat completions, where users don't all respond at the same time.

  • Key Benefit: Eliminates idle GPU time by keeping computational units saturated.
  • Implementation: Managed by advanced inference servers like vLLM or NVIDIA Triton.
02

KV Cache Optimization

Transformer-based models (LLMs) store computed Key-Value (KV) pairs during the generation of previous tokens to avoid recomputation. Efficient management of this KV Cache is paramount for throughput.

  • Memory Bottleneck: The cache grows linearly with batch size and sequence length, becoming the primary memory constraint.
  • Techniques: PagedAttention (used in vLLM) treats the cache like virtual memory, allowing non-contiguous storage and drastically reducing memory fragmentation.
  • Impact: Enables much larger effective batch sizes, directly increasing tokens/second throughput.
03

Model Quantization

The process of reducing the numerical precision of a model's weights and activations (e.g., from 32-bit floating-point FP32 to 8-bit integers INT8). This directly boosts throughput by:

  • Reducing Memory Bandwidth Pressure: Lower precision weights require less data movement, alleviating a common memory-bound bottleneck.
  • Increasing Compute Speed: Many hardware accelerators (GPUs, NPUs) have specialized units for low-precision arithmetic that perform more operations per second.
  • Trade-off: Requires careful calibration to minimize accuracy loss, using techniques like GPTQ or AWQ for post-training quantization.
04

Speculative Decoding

A technique that uses a small, fast draft model to predict a sequence of several future tokens. These speculative tokens are then verified in parallel by the larger, accurate target model in a single forward pass.

  • Throughput Gain: Accepts multiple tokens per expensive target model run, increasing overall tokens per second (TPS).
  • Condition: Effective when the draft model has high prediction accuracy (acceptance rate).
  • Use Case: Ideal for increasing throughput in latency-sensitive, auto-regressive decoding scenarios.
05

Operator & Kernel Fusion

A low-level optimization that combines multiple sequential computational operations (e.g., matrix multiply followed by an activation function like GeLU) into a single, custom fused kernel.

  • Reduces Overhead: Eliminates intermediate memory writes and reads between operations, which are costly.
  • Improves Hardware Utilization: Creates larger, more efficient workloads for GPU streaming multiprocessors.
  • Implementation: Done via deep learning compilers like Apache TVM or MLIR, and is a core optimization in frameworks like PyTorch's torch.compile.
06

Mixture of Experts (MoE) Routing

For sparse Mixture of Experts models, throughput is optimized by efficient conditional computation. Only a subset of the model's total parameters (the 'experts') are activated per token.

  • Throughput Advantage: Enables extremely large model capacities (e.g., 1T+ parameters) without a proportional increase in compute cost per token.
  • Challenge: Requires sophisticated routing logic and communication to manage which experts are loaded into memory, making batch sizing and load balancing critical.
  • Systems Work: High throughput hinges on minimizing the overhead of the gating network and expert swapping.
SYSTEM CHARACTERISTICS

Throughput vs. Latency: A Practical Comparison

A comparison of how throughput and latency manifest in inference systems, their trade-offs, and their impact on different operational scenarios.

CharacteristicThroughput (High Volume)Latency (Low Response Time)Balanced System

Primary Metric

Queries/Tokens Per Second (QPS/TPS)

Milliseconds (ms) to Response

QPS at Target Latency SLO

System Goal

Maximize total work completed per unit time

Minimize time to complete a single request

Serve maximum requests within a latency bound

Load Behavior

Latency increases as system approaches saturation

Throughput must be limited to maintain low latency

Operates at the knee of the throughput-latency curve

User Experience Impact

Governs batch processing speed & cost-per-query

Governs interactive application responsiveness

Balances cost efficiency with user satisfaction

Typical Optimization Focus

GPU Utilization, Continuous Batching, Request Queueing

Model Optimization (Quantization, Pruning), Kernel Fusion, Cache Warming

Dynamic Batching, Intelligent Scheduling, Tail Latency Mitigation

Bottleneck Sensitivity

Often compute-bound (FLOPs limited)

Often memory-bound or I/O limited

Requires balanced compute, memory, and I/O resources

Resource Scaling Strategy

Horizontal scaling (add more instances) to increase capacity

Vertical scaling (more powerful hardware) to reduce time

Auto-scaling based on load and latency SLOs

Ideal Use Case

Offline batch processing, bulk embeddings, model training data prep

Real-time chatbots, interactive agents, voice interfaces

High-traffic APIs, search engines, recommendation systems

THROUGHPUT

Frequently Asked Questions

Throughput is a fundamental performance metric for inference systems, measuring the rate of request processing. These questions address its definition, measurement, and optimization in production environments.

Throughput is the rate at which an inference system processes requests, measured in units like Queries Per Second (QPS), Inferences Per Second (IPS), or Tokens Per Second (TPS). It quantifies the system's overall processing capacity and is a key metric for cost efficiency and scalability. Unlike latency, which measures the time for a single request, throughput measures aggregate system output over time. High throughput indicates a system can handle many requests concurrently, which is critical for serving large user bases cost-effectively. It is directly influenced by hardware capabilities, model architecture, and optimization techniques like continuous batching and KV cache management.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.