Compute Bottlenecks and Capacity Planning for Large Model Inference Services: Engineering Practices

    This article explains why large model inference services run into compute bottlenecks and how GPU throughput and KV Cache memory limit the number of concurrent users. It also covers engineering methods for managing these limits, including capacity planning, continuous batching, paged KV Cache management, quantization, speculative decoding, and overload degradation strategies.

    1. Starting from an Industry Event

    In mid-2026, a leading large model chat platform announced that it had paused new member sign-ups because compute resources were tight. The news sparked wide discussion among developers. How could a company with large compute reserves be stopped by “too many users”?

    This is not an isolated case. It reflects a structural problem in large model inference services. Unlike traditional web services, large model inference consumes GPU resources in a way that is essential, exclusive, and hard to scale elastically. Understanding this resource model is a basic requirement for every engineer building large model applications. This article examines the underlying mechanics of inference services, analyzes the causes of compute bottlenecks, and presents general practices for capacity planning and engineering optimization.

    2. The Resource Model of Inference Services: GPUs Set the Concurrency Ceiling

    2.1 The Throughput Nature of Chatbots

    In the chatbot era, the main resource that limits the peak number of concurrent users is GPU compute. The logic is straightforward:

    • Each user query requires the model to generate its reply one token at a time.
    • The total number of tokens a GPU can produce per second is limited.
    • As long as tokens are generated quickly enough, the system can finish the current user’s request, release the inference context (KV Cache) it occupies, and assign the compute to the next queued user.

    In other words, an inference service works as a high-speed rotation system that trades time for space. The number of GPUs largely determines how many active users the system can serve at peak. When request spikes exceed the total throughput of the GPUs, queuing delays rise sharply and user experience degrades quickly. This is the technical reality behind “compute shortage” announcements.

    2.2 Prefill and Decode: Resource Characteristics of Two Stages

    LLM inference has two stages, and each one puts different pressure on the hardware:

    1. Prefill stage: The user’s prompt is processed in a single parallel pass to produce the first token. This stage is compute-bound and mainly consumes GPU compute (FLOPS).
    2. Decode stage: Tokens are generated autoregressively, one at a time. Each new token requires reading the full model weights and the accumulated KV Cache, so this stage is memory-bandwidth-bound.

    Setting aside the memory bandwidth limit in the decode stage, the GPU can be treated as running near full load, close to its hardware bottleneck, at all times. This means inference services have little idle capacity. Growth in request volume translates almost linearly into demand for more GPUs.

    3. KV Cache: The Hidden Constraint on Concurrency

    3.1 The Memory Budget of KV Cache

    During autoregressive generation, the system caches the Key and Value tensors of each layer so it does not have to recompute attention over earlier tokens. This cache is the KV Cache. Its size can be roughly estimated as:

    1. KV Cache bytes ≈ 2 × number of layers × hidden dimension × sequence length × bytes per element × number of concurrent sessions

    For a medium-sized model, the context of a single conversation spanning several thousand tokens may occupy several hundred megabytes of GPU memory. When the number of concurrent sessions reaches hundreds or thousands, total KV Cache usage can easily exceed the model weights, making it the largest consumer of GPU memory.

    3.2 Is Memory Pressure Really a Big Problem?

    Memory pressure is real, but its impact depends on how often sessions are reused. The original analysis makes a sharp observation: the KV Cache in chatbots can be discarded.

    The reason lies in real user behavior:

    • Many sessions are one-off. Users ask questions such as “Will the weather be good tomorrow?” or “What did a certain celebrity eat yesterday?” and rarely return to the same session after getting an answer.
    • Even in long conversations, users seldom iterate on the same topic several times within a day.
    • Session activity is highly uneven, and only a small share of sessions are hot.

    Based on these traits, engineers can adopt a tiered caching strategy:

    1. Hot data stays in GPU memory: Sessions that are currently generating or recently active keep their KV Cache in GPU memory to guarantee low latency.
    2. Warm data is offloaded to host memory or SSD: Sessions that are temporarily idle have their KV Cache swapped out to CPU memory or even NVMe storage, freeing scarce GPU memory.
    3. Cold data is discarded: Sessions that have been inactive for a long time have their cache cleared. If the user returns later, the cache can be reloaded from storage, or the system can recompute the prefill from the full chat history.

    For a history of a few thousand tokens, recomputing the prefill takes on the order of seconds or less. Users only notice a slightly slower first response, which is acceptable. So reduced GPU memory use is not a serious problem. Freeing memory faster lets the next user’s request load sooner.

    3.3 But Compute Has No Substitute

    Unlike memory, compute cannot be created through scheduling tricks. The KV Cache can be swapped out and recomputed, but the floating-point operations needed to generate each token are fixed. When the user count keeps growing while the total GPU count stays the same, the only options are queuing, rate limiting, or, as in that announcement, pausing new sign-ups. This is also why capacity decisions at large model providers often come down to buying more GPUs.

    4. Engineering Practices: Getting the Most from Every Unit of Compute

    4.1 Continuous Batching

    Static batching requires a batch of requests to start and finish together, so long replies slow down the whole batch. Continuous batching schedules work at the token level. Whenever a request finishes generating, a new request is inserted into the batch right away, which can significantly raise GPU utilization. This is now a standard capability of current inference frameworks.

    4.2 Paged KV Cache Management

    Borrowing the idea of virtual memory from operating systems, the KV Cache is split into fixed-size pages that are allocated on demand. This avoids reserving contiguous GPU memory at maximum length for every session. Combined with prefix sharing, where multiple requests that use the same system prompt reuse its KV Cache, this approach can substantially reduce memory fragmentation and redundant computation.

    4.3 Quantization and Speculative Decoding

    • Weight quantization: Compressing model weights from FP16 to INT8 or even INT4 reduces GPU memory usage and eases the bandwidth bottleneck in the decode stage.
    • Speculative decoding: A small model first drafts several candidate tokens, and the large model verifies them in parallel. One forward pass can then produce multiple tokens, directly increasing single-request throughput.

    4.4 A Basic Formula for Capacity Planning

    Engineering teams can estimate the required GPU count with a simplified model:

    1. Required GPUs ≈ Peak QPS × Average output tokens ÷ Effective tokens per second per GPU ÷ Target utilization

    In practice, the target utilization should stay between 60% and 70%, leaving headroom for traffic spikes and failures. Teams can use general capabilities from cloud providers, such as container platforms, monitoring, and alerting, to automate scaling of inference instances and run canary releases. Storing cold session context in object storage helps balance cost and user experience. For example, on mainstream cloud platforms such as Baidu AI Cloud, developers can use general-purpose GPU compute and container orchestration services to build elastic inference clusters without operating their own data centers.

    4.5 Degradation Plans for Overload

    No amount of scaling can keep up with exponentially growing traffic, so degradation strategies must be designed in advance:

    • Queuing and rate limiting: Schedule requests by user tier to protect the experience of core users.
    • Shorter maximum output length: Limit the token cap per request during peak hours.
    • Routing to smaller models: Send simple queries to lightweight models and reserve large model capacity for complex tasks.
    • Graceful admission control: When capacity truly reaches its limit, pausing new sign-ups is more responsible than letting the experience of all users collapse. From an engineering standpoint, the announcement about pausing membership sign-ups was an active capacity protection measure.

    5. Conclusion

    The compute bottleneck of large model inference services is fundamentally a conflict between rigid compute demand and elastic user growth. The number of GPUs sets the concurrency ceiling, memory bandwidth in the decode stage sets per-GPU throughput, and the fact that the KV Cache can be discarded and tiered leaves room for scheduling optimization. By combining continuous batching, paged caching, quantization, capacity planning, and degradation plans, engineering teams can maximize service quality under limited compute. For developers, understanding this resource model helps them interpret every “compute shortage” announcement and make reasoned trade-offs among cost, latency, and user experience in their own systems.