LLM Compute Bottlenecks and Dynamic KV Cache Scheduling Strategies
As LLM services scale, GPU compute and VRAM increasingly determine concurrency limits. This article explains how GPU throughput, Decode-stage memory bandwidth, and KV Cache lifecycle management interact, then discusses LRU-based KV Cache eviction, SSD cold storage reload, Prefill recomputation, and elastic serving architecture patterns for balancing concurrency, latency, and cost.
As large language model (LLM) applications become widespread, compute scarcity has become a core constraint on the stability and scalability of AI services. Recently, an AI platform announced that it was pausing membership openings due to compute constraints. This incident is not only a business challenge for one platform; it also reflects a common technical bottleneck that LLM serving architectures face under high-concurrency workloads. As developers and architects, we need to look beyond the symptoms and understand the underlying relationships among GPU compute, VRAM usage, and KV Cache lifecycle management so that we can build more robust elastic AI serving architectures.
1. The Underlying Relationship Between GPU Resources and Concurrent Throughput
For LLM chat services, GPU resources often determine the peak number of concurrent users a system can support. Unlike traditional web services, LLM inference consumes compute and VRAM continuously. When a user sends a request, the model must generate tokens one by one in an autoregressive manner based on the input context.
At the execution level, the GPU works at full load as close to its bottleneck as possible during inference. The number of tokens generated per second (throughput) directly determines how quickly the system can complete the current user’s query. Once generation is complete, the system can quickly unload the KV Cache occupied by that user session, free VRAM, load the next user’s request, and continue token generation. In this process, ignoring the memory bandwidth bottleneck in the Decode stage, the scale of GPU compute directly determines how many active users the system can maintain at peak times.
2. Memory Bandwidth Bottlenecks in the Decode Stage and VRAM Trade-offs
In practical LLM inference architectures, the Decode stage is often the key constraint on throughput. In Decode, the model generates only one token at a time, making this a typically memory-bound task. Compute units (FLOPS) are often not the first bottleneck; memory bandwidth is the critical factor that determines token generation speed.
The model must move large weight matrices and the current session’s KV Cache from VRAM (HBM) to compute cores (SRAM). KV Cache stores the key-value pairs of historical tokens. As conversation length increases, KV Cache size grows linearly and occupies a large amount of VRAM. When VRAM is scarce, if the system has sufficient compute, it can compensate by accelerating computation: faster computation can complete the current request sooner and release VRAM for the next user. However, when concurrent requests surge and both VRAM and bandwidth are exhausted, even strong compute cannot help, and the system is forced to limit new user access.
3. Dynamic KV Cache Scheduling and Eviction Strategies
To maximize service concurrency under limited GPU resources, developers must carefully manage the KV Cache lifecycle. One effective and commonly used strategy is KV Cache eviction and reload.
1. User Behavior Analysis and Strategy Feasibility
When users interact with chatbots, session activity is unevenly distributed. Many queries are one-shot questions, such as “Will the weather be good tomorrow?” or “What was a certain public figure’s schedule yesterday?” After the response is generated, users rarely continue asking questions based on that context within a short period. Even for long multi-turn conversations, ordinary users are unlikely to iterate on the conversation content at high frequency within a single day.
2. LRU Eviction and VRAM Release
Based on these user behavior characteristics, when VRAM usage reaches a threshold, the system can proactively evict the KV Cache of inactive sessions using strategies such as LRU (least recently used). The pseudocode logic for this mechanism is as follows:
def allocate_kv_cache(new_request):if available_gpu_memory < threshold:# Get the least recently active sessioninactive_session = get_lru_session()# Drop the KV Cache to free VRAMdrop_kv_cache(inactive_session.id)log_event(f"KV Cache for session {inactive_session.id} dropped due to memory pressure.")# Allocate KV Cache space for the new requestload_kv_cache(new_request)
Through this degraded scheduling strategy, the system can significantly increase overall service concurrency at the cost of immediate experience for a very small number of inactive users.
4. Trade-offs Between Cold Data Reloading and Recomputation
Proactively evicting KV Cache solves the VRAM crisis under high concurrency, but it introduces a side effect: when a user whose KV Cache was evicted returns to continue the conversation, how does the system restore the context?
The industry typically provides two compensation approaches:
1. SSD-Based Cold Storage Loading
Before KV Cache is evicted from GPU VRAM, the system can asynchronously dump it to high-speed SSD (such as NVMe SSD) or object storage. When the user reactivates the session, the system loads the historical KV Cache from SSD back into VRAM. This approach has lower latency but requires additional storage overhead and I/O bandwidth. In cloud-native architectures, cloud disk or object storage services can be used to build a storage layer with hot/cold data separation, balancing cost and performance.
2. Context Recomputation (Prefill Replay)
If system resources are extremely tight, the system cannot afford SSD storage overhead, or the probability of user return is assessed as very low, it can choose a fallback strategy: when the user returns, the system carries the complete chat history and runs Prefill again. It recomputes all historical tokens from beginning to end and rebuilds the KV Cache. This consumes compute and increases time to first token (TTFT), but within available compute capacity, it is the most VRAM-efficient fallback option.
5. Building an Elastic LLM Serving Architecture
Facing periodic compute scarcity, KV Cache scheduling at the software layer alone can only relieve immediate pressure. To thoroughly address compute bottlenecks under high concurrency, it is necessary to build an elastic serving architecture that combines software and hardware.
- Resource Monitoring and Elastic Scaling: Use cloud-native monitoring and alerting services to observe GPU utilization, VRAM usage, and request queue length in real time. When metrics exceed safe thresholds, trigger elastic scaling of GPU instances through the container platform and dynamically add inference nodes.
- Tiered Storage System: Establish a four-level KV Cache storage system: GPU VRAM, memory, local SSD, and object storage. Automatically downgrade or upgrade the KV Cache storage tier based on session activity, trading reasonable cost for optimal response latency.
- Request Priority Routing: Implement request classification at the API gateway layer, guarantee compute supply for high-priority requests (such as paid members), and appropriately rate-limit or queue low-priority requests to ensure the stability of core services.
In summary, compute scarcity is a gap that LLM applications must cross as they move toward large-scale adoption. Understanding GPU compute allocation and KV Cache lifecycle management, flexibly applying eviction, cold backup, and recomputation strategies, and building elastic architectures with mature cloud computing infrastructure are essential for developers to break through concurrency bottlenecks and improve efficiency while reducing costs.
