LLM Long-Conversation Bottlenecks: KV Cache Costs and Compute Scheduling
Long conversations can strain large language model services even when a user sends only a short message. This article explains how KV caching reduces repeated computation, why inactive sessions can become expensive to resume, and how platforms manage those costs through request limits and resource isolation. It also outlines practical ways to preserve conversation data and manage context more efficiently.
An AI model platform popular with developers recently restricted very long conversations for free users as its compute resources came under pressure. Users reported being unable to continue older conversations, encountering tighter input limits, and repeatedly seeing “server busy” messages. The changes prompted widespread criticism.
At first glance, this looks like a straightforward service downgrade. Underneath it, however, lies a central challenge in large language model inference: maintaining long-context caches while scheduling limited compute resources.
1. The Cost of LLM “Memory”: How KV Cache Works
Most mainstream large language models use a Transformer architecture and generate text autoregressively. Each new token depends on the preceding context through attention computations. Without caching, generation would repeatedly recompute information from earlier tokens.
To avoid much of this redundant work, inference systems commonly use a key-value cache, or KV cache. The model stores previously computed key and value vectors for its attention layers, typically in GPU memory. As the conversation continues, it computes the vectors for new tokens and performs attention using both the new vectors and the cached history.
This makes ongoing generation substantially more efficient, but it introduces a memory cost: KV cache size grows linearly with the number of cached tokens. For an extremely long conversation containing hundreds of thousands of characters, the cache can occupy tens of gigabytes of GPU memory, depending on the model and tokenization.
GPU memory is expensive and finite. A serving platform cannot keep every conversation’s cache resident indefinitely. It therefore needs cache eviction policies, such as least recently used (LRU), to reclaim memory from inactive sessions.
The important distinction is that a saved conversation and its inference cache are not the same thing. Retaining the chat history does not mean retaining all the GPU-resident state needed to resume it cheaply.
2. Cold Starts and Cache Eviction: The Hidden Compute Cost
The key issue behind the controversy is the cost of rebuilding an evicted cache.
A user might reasonably ask: “I haven’t used this conversation for seven days. It wasn’t consuming resources while I was away, so why would sending ‘hello’ now trigger a limit?”
From an engineering perspective, the conversation’s KV cache may have been evicted during that period of inactivity. If the service resumes the conversation using its full history, it must process that history again to reconstruct the cache before generating a response.
For a conversation containing hundreds of thousands of characters, that is a substantial prefill operation—even if the new message is only a greeting.
The following pseudocode illustrates the difference:
# Pseudocode: LLM inference scheduling logicdef process_request(user_input, chat_history, active_cache):if chat_history.id in active_cache:# Cache hit: reuse historical KV state and process the new input.kv_cache = active_cache.get(chat_history.id)return model.generate(user_input, kv_cache=kv_cache)else:# Cache miss: rebuild the KV cache for the entire conversation.# For a history of 200,000 characters, this can represent substantial# compute—illustratively, comparable to 15–40 ordinary chat turns.# The actual cost depends on the model and request characteristics.new_kv_cache = model.prefill(chat_history.all_tokens)active_cache.set(chat_history.id, new_kv_cache)return model.generate(user_input, kv_cache=new_kv_cache)
A cache hit avoids rebuilding historical state, although attention over a long cached context still has a cost. A cache miss adds the expense of processing the entire retained history.
As a result, waking a dormant conversation can require significant compute and memory bandwidth even when the user sends only a punctuation mark. The cost may be comparable to many ordinary exchanges, but there is no universal conversion between history length and the number of chat turns.
When many free users resume long, inactive conversations at the same time, these cold-start requests can overwhelm available inference capacity. Other requests then spend longer in queues, potentially leading to timeouts or “server busy” responses.
3. Compute Scheduling and Resource Limits
When capacity becomes constrained, measures such as restricting access to inactive conversations, reducing input length to around 40,000 characters, or imposing usage caps can serve as protective controls.
These restrictions are frustrating for users, but they address different sources of pressure on the inference system.
Inactive-Conversation Policies
Stopping automatic context continuation for conversations inactive for more than seven days can reduce sudden bursts of expensive cache reconstruction.
This allows a platform to reserve more capacity for active sessions instead of repeatedly rebuilding very large caches for dormant ones.
Input-Length Limits
A lower per-request input limit bounds the amount of context that the service must process in a single request.
It helps prevent unusually large inputs from consuming disproportionate resources and disrupting the rest of the inference cluster. Character-based limits are user-facing controls; the model itself processes tokens.
Resource Isolation to Protect SLAs
In the situation described, restrictions primarily affected the free application rather than the paid API channel. More generally, separating free and paid workloads can help protect commercial service-level agreements (SLAs).
Cloud architectures may use container platforms and traffic gateways to provide logical or physical isolation between workloads. Compute scheduling, monitoring, alerting, and autoscaling support availability and help keep pressure in one service tier from spreading to another.
Cloud providers, including Baidu AI Cloud, offer infrastructure capabilities in these areas. The relevant engineering principle is resource isolation—not the assumption that every service tier shares the same capacity pool or usage policy.
4. User-Side Strategies and Best Practices
For users who depend heavily on long-running context—such as novelists, role-playing users, and researchers organizing large document collections—treating a chat window as a permanent database is risky.
A more resilient approach separates durable information storage from the context supplied to the model.
1. Store Important Data Outside the Chat Platform
Do not keep critical business information exclusively in a platform’s conversation history.
Export conversations regularly and store them locally or in reliable cloud storage, such as object storage. This preserves the underlying information even if a conversation can no longer be continued under the platform’s current limits.
2. Use Retrieval-Augmented Generation
Processing a large document collection does not always require placing every document into the context window.
With retrieval-augmented generation (RAG), historical material can be converted into embeddings and stored in a vector database. For each request, the application retrieves relevant passages and supplies them to the model.
This reduces the amount of historical material that must be processed for each interaction rather than repeatedly loading the full collection.
3. Manage the Context Window Explicitly
Applications can use sliding windows or summaries to control how much conversation history they retain.
When a conversation reaches a defined threshold, summarize the earlier material and start a new conversation using that summary. This keeps the working context—and its associated cache—more manageable.
For users working manually, the same principle applies: preserve the full record separately, while carrying forward a concise summary of the information needed for the next stage.
Conclusion
Restrictions on very long conversations reflect a tension between finite inference capacity and users’ expectations of continuous, effectively unlimited context.
KV caching makes ongoing conversations more efficient, but it does not make long histories free to maintain or resume. Cached state consumes GPU memory, and rebuilding that state after eviction can impose a substantial compute cost.
Understanding these mechanisms helps developers and users make more reliable choices: persist important data outside the chat service, retrieve relevant information when needed, and actively manage the context window. An LLM conversation is a working inference context—not an unlimited, low-cost storage system.
