Introduction
Large Language Model (LLM) inference operates in two distinct stages: Prefill (processing the input prompt, which is compute-bound) and Decode (generating tokens sequentially, which is memory-bandwidth bound). To maximize GPU utilization, modern inference engines like vLLM and SGLang rely on Mixed Batching (MB). By interleaving these two phases in a single batch, MB theoretically allows the GPU to use idle compute units for prefills while waiting for memory during decoding.
However, this paper reveals a critical limitation in the industry-standard MB approach: on bandwidth-constrained GPUs, co-locating prefills and decodes creates severe "prefill-decode interference." This contention can actually degrade system performance, making it slower than processing one phase at a time.
The Bandwidth Bottleneck
The efficiency of Mixed Batching is highly dependent on hardware capabilities. On a high-bandwidth GPU like the NVIDIA H200 (4.8 TB/s), MB remains efficient until decode tokens make up 80% of the batch. However, on a bandwidth-constrained GPU like the RTX PRO 6000 (1.792 TB/s), this threshold plummets to just 20%.
Kernel profiling identifies the root cause of this interference: while matrix multiplication (GEMM) times remain stable, Attention computation time explodes when prefills and decodes are mixed on limited-bandwidth hardware. This phenomenon explains why some large-scale deployments favor Exclusive Batching (EB)—executing only one phase at a time—to avoid massive memory contention.
Methodology: From Heuristics to Mathematics
To move beyond manual scheduling heuristics, the researchers developed a comprehensive mathematical framework to optimize batching strategies:
- The Crossover Condition: The authors derived a closed-form equation to determine exactly when EB outperforms MB. This condition balances the marginal-cost gap (how much interference slows down the batch) against the fixed-cost advantage (MB requires fewer kernel launches).
- Adaptive EB ($EB(\hat{k}^*)$): For exclusive batching, they designed a scheduler that optimizes the "phase-switching threshold." Using a fluid approximation model, it calculates the optimal number of idle slots ($k$) to wait for before halting the decode phase to initiate a new prefill batch.
- Hazard Rate Estimation: Real LLM requests exhibit an Increasing Failure Rate (IFR)—the longer they run, the more likely they are to finish soon. By tracking these hazard rates, the scheduler can wait longer for completions before switching phases, effectively amortizing the fixed costs of the prefill phase.
- The $EB^+$ Hybrid Scheduler: The culmination of this research is an online controller that monitors traffic and hardware profiles in real-time. It uses the crossover condition to dynamically switch between MB and EB modes without human intervention.
Evaluation and Key Results
The system was evaluated using diverse real-world workloads (ShareGPT, LongBench, NuminaMath, WildChat) across various model architectures, including Qwen3 (8B and 30B MoE), Llama-3.1-8B, and Gemma-3-1B-IT.
- Throughput Gains: The optimized $EB(\hat{k}^*)$ scheduler achieved up to 41.9% higher throughput on the bandwidth-constrained L40S GPU compared to a vLLM mixed-batching baseline.
- Dynamic Robustness: Under non-stationary traffic—where request lengths or concurrency shift suddenly—the $EB^+$ hybrid scheduler outperformed MB by up to 36.4%.
- Latency Balance: $EB^+$ successfully delivers the best of both worlds. It matches MB’s low Time-to-First-Token (TTFT) during light traffic and seamlessly switches to EB’s superior Time-Per-Output-Token (TPOT) when the system becomes saturated.
- MoE Sensitivity: Mixture-of-Experts (MoE) models, which have massive weight footprints, proved even more susceptible to bandwidth contention, making optimized scheduling critical for their deployment.
Limitations and Future Work
While highly effective, the current mathematical model primarily targets "saturated" regimes where a constant backlog of requests exists. Performance in very low-load, highly latency-critical scenarios may require different tuning. Additionally, the core theory is built for single-GPU deployments. Future directions include integrating this threshold-based logic with sequence and pipeline parallelism, and developing tighter Service Level Objective (SLO)-aware switching mechanisms.
Summary updated