Performance measurement · Research feature

Study identifies attention kernel saturation as key limit in LLM serving batch sizing

Researchers find that LLM serving throughput plateaus due to attention kernel behavior, not memory bandwidth, during decode phase.

Adapted from research by Pol G. Recasens, Ferran Agullo, Yue Zhu and colleagues.

arXiv preprint revision · 2026-07-31 · Attribution & reuse
In this article
Editorial illustration of aperture mechanism.

Editor’s introduction

The study focuses on large language model serving and identifies that throughput saturation occurs in the attention kernels during the decode phase, not due to DRAM bandwidth limits as previously assumed. Instead, the near-constant arithmetic intensity as active-context length increases drives DRAM bandwidth saturation, even when batch size grows. Findings are validated using measured vLLM serving traces, with accuracy assessed via mean absolute percentage error. However, the model overestimates the performance gap between Qwen-32B and Qwen-72B models when served on multiple H100 GPUs, likely due to similar per-GPU parameter footprints under tensor parallelism.

Introduction

Large language models (LLMs) have become commoditized and are now widely used across personal and professional settings, supporting applications ranging from chatbots and voice interfaces to writing assistants and code-generation tools. Despite their widespread adoption, the computational requirements of state-of-the-art LLMs remain beyond the capabilities of most end users, making cloud-based inference the dominant deployment model. Consequently, service providers must efficiently accommodate large numbers of concurrent requests exhibiting diverse characteristics, including varying context lengths, arrival rates, and latency requirements. At the same time, these providers are transitioning to heterogeneous hardware architectures with task-specific accelerators, while serving models of varying complexity across user tiers, further increasing system heterogeneity.

A key challenge in online LLM serving is understanding how this heterogeneity translates into accelerator-level performance. Among the factors affecting serving efficiency, the incoming request rate is particularly important because it determines the degree of batching that can be exploited during inference. Increasing batch size generally improves throughput by exposing greater request-level parallelism, albeit at the cost of higher request latency. However, throughput eventually reaches a saturation point beyond which additional parallelism provides only marginal performance gains, while latency continues to increase. At the same time, GPU memory consumption grows because additional requests require larger aggregate KV caches. Although this phenomenon, commonly referred to as the throughput plateau, has been widely observed in LLM serving systems, its underlying causes remain insufficiently explored.

Several studies attribute this throughput saturation under large-batch workloads to the increasing cost of KV cache memory transfers, which are identified as the primary performance bottleneck. However, these conclusions are generally based on conceptual reasoning or on high-level performance observations, and lack detailed kernel-level analysis of the underlying execution behavior. In this work, we perform an in-depth characterization of LLM inference throughput using GPU kernel profiling and hardware-level analysis, demonstrating with low-level performance metrics that the throughput plateau is fundamentally caused by DRAM-bandwidth saturation in the attention kernels, resulting from excessive memory traffic during the decode phase. Furthermore, we show that this limitation is governed not only by batch size but also by the active context, defined as the total number of tokens involved at each processing step. Our analysis shows that matrix multiplication kernels increasingly benefit from larger active contexts, achieving higher hardware utilization as workload size grows. In contrast, attention kernels exhibit nearly constant arithmetic intensity, causing their bandwidth demands to increase proportionally with active context. Consequently, the memory-bandwidth demand of attention operations eventually saturates the available DRAM bandwidth, creating a critical knee point beyond which throughput can no longer scale.

Memory Bottlenecks and Batching

Although the KV cache significantly reduces the computational cost of autoregressive generation, it introduces a memory-access bottleneck during the decode phase. For each newly generated token, the key and value tensors associated with all previously processed tokens must be retrieved from GPU main memory (HBM/DRAM) and transferred to the on-chip memory hierarchy used by GPU execution kernels. Consequently, decoding exhibits low arithmetic intensity, defined as the ratio of floating-point operations (FLOPs) to bytes transferred from memory. Workloads with low arithmetic intensity are memory-bound, meaning that performance is constrained primarily by memory bandwidth rather than computational throughput.

