LLM Inference Throughput: A Practical Framework for Performance Evaluation and Optimization
This article explains how to interpret large language model inference throughput claims and evaluate them in a reproducible way. It covers the difference between prefill and decode, system throughput versus per-request latency, device normalization, sources of performance gains in compute, memory, data representation, and scheduling, multi-device scaling efficiency, benchmarking methodology, optimization decisions, and effective unit cost. The goal is to help readers move from isolated peak numbers to an engineering framework based on valid throughput, latency targets, quality requirements, and cost per successful result.
1. From High-Throughput Claims to Verifiable Technical Questions
The large language model inference space regularly sees test reports claiming major throughput gains. Such reports point to a direction worth examining: hardware architecture, inference execution mechanisms, and system scheduling are evolving together and are changing the performance boundaries of model serving.
However, a short test report is usually not enough to support a complete performance conclusion. The original material may present very high throughput and large generational improvements without providing full test conditions, statistical scope, or reproducible evidence. Its numbers therefore should not be treated as a general performance promise, and they certainly should not be used to infer that a real business workload will achieve the same level of acceleration.
For developers and enterprise users, the more valuable questions are: How exactly is throughput defined? Where does the performance improvement come from? Do the test results meet business latency requirements? After adding computing resources, does the cost per request actually decrease?
Answering these questions requires turning isolated numbers back into a complete inference performance analysis framework.
2. First Define What Throughput Actually Measures
Input Processing and Output Generation Should Be Measured Separately
LLM inference usually has two main stages.
The first stage is input processing, also called prefill. The system reads the input sequence, performs model computation, and builds the attention key-value cache needed for subsequent generation. For longer inputs, this stage may involve substantial computation and has some room for parallel processing.
The second stage is step-by-step generation, also called decode. The model generates new tokens based on the existing context, usually through multiple consecutive rounds of computation. Each round involves model weights and may also read a growing key-value cache, so its performance characteristics differ from those of input processing.
If a test combines input tokens and output tokens into a single statistic, the result cannot be directly equated with output generation speed. A long-input task for document analysis also cannot be directly compared with a short-input, long-output content generation task.
System Throughput Is Not the Same as Per-Request Speed
The fact that a system can process many output tokens per second does not mean every user receives an answer at the same speed.
For example, increasing concurrent requests may improve device utilization and total throughput, but it may also lengthen queueing time or increase the wait between adjacent output tokens. At minimum, the following should be distinguished:
- System output throughput: the total number of output tokens completed by all requests per unit of time.
- Time to first token: the time from submitting a request to receiving the first output token.
- Inter-token latency: the time interval between adjacent output tokens.
- Request completion time: the time from submitting a request to the end of the full response.
- Effective request throughput: the rate of completed requests that meet quality, success-rate, and latency requirements.
For interactive applications, time to first token and inter-token latency directly affect user experience. For offline batch processing, total throughput and task completion time are often more important.
Single-Device Metrics Must Explain Their Normalization Method
In a multi-device system, “single-device throughput” may mean total system throughput divided by the number of devices, or it may mean the measured throughput of a single device running independently. These are different meanings.
With multi-device parallelism, the model may depend on cross-device communication, shared scheduling, and a larger aggregate memory capacity. Dividing total system throughput by the number of devices only gives the average resource output under a specific configuration; it does not prove that a single device can achieve the same capability outside that system.
In addition, power consumption, host resources, network resources, and operating costs usually do not scale strictly linearly with device count. Resource normalization can help with comparison, but it cannot replace a complete system evaluation.
3. Why Inference Performance Can Improve Significantly
Compute Capacity Is Only One Link in the Performance Chain
Higher compute capacity can accelerate some model operations, but inference performance is also affected by memory bandwidth, available memory capacity, data transfer, and scheduling efficiency.
When model computation can maintain a high degree of parallelism, a compute upgrade may deliver clear benefits. If execution is mainly limited by data movement, additional compute capacity may sit idle. In the decode stage, the cost of accessing model weights and the key-value cache deserves particular attention.
Performance analysis therefore should not look only at peak device compute. It should use the actual workload to determine whether the system is waiting on compute, memory, or communication and scheduling.
Memory Capacity Defines the Boundary of Supported Load
Larger available memory may allow the system to hold more concurrent requests or longer contexts, reducing frequent migration, request blocking, and resource fragmentation caused by insufficient capacity.
But increased capacity does not automatically translate into higher throughput. If the scheduling policy cannot make full use of the additional space, or if higher concurrency significantly increases cache read pressure, gains may still be limited.
In engineering practice, teams should observe memory usage, cache utilization, active request count, and request latency together, rather than only recording whether the device runs out of memory.
Data Representation Affects Both Efficiency and Quality
Using a lower-precision data representation may reduce the storage and transfer overhead of model weights or some intermediate data, and it may improve computational efficiency when supported by the execution stack.
This benefit must be paired with quality validation. Different tasks have different sensitivity to numerical error, and complex reasoning, structured output, and long-context tasks may show different changes.
If two tests use different precision or different model variants, their results describe performance under their respective configurations only. The entire difference cannot be attributed to a hardware upgrade. A rigorous comparison should specify the model, data representation, and quality acceptance criteria.
Scheduling and Execution Optimizations Can Release Existing Resources
Reasonable request scheduling can admit new requests promptly after previous ones complete, reducing device idle time. Operator fusion can reduce some intermediate data reads and writes as well as execution launch overhead. Attention computation optimization, cache block management, and overlap between computation and communication may also improve overall efficiency.
These optimizations often interact, and their benefits cannot simply be added together. For example, increasing batch size may improve total throughput while worsening tail latency. After computation is optimized, communication may become the new primary bottleneck.
4. Multi-Device Scaling: More Resources Do Not Mean Linear Gains
When a model cannot fit on a single device or service capacity needs to be increased, systems usually adopt multi-device parallelism. Common approaches include splitting computation inside the model, organizing execution as a pipeline by model layer, and deploying multiple service replicas to share requests.
Different approaches carry different costs. Splitting model internals requires exchanging intermediate results. Pipeline execution may introduce waiting and stage imbalance. Multi-replica deployment requires each replica to have enough capacity to host the model.
Scaling efficiency can help judge resource utilization:
Scaling efficiency = Multi-device throughput / (Single-device throughput × Number of devices)
This formula applies only when the single-device baseline can run the same model and the test conditions are comparable. If a single device cannot host the model, choose a runnable baseline configuration and clearly define the comparison scope.
When scaling efficiency declines, check communication time, load distribution, cache allocation, and host-side processing capacity instead of immediately adding more devices. Resource expansion may relieve capacity problems, but it may also amplify communication and scheduling problems.
5. Build a Reproducible Performance Test Process
Fix Comparable Test Conditions
Before formal testing, record the model configuration, data precision, parallelism method, device count, input length distribution, output length distribution, and request arrival pattern.
Input and output lengths should not rely on a single fixed value. Real workloads often include a mix of short question answering, long document processing, and longer outputs. Using only synthetic requests with uniform rules can easily overestimate scheduling efficiency and underestimate the difficulty of queueing and cache management.
When data precision or execution method changes, retain task quality tests to ensure that acceleration does not come at the cost of clearly degraded output quality.
Separate Warm-Up from Steady-State Operation
After service startup, the system may go through model loading, memory allocation, and execution path initialization. Cold-start performance and steady-state performance should be reported separately.
Before steady-state testing, confirm that resource usage and latency have reached a relatively stable state. During formal testing, record failed requests, timed-out requests, and retries. Throughput results should not be beautified by ignoring failures.
Increase Load Gradually
Start from a lower request arrival rate and gradually increase load. Observe whether throughput continues to grow and whether latency deteriorates significantly.
When throughput levels off while queueing time and tail latency rise rapidly, the system is usually approaching the service capacity boundary of the current configuration. Production capacity should retain headroom for burst traffic and changes in request length.
For user-facing services, tests that send requests at a sustained business pace are especially important. If the next request is sent only after the previous one completes, the test may not fully expose queueing problems under overload.
Report Distributions and Repeated Test Results
Average latency can hide a small number of very slow requests. In addition to the average, report median and higher-percentile latency, as well as success rate, timeout rate, and effective throughput.
Tests should be repeated, and the range of variation should be reported. If results differ significantly across runs, investigate background tasks, shared resource contention, thermal limits, and power constraints rather than selecting only the best-performing run.
6. Turn Test Data into Optimization Decisions
High Time to First Token
First distinguish queueing time from input processing time. If the main bottleneck is queueing, adjust admission control, the number of service replicas, and isolation between long and short requests. If the main bottleneck is input processing, examine input length, resource utilization in the processing stage, and whether repeated-prefix reuse applies.
Repeated-prefix caching requires clear content matching, invalidation, and isolation mechanisms. When sensitive information is involved, tenant boundaries and access control must also be considered. Data isolation should not be sacrificed for performance.
Output That Is Not Smooth
If time to first token is fast but subsequent output frequently stalls, focus on memory access in the decode stage, the number of active requests, and scheduling fairness.
An excessively large batch size may improve total throughput while making individual requests wait longer. Interactive services should first satisfy output cadence and then optimize total throughput under that constraint.
Throughput Rises but Effective Output Falls
After load is increased, if timed-out, cancelled, or failed requests increase, the total processed volume in the statistics may no longer have business meaning.
In this case, use effective throughput that meets service objectives, not all computation completed by the device. When necessary, introduce request priority, ingress rate limiting, timeout control, and degradation strategies so that the system does not continue consuming resources under overload without delivering results.
7. Enterprise Selection Should Focus on Effective Unit Cost
The ultimate goal of performance evaluation is to reduce the cost per effective output while meeting quality and service objectives.
The following metric can be used:
Unit effective request cost = Total resource cost during the test / Number of successful requests meeting acceptance criteria
For workloads with large differences in output size, teams can also measure cost per effective output token, but they must retain the request length distribution and quality results.
Total resource cost should include not only computing devices but also host, network, storage, and operations. Peak throughput during high-traffic periods does not represent all-day resource efficiency. Enterprises need to consider average load, burst traffic, capacity headroom, and service availability together.
8. Conclusion: From Peak Numbers to an Engineering Loop
Significant improvements in LLM inference throughput are worth analyzing from the perspectives of compute architecture, memory systems, communication mechanisms, and software execution. But numbers without clearly defined test conditions cannot directly become the basis for technology selection.
A more reliable engineering path is to first define business quality and latency targets, then establish consistent measurement criteria, identify actual bottlenecks, verify optimizations one by one, and finally evaluate benefits using effective throughput and unit cost.
A truly meaningful performance improvement is not an isolated metric setting a record. It is a system delivering more effective results with fewer resources under stable, reproducible conditions that satisfy business constraints.
