LLM Inference Compute Bottleneck: Why Concurrency Limits and the KV Cache Trade-off Go Hand in Hand
Conversational AI services are frequently constrained less by bandwidth or storage than by the raw compute of inference GPUs, their memory capacity, and their memory bandwidth. This article explains why GPU capacity ultimately sets the peak number of concurrent sessions, how the two inference phases—Prefill and Decode—compete for the same hardware, and why the KV cache, despite being essential, can be discarded or offloaded when resources run out. It then walks through practical memory-management techniques (paged KV cache, prefix caching, quantization, offload), throughput optimizations (continuous batching, optimized attention kernels, speculative decoding, disaggregated deployment), and a capacity-planning approach that treats compute as an elastic, operable resource. It closes with guidance on when and how to apply graceful rate limiting instead of hard shutoffs.
1. Starting from “Pausing New Sign-ups”: Compute Is the Hard Constraint on Concurrency
It is common in the industry to see a conversational AI service temporarily stop accepting new members because of resource pressure. On the surface this looks like a business decision, but at its core it reflects an unavoidable engineering reality: in generative chat workloads, what determines “how many users can be served simultaneously at peak” is neither bandwidth nor storage, but inference compute (GPU) together with the associated GPU memory capacity and memory bandwidth.
The reason lies in the load profile of chat-style interactions. After a user submits a request, the model must produce the answer autoregressively, one token at a time. As long as your per-GPU token throughput is high enough, you can finish the current user’s response quickly, free up the memory it was holding, and load the next user’s request to continue inference. This is a continuous process of switching, preempting, and reusing limited resources. You can roughly assume that during the decode phase the GPU runs at near-peak load, continuously pushing against the hardware limit—so the amount of available compute dictates how many sessions can be maintained concurrently at peak.
One easily overlooked point: most chatbot sessions are one-off. When a user asks “What’s the weather tomorrow?” or “What are the details of a particular news story?”, they usually leave once they get the answer, and the probability of revisiting the same session is relatively low. Even for long-running conversations, users rarely iterate on the same session at high frequency within a short window. This characteristic directly implies an important scheduling strategy—the KV cache can be discarded when necessary.
2. Prefill and Decode: The First Step to Understanding Concurrency
To understand the compute bottleneck, you first have to distinguish the two phases of LLM inference:
- Prefill phase: Performs a single parallel computation over the user’s entire prompt to generate the first token. This phase is compute-bound—the GPU’s compute units are saturated with large matrix operations and typically make full use of parallelism.
- Decode phase: Generates output tokens autoregressively, one at a time, based on the existing context. Every new token requires reading the KV cache for all previous tokens, which makes it memory-bandwidth-bound. Here the compute units are often underutilized, and the bottleneck shifts to memory read/write bandwidth.
Chat services are latency-sensitive, and users clearly perceive both time to first token (TTFT) and the smoothness of token generation (TPOT). System design must therefore account for both phases: Prefill should return the first token quickly, and Decode should produce tokens steadily. As concurrent requests increase, the two phases compete for the same pool of GPU resources, causing queuing and degraded latency.
3. The KV Cache: Both Critical and Disposable
During the decode phase, every generated token requires the Key and Value vectors of all preceding tokens—the so-called KV cache. It avoids recomputing the entire history at every step and is central to inference efficiency.
However, the KV cache comes at a cost: its memory footprint grows linearly with context length. A long-context session may occupy several gigabytes of memory, and that memory stays pinned for the entire duration of generation. When there are many concurrent users with long contexts, memory quickly becomes the bottleneck.
Interestingly, thanks to the “one-off session” characteristic described earlier, engineers can confidently apply aggressive reclamation strategies to the KV cache:
- Direct discard: Free the memory as soon as the current response is generated, handing the resources to waiting requests;
- Offload to slower media: Swap the KV cache out to host memory or even external storage such as SSD, and load it back when the user returns to that session;
- Recompute from scratch: Since repeat visits are unlikely, it is often acceptable to “take the hit” and run a fresh Prefill over the full chat history; in most scenarios the impact on user experience is limited.
This mindset—sacrificing the cache in order to serve more users first—is precisely the underlying logic that lets chat services support high concurrency on relatively limited compute.
Roughly speaking, we can describe concurrency capacity with a simple model:
# Pseudocode: estimating peak concurrencyper_request_kv_bytes = layers * 2 * kv_heads * head_dim * seq_len * dtype_bytes# Portion of memory available for the KV cachekv_budget = total_gpu_mem * kv_mem_ratio - weights_bytesmax_concurrent = kv_budget // per_request_kv_bytes# But the true ceiling is also bounded by decode throughput:# max_concurrent <= decode_token_throughput / required_tokens_per_user_per_sec# The real peak concurrency is the smaller of the two.
4. KV Cache Management Strategies When Memory Runs Short
When memory is tight, several general-purpose techniques can be combined (these are widely accepted in the industry, not proprietary to any single vendor):
- Paged memory management: Drawing on the idea of virtual-memory paging in operating systems, split the KV cache into fixed-size blocks that are allocated on demand. This reduces fragmentation and improves memory utilization and scheduling flexibility;
- Prefix cache reuse: For identical prefixes such as system prompts and common instructions, compute them only once and share their KV cache across multiple requests, significantly reducing redundant computation;
- KV cache quantization: Store Keys and Values at a lower bit-width, trading a controlled loss of precision for a multiple-fold saving in memory;
- Swap in/out (offload): Schedule the cache between GPU memory and host memory or external storage, using eviction policies such as LRU to decide “who to keep, who to drop.”
These techniques all share a single goal: to sustain as many active sessions as possible, for as long as possible, under the same amount of memory.
5. Core Optimizations for Increasing Concurrency Capacity
Saving memory alone is not enough—you also need to raise the actual utilization of compute:
Continuous (in-flight) batching: Traditional static batching requires a batch of requests to start and finish together, so short requests must wait for the long ones to complete, causing severe waste. Continuous batching schedules dynamically at token granularity: as soon as one request finishes, it exits and its slot is immediately filled by a new request, greatly improving GPU utilization. This is the key to high throughput in modern inference services.
Attention computation optimization: More efficient attention kernels reduce the number of memory read/write operations, directly alleviating the bandwidth bottleneck of the decode phase.
Quantization and distillation: Weight quantization (e.g., INT8/INT4) is highly effective at lowering memory usage and raising throughput, and requires a trade-off between accuracy and efficiency.
Speculative decoding: A small, fast model first “guesses” several tokens, which the large model then verifies in a batch, improving effective per-step decoding throughput while preserving output quality.
Tiered and disaggregated deployment: Split Prefill and Decode across separate resource pools so that long and short requests do not interfere with each other, letting each scale independently as needed.
6. Capacity Planning and Elastic Scaling: Turning Compute into an Operable Resource
From an operations standpoint, “pausing new sign-ups” is really an emergency measure taken when capacity planning fails. A more mature approach is to treat compute as an elastically schedulable resource pool:
- Observability first: Use a monitoring and alerting system to collect core metrics such as GPU utilization, memory usage, queue length, and TTFT/TPOT, establish a capacity baseline, and issue early warnings;
- Elastic scaling: Use container platforms and auto-scaling to dynamically adjust the number of inference instances based on real-time load, handling traffic peaks and troughs;
- Tiered service and graceful degradation: Differentiate between paid/free and real-time/asynchronous requests; under high load, prioritize high-priority users and queue or throttle low-priority requests rather than cutting everything off at once;
- Caching and asynchronous fallback: Route non-real-time requests through a message queue to make them asynchronous and smooth out instantaneous pressure.
In practice on the cloud, you can combine general-purpose capability categories—object storage (for model weights and cold data), container platforms (to host elastic inference services), monitoring and alerting (for capacity observability), and message queues (to level out traffic)—to build a scalable, operable inference architecture. This section only describes general technology categories; specific choices must be evaluated against your own business.
7. When to Rate-Limit Proactively, and How to Handle It Gracefully
Even with all optimizations in place, compute is ultimately finite. When you predict that capacity is about to breach a safe threshold (for example, queues keep growing or latency degrades significantly), proactive rate limiting is more responsible than a passive crash:
- Advance notice: Transparently inform users that resources are tight during peak periods, avoiding the frustration that comes from unexpected degradation;
- Smooth admission: Replace hard rejections with waiting queues, reservations, or gradual rollouts;
- Differentiated guarantees: Reserve resources for core users and critical workloads, while letting non-core features contract elastically;
- Fast recovery: Once resources free up, automatically resume admission and backfill the backlog of pending requests.
8. Conclusion
“Pausing new sign-ups due to resource pressure” may look like an operational move, but it is in fact a vivid lesson in inference systems engineering. It reveals a core truth: the concurrency ceiling of conversational AI is fundamentally determined by GPU compute, memory capacity, and memory bandwidth together. The disposability of the KV cache, the dynamic scheduling of continuous batching, memory paging and offload, and quantization and speculative decoding together form a complete methodology for serving more users on limited hardware. For developers, understanding these principles enables more composed and professional decisions in capacity planning, cost accounting, and elastic architecture design—transforming compute from a “scarce hard constraint” into a “resource that can be finely operated.”