To alleviate the memory-bound nature of decoding, modern serving systems process multiple requests concurrently through batching, increasing the amount of computation performed per decoding step. However, traditional static batching is inefficient for LLM workloads, as requests can generate outputs of different lengths, causing some batch slots to remain idle while others continue decoding. To address this limitation, state-of-the-art serving systems employ continuous batching, which dynamically admits new requests and removes completed ones between decoding iterations, maintaining high batch occupancy.

The maximum batch size is ultimately constrained by GPU memory capacity. Since each active request maintains a growing KV cache, memory consumption increases with both sequence length and concurrency. To improve memory efficiency, modern serving frameworks such as vLLM and S-LoRA allocate KV-cache memory incrementally instead of reserving space for the maximum output length upfront, enabling higher request concurrency and better resource utilization.

LLM Inference Performance Analysis

The performance of autoregressive LLM inference at low batch sizes is widely acknowledged to be constrained by memory bandwidth rather than computational throughput. While the prefilling phase is executed only once per inference request, the decoding phase, characterized by low arithmetic intensity, is repeatedly invoked for each generated token, making memory accesses the dominant factor affecting inference performance. This bottleneck is evidenced by the substantial body of work dedicated to increasing the arithmetic intensity of decoding. Representative approaches include chunked prefilling and speculative decoding, which improve hardware utilization by increasing the amount of computation performed per memory access. Other techniques, such as multi-query and grouped-query attention, as well as quantization methods, seek to reduce KV cache memory traffic, thereby alleviating memory bandwidth constraints during inference.

Nevertheless, limited attention has been devoted to understanding the performance limits of LLM inference at large batch sizes and active context lengths. In particular, the fundamental causes of the throughput plateau regime discussed previously remain insufficiently characterized. Several studies suggest that KV-cache memory transfers become the primary bottleneck at large batch sizes. However, these explanations remain conceptual without a detailed low-level characterization. Consequently, the interplay between arithmetic intensity, memory traffic, and throughput saturation remains poorly understood and has not been systematically characterized at the kernel level. In this work, we take a step toward addressing this gap by providing a low-level analysis of modern LLM inference workloads under large batch sizes and active context lengths. Leveraging kernel-level measurements and roofline-based visualizations, we systematically analyze the factors governing throughput saturation and reveal the underlying causes of the observed plateau regime.

Performance Modeling

Recent studies have proposed performance models and simulators for LLM serving, although they target different optimization objectives. Vidur is a large-scale simulation framework that models LLM inference operators using a combination of experimental profiling and predictive modeling, enabling end-to-end estimation of serving metrics across different workloads and deployment configurations. GenZ models the compute, memory, and communication requirements of LLM inference across model, workload, and platform configurations, while LLMCompass combines operator-level performance modeling with mapping exploration to evaluate accelerator designs. Similarly, AMALI analytically models LLM inference on modern GPUs by accounting for architectural execution characteristics.

Imai et al. introduce a latency prediction model that combines roofline-based analytical estimates with regression models trained on serving information, but focus on small batch sizes and input lengths, without evaluating the model in the throughput saturation regime. Similarly, LLMVisor introduces a roofline-guided latency attribution model for multi-tenant LLM serving, decomposing batch latency into per-request costs based on computation and memory-access features. These approaches are useful for simulating, estimating, or attributing serving performance, but they do not explicitly model the onset of the throughput plateau caused by decode-time attention bandwidth saturation or translate it into an active-context capacity recommendation. Sheng et al. propose Virtual Token Counter (VTC), a fair scheduling policy that approximates service through token-based costs. However, token-count abstractions do not capture hardware bandwidth limits or the dependence of attention traffic on batch size and context length. Unlike these, SLIM extrapolates to unseen model scales and context lengths from a fixed calibration, without refitting. This enables SLIM to capture the hardware conditions under which batching stops providing proportional throughput gains, enabling knee-point estimation without exhaustively profiling the complete throughput curve.

