Why Large Language Model Services Slow Down and How to Keep Them Stable

    This article explains why large language model (LLM) services frequently slow down or appear to crash during peak traffic, and how engineering teams can address it. It distinguishes service degradation from an actual outage, then breaks down the main causes: rigid GPU supply constraints, VRAM and batching limits, the nonlinear cost of long contexts and caching, and mismatched scheduling and timeouts that trigger retry storms. It also presents a stability framework covering capacity and admission control, cache governance, graceful degradation and rate limiting, and observability, along with practical advice for developers on retries, timeouts, asynchronous task handling, and fallback paths.

    1. The Symptoms: From “Slow” to “Looks Like a Crash”

    Recently, many users have reported noticeable slowdowns in an intelligent conversational service: requests hang for a long time without a response, time-to-first-token spikes, and some sessions fail outright. These issues are rarely a single point of failure. Instead, they are capacity and scheduling problems that surface all at once during peak hours.

    It is worth stressing that “service degradation” and “service crash” mean different things in engineering. The former is usually about queuing and timeouts; the latter means a process or cluster is actually unavailable. Most events perceived as a “crash” are really queuing delays that have exceeded the client’s timeout threshold.

    2. Root Causes

    2.1 Rigid Compute Supply Constraints

    LLM inference depends on accelerators, whose supply is far less elastic than that of a typical web service. Scaling can take weeks or even months, with no way to scale horizontally in seconds the way stateless services can. When upstream traffic surges, the system can only queue requests.

    2.2 VRAM and the Batching Window

    Inference requires weights and the KV cache to stay resident in VRAM. The higher the concurrency, the more cache memory is consumed. Once VRAM is maxed out, the system can only shrink the batch size or reject new requests outright, and throughput drops accordingly.

    2.3 Long Contexts and Cache Amplification

    The longer the context, the more nonlinearly attention computation and cache usage grow. If many requests share a similar prefix but no reuse is applied, the repeated computation consumes resources significantly.

    2.4 Scheduling and Timeout Mismatch

    Short client timeouts combined with long server-side queues trigger retry storms. Retries further amplify the load, creating a positive feedback loop that keeps making things worse.

    3. A Stability Practice Framework

    Capacity and admission control: Build a capacity model based on peak QPS and the context-length distribution, set an upper bound on the admission queue, and fail fast when the limit is exceeded instead of queuing indefinitely.

    1. if queue_depth > MAX_QUEUE:
    2. return 429, {"msg": "busy, retry later"}

    Cache governance: Reuse high-frequency prefixes, and set a TTL and capacity limit on session-level caches to prevent unbounded growth.

    Graceful degradation and rate limiting: During peak hours, disable non-core capabilities (such as extra-long contexts and additional generation tasks) to keep the main path available; apply fair rate limiting per tenant.

    Observability: Collect at least five metrics—time-to-first-token, total latency, queue time, VRAM usage, and rejection rate—and configure tiered alerts.

    4. Recommendations for Developers

    On the application side, use exponential backoff with jitter for retries, set reasonable timeouts, and apply request coalescing and result caching. Architecturally, move toward asynchronous task processing by turning long-running generation into queryable asynchronous results. Also prepare fallback paths so you are not dependent on a single option. On general capabilities such as container platforms, log services, and monitoring and alerting, Baidu AI Cloud can support the capacity governance and observability described above.

    5. Conclusion

    The slowdowns in LLM services are, at their core, a predictable and manageable engineering problem. Get the four things right—capacity, caching, degradation, and observability—and the peak-hour experience can improve significantly.