GPU Capacity Planning for LLM Inference Services: Why Compute Becomes the Bottleneck

    This article examines a real-world case where a large language model (LLM) chat service hit its GPU capacity ceiling after a model update triggered a surge in user traffic, leading the provider to pause new subscriber sign-ups. It breaks down the technical reasons why GPU resources—specifically VRAM and memory bandwidth—determine the concurrency limits of inference services. The discussion covers the prefill and decode phases, the role of KV Cache in memory consumption, a capacity estimation formula with a worked example, and practical engineering strategies such as PagedAttention, quantization, prefix caching, and speculative decoding. It also explains why capacity planning must account for peak traffic rather than averages, and why chat-oriented services can serve massive user bases by trading recomputation for VRAM savings.

    A “Fortunate Problem”: When Demand Outpaces GPU Supply

    After a chat service deployed a new model version, user traffic surged far beyond expectations. The provider eventually announced that compute resources were strained, suspending new membership subscriptions while continuing to serve existing users. The incident sparked broad discussion in the developer community and highlighted an often-overlooked engineering reality: the capacity ceiling of an LLM inference service is fundamentally determined by GPU compute resources.

    For developers, this case offers valuable insight—it brings “inference service capacity planning,” a topic usually hidden behind the scenes, into the spotlight. This article examines the resource bottlenecks, capacity estimation methods, and engineering optimization strategies for LLM inference services.

    Why Is GPU the Bottleneck for Chatbot Services?

    The Two Phases of Inference: Prefill and Decode

    LLM inference proceeds in two phases:

    • Prefill phase: Processes the user’s entire input prompt in one pass. This phase is compute-intensive, fully utilizing the GPU’s compute units.
    • Decode phase: Generates output tokens one by one. Each step requires reading all model weights and the accumulated KV Cache, shifting the bottleneck from compute to VRAM bandwidth.

    During decode, even if the GPU’s compute units have spare capacity, token generation speed cannot increase further due to VRAM bandwidth limits. This is what the industry refers to as “the decode phase being bandwidth-bound, not compute-bound.”

    KV Cache: The Dominant Consumer of VRAM

    In the Transformer architecture, autoregressive generation requires the attention mechanism to access the Key/Value tensors of all previous tokens at each step. These tensors are cached in VRAM as the KV Cache. A rough estimate of its footprint:

    1. KV Cache VRAM ≈ 2 × layers × attention heads × head dimension × sequence length × bytes per precision × sequences in batch

    For a medium-sized model with long context windows, a single conversation’s KV Cache can consume several gigabytes of VRAM. This means VRAM determines how many concurrent active conversations a single GPU can host.

    The Special Nature of Chat Scenarios: KV Cache Can Be Discarded

    Unlike high-frequency interaction scenarios such as code completion, chat sessions exhibit two characteristics:

    1. Many conversations are one-off—users ask a question and never return.
    2. Even in long-running dialogues, users rarely iterate on the same session multiple times within a day.

    This enables an aggressive strategy on the server side: release the KV Cache immediately after processing a request, freeing VRAM for the next request. When a user returns to continue a conversation, the server either reloads from persistent storage or recomputes the entire prefill with the full history. While recomputing prefill incurs extra compute cost, it yields far higher concurrency capacity than a “persistent cache” approach.

    This “trade compute for VRAM” strategy is precisely why chat services can support massive user bases with finite GPU resources.

    The Mathematical Relationship for Capacity Limits

    The Core Formula

    Under the strategy described above, the peak concurrent user count can be approximated as:

    1. Peak concurrency ≈ GPU count × concurrent sessions per GPU
    2. Sessions per GPU ≈ (total VRAM - model weights) / peak KV Cache per session

    Combined with decode throughput (tokens generated per second per GPU), one can derive the upper bound on request rate the service can sustain.

    An Illustrative Estimate

    Suppose a service has:

    • 80GB VRAM per GPU, 30GB occupied by model weights, leaving 50GB available;
    • Average peak KV Cache of 2.5GB per conversation → roughly 20 concurrent sessions per GPU;
    • Effective decode throughput of about 2000 tokens/s per GPU, with an average of 800 tokens generated per request → approximately 9000 requests per hour per GPU.

    A cluster of 100 GPUs would then have a theoretical ceiling of about 900,000 requests per hour. If a new model doubles traffic and GPU expansion cannot keep pace, queueing latency spikes—users see long “thinking” periods or request timeouts. This is the technical reality behind the “compute shortage” announcement.

    Peak vs. Average: Why Averages Are Misleading

    Traffic exhibits pronounced tidal patterns—evening peaks can exceed early-morning lows by more than tenfold. Capacity planning must reserve resources for peak demand, and GPUs are expensive. Configuring for peak means significant waste during off-peak hours. Balancing “experience” against “cost” is the core challenge of operating LLM services, and it explains why the provider chose to “pause new subscriptions rather than shut down permanently”—compute is an elastic gap that can be closed once capacity expands.

    Engineering Mitigation Strategies

    Common optimization paths in the industry include:

    1. PagedAttention-style VRAM management: Paging the KV Cache to reduce internal and external fragmentation, significantly increasing per-GPU concurrency density.
    2. Quantization and sparsity: Applying low-precision quantization to the KV Cache (e.g., FP8) or quantizing model weights to lower bit widths, directly reducing VRAM footprint.
    3. Multi-tier caching: Evicting cold-session KV Cache to system memory or SSD while keeping hot data in VRAM, with tiered scheduling based on session-hit prediction.
    4. Prefix caching: Reusing KV Cache for shared prefixes such as identical system prompts, reducing redundant prefill computation.
    5. Speculative decoding: Using a small draft model to propose tokens and a large model to verify, improving per-request decode speed despite the bandwidth bottleneck.
    6. Request queueing and rate limiting: Token buckets and priority queues protect the system from overload, ensuring quality of service for paying users—the technical basis behind the “existing users unaffected, new users paused” strategy.

    For enterprise developers integrating LLM capabilities into their own products without building GPU clusters, an alternative is to use managed inference services from cloud providers, leveraging their elasticity to handle traffic surges. For instance, Baidu AI Cloud‘s LLM platform offers standard API interfaces for inference, with capacity planning and auto-scaling handled on the cloud side. The client only needs to implement retry, timeout, and fallback logic:

    1. # Example: client-side resilient error handling
    2. def chat_with_retry(prompt, max_retries=3):
    3. for i in range(max_retries):
    4. try:
    5. resp = llm_client.chat(prompt, timeout=30)
    6. return resp
    7. except RateLimitError:
    8. # Exponential backoff when rate-limited
    9. time.sleep(2 ** i)
    10. except TimeoutError:
    11. continue
    12. return fallback_response() # Degradation strategy

    Conclusion

    Pausing new subscriptions due to compute shortage appears to be an operational decision, but at its core it is a capacity economics problem for LLM inference services: VRAM determines the concurrency ceiling, memory bandwidth determines generation speed, and traffic peaks define the resource planning baseline. Understanding the logic of “discardable KV Cache and trading recomputation for concurrency” clarifies how chat services can serve millions of users on finite GPUs—and predicts the trade-offs providers will make when user growth outstrips compute supply.

    For developers, whether as consumers or builders of such systems, mastering these underlying mechanisms enables more informed decisions in architecture design, cost estimation, and troubleshooting.