Conference Extension

A preliminary version of this work was presented at the IEEE International Conference on Cloud Computing. This journal article substantially extends that prior work in two key directions. First, it generalizes the low-level analysis of throughput saturation from the batch-size dimension to large active-context scenarios, providing a more comprehensive characterization of the memory and computational bottlenecks that arise in modern LLM-serving workloads. Additionally, all evaluations have been repeated using a newer version of vLLM and a more recent set of LLMs. Second, it introduces SLIM, a performance model capable of predicting serving throughput and latency while requiring significantly fewer profiling measurements and generalizing effectively to previously unseen operating conditions. By enabling efficient exploration of the configuration space without exhaustive benchmarking, SLIM substantially reduces the profiling overhead associated with system tuning and serves as the foundation of the proposed BCA advisor.

Methodology

We conduct our experiments using the vLLM framework, version 0.15.1. We use vLLM in two modes. In online mode, we follow a client-server architecture and send HTTP requests to a local server instance. In offline mode, used for the low-level GPU profiling in Section V with Nsight Systems and Nsight Compute, we instantiate vLLM directly in Python, injects synthetic requests into the scheduler and then runs the prefill and decode phases with explicit llm_engine.step calls. We retain the vLLM default setting but disable vLLM log statistics and prefix caching for controlled profiling runs.

Workload. For the performance analysis, we generate synthetic prompts and independently vary the batch size, input length, and output length to isolate the impact of each factor on system performance. For the remaining evaluations, scenarios requiring fixed input and output lengths are generated using the random dataset generator provided by vLLM. In contrast, evaluations targeting realistic serving conditions use requests sampled from the cleaned ShareGPT dataset, thereby preserving the heterogeneous input and output length distributions observed in real-world workloads.

Models. For the performance analysis, we evaluate two representative LLMs: Mistral-7B and Granite-8B. For all remaining experiments, we employ models from the OPT family, including OPT-125M, OPT-350M, OPT-1.3B, OPT-2.7B, and OPT-6.7B. In addition, for large-scale multi-GPU settings, we employ models from the Qwen family, specifically Qwen-32B and Qwen-72B.

Performance Analysis

In this section, we present a low-level analysis of the throughput plateau observed under large active-context workloads. Unlike prior studies, our work is the first to provide a comprehensive explanation of this performance bottleneck using detailed GPU tracing data. We first examine how the different workload dimensions that determine the active context contribute to throughput saturation. We then investigate its underlying causes through a hierarchical analysis, beginning with the execution-time contributions of the prefill and decode phases and concluding with a kernel-level characterization of attention execution.

Our findings reveal that DRAM-bandwidth saturation in attention kernels is the primary cause of the throughput plateau in large active-context scenarios. We observe that their arithmetic intensity remains nearly constant across increasing input lengths, output lengths, and batch sizes. This ultimately leads to memory-bandwidth saturation, leaving a significant portion of computational resources underutilized.

Performance Modeling

In this section, we present SLIM, a semi-analytical model for predicting LLM inference throughput and latency. SLIM builds on analytical formulations of the computation and memory traffic incurred by Transformer operations during the prefill and decode phases. These formulations are simplified to improve interpretability while preserving predictive accuracy, and are complemented with a small set of constants calibrated from empirical profiling data.

A key advantage of SLIM is that it achieves accurate predictions from a small set of profiling measurements while generalizing to unseen execution conditions. This capability stems from explicitly modeling the key factors governing inference performance, including model architecture, sequence length, and batch size, rather than relying solely on data-driven fitting. SLIM serves as the foundation of the proposed BCA advisor, enabling configuration decisions across diverse LLM serving scenarios with limited profiling overhead. Beyond BCA, SLIM can also be applied to a broader range of optimization tasks, including autoscaling, system configuration exploration, and deployment optimization.

Evaluation Methodology

