# LLM Inference Compute Bottlenecks: Root Causes and Elastic Scheduling in Practice

    For a while now, large-model chat and agent services have been flashing messages like "Compute is tight — switching to fast mode" during peak hours. To end users that is just a downgrade notice; for the platform team it is capacity planning and scheduling policy laid bare. This article explains why LLM inference actually runs short of compute — the two-phase nature of generation, the compute-versus-memory tradeoff of MoE architectures, and the request fan-out of multi-agent workloads — and then walks through the operational practices that address it: capacity planning with real traffic distributions, metric-driven autoscaling, graceful degradation, per-GPU efficiency techniques such as continuous batching and prefix caching, and the observability needed to make scheduling decisions defensible. If you operate inference at scale, you will come away with a concrete playbook for turning peak-hour outages into smooth degradation and fast recovery while keeping cost under control.

    1. Behind the Symptom: Why LLM Services Run Out of Compute

    Many large-model chat and agent services have recently started showing messages such as “Compute is tight — switching to fast mode” during peak hours. For end users, that is just a downgrade notice. For the platform team, it is a concentrated exposure of capacity planning and scheduling strategy. To understand it properly, you first need to break down the real resource profile of LLM inference.

    1.1 The Two Phases of Inference

    Autoregressive generation splits into two phases, and their bottlenecks are completely different:

    • Prefill: processes all input tokens in one pass. It is compute-bound, highly parallelizable, and consumes mostly GPU compute.
    • Decode: generates one token per step. Each step computes a single new token but repeatedly reads the KV cache, so it is memory-bound and constrained primarily by memory bandwidth.

    If you try to absorb both workloads with one fixed resource configuration, long-context requests will either saturate compute or exhaust memory. Many cases of inference “suddenly getting slow” are fundamentally the same problem: memory-bound decode traffic packed into a resource pool whose compute budget was already insufficient.

    1.2 The Compute–Memory Ledger of MoE Architectures

    Mixture-of-Experts (MoE) uses sparse activation so that each token passes through only a subset of expert networks, reducing the compute cost of a single forward pass. The cost does not disappear; it just moves:

    • Total parameter count determines memory footprint, while activated parameter count determines per-request compute. The two must not be conflated.
    • All-to-all communication introduced by expert routing, together with load imbalance, adds extra latency and idle compute.
    • When highly concurrent requests happen to route to a few “hot experts,” local compute becomes the first bottleneck.

    A model that is “bigger but sparser” is therefore not free. It shifts pressure from pure compute onto memory, bandwidth, and routing.

    1.3 Request Fan-Out Under Multi-Agent Concurrency

    When a system schedules dozens or even hundreds of sub-agents to collaborate in parallel, a single user turn is amplified into tens of backend inference calls. This fan-out makes the concurrency curve far steeper than in ordinary chat: peak-to-trough swings on a complex task can span one to two orders of magnitude. Teams used to a simple “one question, one answer” capacity model tend to get completely overwhelmed here.

    2. Capacity Planning: Turning “Uncertainty” into Something Predictable

    Insufficient compute is first a planning problem, not a transient failure. Sound capacity planning involves at least four steps:

    1. Traffic profiling: distinguish average QPS from peak QPS, and pay particular attention to the share of long-context and complex agent tasks, since they consume several times the compute of ordinary chat.
    2. Load-test calibration: test with requests that match the real distribution rather than idealized short requests, and measure throughput plus the time-to-first-token (TTFT) and time-per-output-token (TPOT) curves of a single GPU across different sequence lengths.
    3. Watermark design: leave headroom and avoid running at sustained utilization above 90% — once a traffic spike lands on top of that, queueing degrades exponentially.
    4. Cost–SLA tradeoff: decide which requests aim for “fastest and most complete” and which can accept “fast enough and good enough,” which gives you a basis for tiered service.

    3. Elastic Scheduling: Making Resources Scale with Traffic

    Static resource pools cannot match steep load curves, so elastic scaling is standard. The core is striking a balance between scaling speed and resource cost:

    • Metric-driven scaling: scale on queue length, GPU utilization, and TTFT percentiles. These track inference load far better than CPU alone.
    • Cold-start management: slow model weight loading is a long-standing pain point in elastic inference. Warm instances, a minimum resident replica count, and locality-aware caching of images and weights all shorten scale-out latency.
    • Heterogeneous and mixed deployment: place high-priority interactive requests on low-latency resources, and shift offline batch work to more economical resources during off-peak windows.

    An illustrative autoscaling policy (pseudocode):

    1. autoscaling:
    2. min_replicas: 2 # Baseline capacity to absorb spikes
    3. max_replicas: 40
    4. metrics:
    5. - name: queue_wait_p95_ms
    6. target: 800 # Scale out once queue wait crosses the threshold
    7. - name: gpu_utilization
    8. target: 0.75 # Keep headroom; do not run flat out
    9. cooldown_seconds: 120 # Cooldown period to avoid flapping
    10. scale_up: aggressive # Scale out fast and hard
    11. scale_down: conservative # Scale in slowly and steadily

    4. Graceful Degradation: Where “Fast Mode” Comes From

    The “switching to fast mode” message quoted earlier is a textbook implementation of graceful degradation. The goal is not to refuse service but to preserve availability when resources are tight. Common techniques include:

    • Tiered model routing: assess request complexity on arrival and, at peak, route low-to-medium difficulty requests to smaller, faster models to free compute for high-value requests.
    • Rate limiting and queueing: smooth bursts with mechanisms such as token buckets and give users explicit queue feedback instead of letting things avalanche.
    • Result caching: reuse existing results for highly similar requests to cut backend inference calls outright.

    An illustrative tiered routing function (pseudocode):

    1. def route(request, cluster_state):
    2. # When resources are tight, pick the model tier by request complexity
    3. if cluster_state.utilization > 0.85:
    4. if request.estimated_complexity < SIMPLE_THRESHOLD:
    5. return dispatch(request, model="small-fast") # Fast mode
    6. else:
    7. return enqueue_with_feedback(request) # Queue with feedback
    8. # When resources are ample, use the more capable default model
    9. return dispatch(request, model="default-capable")

    The key principle: degradation must be predictable, explainable, and reversible. Once utilization drops, the system should switch back to full capability automatically rather than leaving users stuck in a degraded state.

    5. Improving Per-GPU Utilization: Getting More from Every Unit of Compute

    Scaling out has a hard cost ceiling, so improving efficiency per unit of resource is often the better investment:

    • Continuous batching: swap requests in and out dynamically instead of waiting for a whole batch to finish, keeping the GPU busy throughout the decode phase and substantially raising throughput.
    • Prefix caching: compute and cache the KV for shared prefixes such as system prompts and long documents once; later requests that hit the cache skip the repeated prefill.
    • Quantization and distillation: where accuracy allows, low-bit quantization reduces memory and bandwidth pressure, and the freed resources translate into higher concurrency.
    1. # The core of prefix caching: hash the content as the key, skip duplicate prefill on hit
    2. cache_key = hash(system_prompt + shared_context)
    3. if prefix_cache.hit(cache_key):
    4. kv = prefix_cache.get(cache_key)
    5. output = model.decode(new_tokens, kv_cache=kv) # Only compute the new part
    6. else:
    7. output = model.generate(system_prompt + user_input)
    8. prefix_cache.put(cache_key, output.kv_prefix)

    6. Observability: Scheduling Cannot Fly Blind

    Both elasticity and degradation depend on accurate real-time signals. Without observability, any policy is guesswork. At minimum, cover three capabilities:

    • Monitoring and alerting: tiered alerts on TTFT, TPOT, queue length, GPU and memory utilization, and hot-expert distribution.
    • Logging: structurally record each request’s model tier, token counts, routing decision, and degradation reason, so incidents can be attributed after the fact.
    • Distributed tracing: in agent scenarios, trace every hop of the request fan-out to quickly find which subtask is dragging down overall latency.

    If you are building on cloud infrastructure, you can reuse mature general-purpose building blocks: a container platform to run elastic inference instances, monitoring and logging services for observability, object storage to hold model weights and result data, and a message queue to smooth peaks for asynchronous batch jobs.

    7. Best Practices Checklist

    • Load-test with the real request distribution, separate average from peak, and never size capacity from idealized data.
    • Tier requests by value and reserve compute headroom for high-value ones.
    • Use autoscaling to absorb peak-to-trough swings while actively managing cold-start latency.
    • Treat graceful degradation as a first-class, explainable, auto-recovering feature rather than a temporary patch.
    • Continuously raise per-resource efficiency through continuous batching, prefix caching, and quantization.
    • Close the loop with monitoring, logs, and tracing so every scheduling decision has evidence behind it.

    Insufficient compute is never a single-technology problem. It is the combined result of capacity planning, scheduling strategy, resource efficiency, and observability. Once you understand the resource characteristics of LLM inference and add layered elasticity plus graceful degradation, your team can turn peak hours from frequent outages into smooth degradation and fast recovery — at a controlled cost.