Peak Throughput Assurance and Capacity Planning for LLM Inference

    This article covers how to keep LLM inference stable at peak load: aligning token/s and latency SLOs, converting traffic into replica capacity, balancing batching, caching, and routing, and using admission control plus observability so tail latency and error rates stay predictable.

    LLM inference is no longer a feature demo. Public updates often cite single-stream generation of 70–80 tokens/s at peak as an interactivity bar, and top services report weekly traffic in the tens of trillions of tokens. Those signals mean production systems must hold stable throughput, predictable latency, and bounded cost under real peaks. This piece does not discuss a specific product. It frames peak-throughput assurance as a general engineering problem: metrics, capacity, optimization, governance, and observability.

    Align metrics: tokens/s is not one number

    Without a shared definition, capacity plans systematically miss.

    • Single-stream output rate: tokens generated per second for one request. Peak 70–80 tokens/s belongs here and tracks interactive smoothness.
    • Aggregate throughput: total output tokens per unit time across all requests. High aggregate throughput does not imply fast single streams; batching can raise the former and hurt tail latency.
    • Time to first token (TTFT): time from request arrival to the first token. Long context, queues, and cold starts inflate it.
    • Tail latency: P95/P99 generation time, not the mean, should constrain capacity.
    • Error and timeout rates: throttling, queue overflow, and backend overload show up here first and must be watched with throughput.

    Define SLOs at the service edge, for example: peak P95 TTFT under a target, P99 output rate in a target band, error rate below a threshold. Only then are load tests, capacity models, and alerts reusable.

    From call volume to replica count

    Public weekly token volumes are demand signals, not capacity. Convert them using peak-to-average ratio, request mix, output length, and concurrency duration.

    A simplified planning path:

    1. Convert weekly tokens to average tokens per second.
    2. Apply a business peak-to-average ratio.
    3. Estimate peak output tokens/s from input/output distributions.
    4. Load-test effective output tokens/s per replica under the tail-latency target.
    5. Apply a safety factor and failure redundancy to get replica count.

    Illustrative pseudocode:

    1. function plan_replicas(peak_output_tps, replica_effective_tps,
    2. safety_factor=1.3, min_replicas=2):
    3. required = ceil(peak_output_tps * safety_factor / replica_effective_tps)
    4. return max(min_replicas, required)

    Use effective throughput at the tail-latency SLO, not lab peaks. Keep headroom and periodically replay production traffic to recalibrate peak-to-average. For bursty workloads, queues, priority, and autoscaling help, but scale-out has cold-start delay and does not replace base capacity.

    Inference-side tradeoffs: throughput, latency, cost

    Peak optimization is a combination of tactics.

    • Continuous and dynamic batching: merging requests raises aggregate throughput; oversized batch windows add wait. Cap batch size by SLO and split long vs. short requests.
    • KV and prefix cache reuse: multi-turn chat and fixed system prompts share prefixes. Track hit rate, eviction, and memory watermarks.
    • Quantization and operator fusion: lower compute and memory if quality holds on an eval set; do not optimize throughput alone.
    • Isolate long and short requests: long context consumes cache and compute; use separate pools or concurrency caps so they do not drag tails.
    • Tiered model routing: send complex work to larger services and keep cheaper paths for simpler requests.
    • Streaming: improves perceived TTFT but does not automatically raise total throughput; pair it with rate limits and timeouts.

    On cloud platforms, container autoscaling, logs and alerts, queues for smoothing, and object storage for load-test samples and eval data are generic building blocks. The requirement is to wire them to inference SLOs.

    Stability: bound overload instead of cascading

    The peak risk is unbounded queues, not slowness.

    • Ingress limits: concurrency and rate caps by tenant, API, and priority.
    • Queue and timeout: max wait; fail fast with retry-safe semantics.
    • Degradation: drop non-essential features, shorten context, or switch to a lighter path.
    • Backoff and circuit breaking: stop retry storms; isolate unhealthy backends.
    • Isolation and priority: separate core traffic from offline jobs; delay or reject low priority.

    Illustrative policy:

    1. if queue_wait_p95 > target_wait or error_rate > target_error:
    2. reject(low_priority_requests)
    3. route(short_context_requests, fast_pool)
    4. disable(non_essential_features)
    5. increase_retry_backoff()

    Validate limits under load so they neither clip healthy traffic nor fail to protect.

    Observability and capacity drills

    Track at least: single-stream tokens/s, aggregate token throughput, TTFT, P95/P99 generation time, queue length, concurrency, cache hit rate, compute utilization, errors and timeouts. Logs should keep request IDs, input/output length buckets, routing, and throttle reasons.

    Drills matter more than a one-shot test. Walk daily traffic → peak → peak plus failure → scale-out → degrade and recover. Record time-to-capacity, when limits fire, and tail-latency movement. Bind alerts to SLOs (for example, P99 output rate below the target band) rather than raw utilization.

    Landing checklist

    1. Standardize tokens/s, TTFT, tail latency, and error rates.
    2. Build peak-to-average and capacity models from real traffic.
    3. Measure per-replica effective throughput under latency SLOs.
    4. Configure batching, caching, long/short isolation, and model tiers.
    5. Ship rate limits, queues, timeouts, degradation, and circuit breakers.
    6. Run SLO dashboards, alerts, and capacity drills.
    7. Re-test throughput and tails after every release to catch regressions.

    Sustaining 70–80 tokens/s-class output at peak is not a single-model property. It is the product of metric design, capacity planning, inference optimization, overload control, and observability. At tens-of-trillions-of-tokens scale, treat peak throughput as a computable, testable, governable engineering target—not something inferred from averages.