We evaluate SLIM using measured vLLM serving traces in two settings: accuracy on held-out batch sizes from the fitted serving curves, and generalization to unseen model sizes, input lengths, and output lengths without refitting. We estimate the parameters of the semi-analytical model on the training set by minimizing the sum of squared relative errors between measured and predicted throughput using nonlinear least squares. Each observation corresponds to a serving configuration defined by its model, input length, output length, and batch size. We evaluate prediction accuracy by reporting the mean absolute percentage error (MAPE) between the profiled and estimated total-token throughput and E2E latency.

Profiling-cost Savings

Reducing the number of profiled configurations also reduces total profiling time. Because we evaluate SLIM-BCA under generalization to larger models and longer output lengths, the held-out configurations are often the most expensive to profile. For instance, by profiling 25.0% fewer configurations we reduce profiling time by 59.9%, because the held-out configuration (OL = 512) is also the most expensive, as longer generations require proportionally more decode steps. This indicates that SLIM’s benefit extends beyond the reduction in the number of profiling runs, as it specifically avoids the most expensive ones, which are concentrated in larger models and longer generations.

Discussion

In this work, we identify the GPU bottlenecks underlying throughput saturation in LLM inference with large active contexts. Decode-time attention maintains nearly constant arithmetic intensity as batch size or context length increases, causing KV-cache traffic to approach the DRAM-bandwidth limit while compute resources remain underutilized. This is consistent with the widening gap between accelerator compute and memory bandwidth, where peak compute has historically scaled much faster than DRAM and interconnect bandwidth. We therefore expect attention-bandwidth bottlenecks to persist across future accelerators unless mitigated by substantially higher DRAM/HBM bandwidth or reduced KV-cache traffic. The low cache hit rates and increasing long-scoreboard stalls further indicate that the bottleneck arises from streaming KV-cache data with limited temporal reuse, rather than from an isolated cache-management inefficiency. Our kernel-level profiling is limited to Mistral-7B and Granite-8B on a single H100 GPU, so validation across accelerators and KV-cache formats remains future work. Nevertheless, the same mechanism is expected to occur across conventional decoder-only attention architectures, as the attention kernel’s computation-to-memory ratio is largely determined by the model’s attention structure itself.

Finally, we integrate SLIM with our proposed Batching Configuration Advisor (BCA) to select efficient batch-size and KV-cache configurations under latency constraints. Although BCA currently operates as an offline configuration advisor rather than an online scheduler and requires estimates of incoming request lengths, using average workload characteristics—readily obtainable in production environments—proves effective, reducing GPU memory usage by up to 55 GB for the evaluated OPT models with only minor throughput degradation. This makes it suitable for capacity planning, complementing reactive schedulers and autoscalers that can track its recommended operating point. In practice, BCA recommendations should include conservative throughput and latency margins, or be combined with lightweight runtime monitoring that adjusts the selected configuration when observed latency deviates from predictions. The reported memory reductions should similarly be interpreted as potential KV-cache reservation savings rather than automatically reclaimed capacity. Finally, because SLIM is calibrated per accelerator, applying BCA across heterogeneous GPUs requires re-calibration rather than direct reuse. Integrating these offline recommendations with adaptive runtime control is a natural next step toward multi-model orchestration under changing workloads and service-level objectives.

Conclusion

In this work, we conduct an in-depth GPU analysis to identify the performance bottlenecks responsible for throughput saturation in large active-context LLM inference. Our findings show that decode-time attention remains memory-bound, with KV-cache traffic driving DRAM-bandwidth saturation while substantial compute capacity remains underutilized. Building on this characterization, we introduce SLIM, a lightweight semi-analytical model that predicts throughput and latency across different model scales, batch sizes, and sequence lengths using only sparse profiling. We further instantiate SLIM through BCA, which selects efficient batch and KV-cache configurations under latency constraints, reducing unnecessary memory allocation while preserving near-maximum throughput among SLO-feasible configurations. Overall, our results provide a hardware-grounded explanation of throughput saturation and a practical methodology for configuring LLM-serving deployments to improve GPU resource efficiency.