Why Large Language Model Services Slow Down or Appear to Crash

    This article explains why large language model (LLM) services often slow down under load and appear to crash, when requests are usually queued and timing out rather than failing outright. It breaks down four root causes: rigid accelerator supply, contention for GPU memory and KV cache, the combined pressure of long contexts and low cache hit rates, and traffic spikes amplified by client retries. It then outlines five practical stability measures—capacity planning, elastic scaling with queue controls, cache governance, tiered degradation, and observability—plus client-side strategies such as exponential backoff with jitter.

    1. What Users See: From “Slower” to “Looks Like a Crash”

    Many users have recently reported noticeable slowdowns in certain large language model services: requests hang for a long time, the interface keeps waiting, and outside observers start guessing the service has crashed. One concept needs clarifying first. In most cases, what users perceive as a crash is not a process exiting completely, but a saturated service queuing requests and timing them out. The requests are still in the system; they simply wait longer than the client’s threshold, so they are treated as unavailable.

    These incidents share a common pattern: latency is very low under normal conditions, deteriorates sharply once peak traffic arrives, and recovery lags behind the drop in traffic. Understanding that lag is the starting point for designing a stable system.

    2. Root Cause One: The Rigidity of Compute Supply

    Model inference depends on accelerators, and the procurement and deployment cycle for accelerator cards is measured in quarters or even years. When the business growth curve is far steeper than the compute delivery curve, the gap can only be absorbed by queuing. Worse still, inference cards have limited memory capacity, so the number of concurrent requests a single card can serve has a hard ceiling. Once concurrency exceeds that ceiling, new requests can only wait, and latency rises non-linearly.

    The conclusion is straightforward: compute is a rigid resource that cannot be solved by “just pushing through.” It must be buffered by both scheduling efficiency and capacity headroom.

    3. Root Cause Two: Contention for GPU Memory and Cache

    GPU memory usage in LLM inference is not a fixed value; it grows with context length. Every active session must retain its own key-value cache, so the longer the sessions and the higher the concurrency, the larger the cache footprint. When total cache usage approaches the memory limit, the system triggers eviction, and evicted sessions must recompute their prefix in the next turn, creating a positive feedback loop of “more crowding means slower, slower means more crowding.”

    A simplified model helps explain the memory budget:

    1. Available cache budget ≈ per-card GPU memory - model weight footprint - runtime and communication buffers
    2. Max concurrency ≈ available cache budget / average session context length

    This relationship shows there are two ways to raise concurrency: reduce the average context length, or improve cache reuse. Both are more economical than simply adding more cards.

    4. Root Cause Three: Long Contexts and Low Cache Hit Rates

    The longer the context, the more computation and cache movement each inference requires. When many requests share the same prefix (for example, a common system prompt or fixed knowledge base fragments), the same cache can in principle be reused. But if the prefix is rewritten frequently, or timestamps and random strings are placed at the very front, reuse breaks down and every request degrades into full computation. This is the most common “invisible amplifier” during peak hours.

    5. Root Cause Four: Traffic Spikes and Retry Storms

    Automatic client retries after a timeout pile additional load onto an already saturated service. Inconsistent client timeout thresholds also skew the distribution of requests. Without queue limits and admission control, the system responds to “more requests” with “a longer queue,” and eventually collapses.

    6. Stability Measures: Five Practical Levers

    1. Capacity planning and load-test baselines: estimate cache demand from “average context length × peak concurrency,” keep at least 30% headroom, and scale in steps aligned with the business peak curve.
    2. Elastic scaling and queue governance: have the container platform scale on two metrics—queue wait time and utilization—and set queue limits with admission rejection. Fail fast rather than wait indefinitely.
    3. Cache governance: place stable prefixes first and dynamic content last, and version system prompts and knowledge fragments so prefix caches can be reused.
    4. Tiered degradation: disable non-core capabilities during peaks (such as lengthy summarization and second-pass polishing) while keeping the basic Q&A path; convert non-real-time tasks to asynchronous processing and use a message queue to smooth out spikes.
    5. Observability loop: cover time-to-first-token, queue wait time, cache hit rate, GPU memory level, and rejection rate with monitoring and alerts, and retain request trace identifiers in logs so teams can quickly tell whether the cause is insufficient compute or cache misses.

    7. What Users Can Do

    When a service appears unavailable, prefer exponential backoff with jitter instead of fixed-interval retries that hit the service in a concentrated burst. Shortening the context per request, splitting long tasks, and submitting non-urgent requests off-peak all improve success rates. For developers, writing timeout, retry, and degradation policies explicitly into client configuration is more reliable than depending on defaults.

    8. Conclusion

    Slowdowns in LLM services come down to an imbalance among three things: rigid compute, variable cache, and bursty traffic. Stability does not come from scaling a single point, but from a combination of capacity headroom, cache reuse, admission control, and observability. Organizations that want to shorten the time needed to build this system can use general-purpose capabilities such as the container platform, object storage, message queue, and monitoring and alerting offered by Baidu AI Cloud to stand up an elastic foundation quickly, keeping engineering effort focused on the business and model quality themselves.