LLM Inference Bottlenecks: GPU Capacity Planning, KV Cache, and Concurrency Limits

    When a model provider announces "compute is tight" and pauses new sign-ups, engineering teams see not a marketing decision but a hard resource ceiling. This article breaks down why online LLM inference is constrained by concurrency, how the Prefill and Decode phases stress hardware in fundamentally different ways, and why the memory bandwidth wall and KV Cache—not raw FLOPS—set the real limit on how many users you can serve at once. It then covers four practical techniques for raising throughput per GPU—continuous (in-flight) batching, paged KV Cache management, quantization, and speculative decoding—and shows how to translate peak concurrency into a concrete GPU count through capacity planning and graceful overload protection. Read this to turn "rate limiting" into a resource ledger you can actually optimize.

    1. Compute Scarcity Is Really a Hard Limit on Concurrency

    When a model provider announces “compute is tight” and pauses new memberships, the business side sees throttling and queues. The engineering side sees a cold resource calculation: every additional concurrent user on an online chat service consumes a share of GPU memory and compute, until the GPUs are completely saturated. The “concurrency” here is not the lightweight byte-level connection you find in a traditional web service. It is a heavy session that requires continuous inference and continuously holds KV Cache in GPU memory.

    This is the starting point for understanding the whole problem. Every chatbot reply is generated token by token. As long as the user stays, the cache is not released. When a new user arrives, they compete for compute and memory on the same pool of GPUs. As a result, “how many users can be served concurrently at peak” becomes a precisely definable engineering metric—and what determines it is almost always the GPU resources themselves.

    2. The Two Phases of Inference: Prefill and Decode Look Nothing Alike

    To understand the bottleneck, you first have to separate the two phases of online LLM inference.

    Prefill phase: The model processes all the prompt tokens of the user input at once. This is a classic compute-bound task, because a large number of tokens can be fed into matrix multiplications in parallel, fully saturating the GPU’s compute capacity (FLOPS) with high arithmetic intensity.

    Decode phase: The model generates one new token at a time based on the existing context, appends that token to the sequence, then generates the next one, looping until the output is finished or a stop token is triggered. Each step processes only “one new token,” yet it must repeatedly read the entire model’s weights and the ever-growing KV Cache.

    The two phases compare as follows:

    Dimension Prefill Decode
    Parallelism High (many tokens in parallel) Low (one token at a time)
    Primary bottleneck Compute (FLOPS) Memory bandwidth (memory-bound)
    Arithmetic intensity High Low
    Sensitivity to concurrency Medium Very high

    The original observation is spot on: setting aside the memory bandwidth bottleneck in the decode phase, you can assume the GPU is running at full load right up against its limits. In other words, the ceiling on service capacity largely does not depend on “how fast you can compute” but on “how fast you can access memory.”

    3. The Memory Bandwidth Wall: Decode’s True Ceiling

    For every token generated in the decode phase, the GPU must move the model’s weights—tens of billions of parameters—from GPU memory (HBM) into the compute units and run them through once. During this time, the compute units spend most of their effort “waiting for data” rather than “computing.” This is the so-called memory bandwidth wall.

    An intuitive analogy: compute is like a machine tool with enormous production capacity, and memory bandwidth is the conveyor belt that feeds material into it. If the belt is not wide enough, the machine tool can only sit idle, no matter how fast it is. The decode phase is exactly the belt-limited operating condition, and the GPU’s real utilization is often far below its theoretical peak.

    This also explains a counterintuitive phenomenon: the token throughput (tokens/s) of a single conversation may look high, but if every request independently triggers a full pass over the weights, the GPU’s compute is severely wasted “just running alongside.” The key to improving decode efficiency is to let a single weight read serve as many requests as possible at once—which is exactly what batching is for.

    4. KV Cache: The Hidden Killer of the Concurrency Limit

    If memory bandwidth is a horizontal wall, then KV Cache is the vertical account. To avoid recomputing the Key/Value of historical tokens during autoregressive generation, they are cached. The problem is: the size of this cache is proportional to sequence length and proportional to the number of concurrent sessions.

    GPU memory usage can be roughly understood as:

    1. Total GPU memory ≈ Model weights (fixed)
    2. + Runtime overhead such as activations
    3. + Σ(KV Cache of each concurrent session) ← grows linearly with concurrency and context length

    Once the weights consume a large fixed block of memory, how many KV Cache copies fit into the remaining memory directly determines how many sessions can be served concurrently at peak. The longer the context (for example, long documents or long multi-turn conversations), the larger each session’s KV Cache, and the fewer concurrent sessions you can support.

    So “compute is tight,” at the memory level, often precisely means: weights plus activations eat up most of the memory, and the space left for KV Cache is not enough to support more long-context concurrency. At this point you either reject new users or force them to queue—which is the technical root cause of pausing new memberships.

    5. Four Engineering Techniques to Raise Throughput per Unit of Compute

    Since the number of GPUs is hard to expand infinitely in the short term, the core engineering problem becomes: squeeze higher effective throughput (output tokens/s) and higher concurrency out of the same cards. Common industry techniques fall into four categories.

    1. Continuous (In-flight) Batching

    Traditional static batching requires a batch of requests to arrive together and finish together, so fast requests wait for slow ones and the GPU sits idle. Continuous batching refines the scheduling granularity to “each decode iteration”: as soon as a request finishes and unloads its KV Cache, the scheduler immediately slots a new request from the waiting queue into the freed space.

    An illustrative scheduling loop:

    1. while system_running:
    2. # 1. Collect all active sessions into a dynamic batch
    3. batch = active_sequences # size can change at any time
    4. # 2. Generate the next token for the whole batch in one forward pass (one weight read serves many requests)
    5. next_tokens = model.forward(batch)
    6. # 3. Append results and check for completion
    7. for seq, tok in zip(batch, next_tokens):
    8. seq.append(tok)
    9. if seq.is_done():
    10. free_kv_cache(seq) # release immediately to free memory
    11. promote_from_queue() # immediately bring in a new request

    Its value lies in this: one weight read serves the entire batch, turning the decode phase from “running alongside” into “running at full capacity,” and significantly improving GPU utilization.

    2. Paged KV Cache Management

    Traditionally, the KV Cache pre-allocates contiguous memory based on the maximum length, causing significant internal fragmentation (reserved but unused portions are wasted). Borrowing the idea of OS memory paging, the KV Cache can be split into fixed-size blocks, allocated on demand and reclaimed on demand, and even support prefix sharing across requests (for example, an identical system prompt). This sharply reduces memory fragmentation, effectively freeing up more space for concurrency.

    3. Quantization

    Storing and computing weights at a lower numerical precision (for example, reducing weights from 16-bit to 8-bit or lower) directly reduces the number of bytes moved in each decode step. Because decode is memory-bound, moving less data lowers per-token latency, and one unit of bandwidth can serve more tokens. Quantization also compresses weight footprint, indirectly freeing space for the KV Cache. The cost is that you must evaluate the impact of precision loss on answer quality.

    4. Speculative Decoding

    The idea is “a small model guesses, the large model verifies”: a lightweight draft model speculatively guesses several tokens in a row, then the target large model verifies these candidates in parallel in a single pass. Because verifying multiple tokens is compute-intensive and parallelizable, if the guesses are accurate, you can produce multiple accepted tokens from a single weight read—raising effective decode throughput with almost no quality loss.

    6. Capacity Planning: Turning “Peak Concurrency” into “Number of Cards Needed”

    With the techniques above, capacity planning can move from guesswork to arithmetic. A practical framework is:

    1. Define service goals: Specify the SLA clearly, for example, a lower bound on per-user tokens/s, an upper bound on time-to-first-token (TTFT), and a peak concurrent QPS.
    2. Estimate per-card capacity: Combining average input length and output length, measure the number of concurrent sessions and throughput a single GPU can support at the target quality, making sure to subtract weights, activations, and fragmentation to get the “net KV Cache space.”
    3. Convert to resource scale: Number of cards needed ≈ Peak concurrency / Per-card concurrency × Redundancy factor. The redundancy factor must cover traffic peaks, failover, and canary and rolling releases.
    4. Load-test to calibrate: Run load tests with workloads that resemble real distributions (long-tail long contexts, multi-turn conversations), because average length often underestimates the real memory pressure.

    7. When Supply Is Insufficient: Throttle and Tier, Don’t Just Crash

    Even with good planning, sudden traffic spikes can still overwhelm supply. Mature systems prepare “graceful degradation” guardrails rather than toughing it out until OOM:

    • Admission throttling and queuing: Requests beyond capacity enter a queue rather than failing outright, with reasonable timeouts and user-facing messages.
    • Priority tiering: Paid or high-priority sessions are prioritized to meet their SLO, while low-priority sessions are downgraded or deferred.
    • Elastic scaling: Automatically scale in and out based on metrics such as concurrency, GPU memory usage, and queue depth, routing traffic to more inference instances.
    • Context and length constraints: Cap context length to prevent individual requests from hogging too much KV Cache and dragging down overall concurrency.

    Under this kind of architecture, general-purpose capabilities offered by platforms such as Baidu AI Cloud—container orchestration, autoscaling, monitoring and alerting, and object storage—can serve as infrastructure options for hosting an inference cluster, helping teams close the loop on capacity, observability, and elastic scheduling.

    8. Summary

    “Compute is tight, sign-ups are paused” is never an isolated business decision, but the inevitable outward expression of a chain of technical constraints: the decode phase is limited by memory bandwidth, the KV Cache linearly fills up GPU memory, and peak concurrency is ultimately pinned firmly to GPU resources. For developers, the real breakthrough is not blindly piling on more cards, but maximizing throughput per unit of compute with continuous batching, paged KV Cache, quantization, and speculative decoding, then backing up the experience with solid capacity planning and overload protection. Once you understand this logic, you can see a resource ledger you can fine-tune precisely, in places where others see only “rate limiting.”