Abstract
This paper bridges the gap between classical queueing theory and modern AI infrastructure. It explores how machine-learning predictions of job sizes can optimize scheduling in standard queues and addresses the unique, memory-constrained challenges of scheduling Large Language Model (LLM) inference and compound AI systems.
Introduction
In traditional queueing theory, scheduling is often a binary choice: we either assume perfect knowledge of task durations (enabling optimal "Shortest Remaining Processing Time" scheduling) or we assume no knowledge at all (defaulting to First-Come, First-Served). However, the rise of LLM serving introduces a middle ground characterized by noisy predictions. While we can estimate the length of a prompt's response, these guesses are inherently uncertain. Furthermore, LLMs introduce hardware-specific constraints—such as KV cache memory footprints and two-phase processing—that standard theory fails to capture.
Scheduling with Noisy Predictions
The authors explore several algorithmic frameworks designed to leverage ML-generated estimates. Key among these are SPRPT (Shortest Predicted Remaining Processing Time) and SPJF (Shortest Predicted Job First). To analyze these, the paper utilizes the SOAP Analysis framework, which evaluates "age-based" scheduling policies where a job's priority (or rank) evolves as it receives service.
A critical insight is that predicting "long" jobs is mathematically more valuable than perfectly predicting "short" ones. In a queue, a single mispredicted long job can cause Head-of-Line blocking, stalling many shorter tasks. Consequently, schedulers must be robust to prediction errors, particularly for tasks that exceed their estimated duration.
The LLM Serving Frontier
LLM inference presents unique challenges that distinguish it from general computing tasks:
- The KV Cache: Storing intermediate states requires massive GPU memory that grows with generation length.
- Two-Phase Processing: Requests alternate between a compute-heavy "prefill" phase and a memory-bandwidth-bound "decode" phase.
- The Prediction Cost Paradox: If the compute cost of predicting a job's size is too high, the system may be more efficient simply running the job without a prediction.
To address these, the paper highlights the Trail algorithm. Trail uses internal model probes to predict output length and strategically disables preemption once a job reaches a certain "age" to protect the system from the high cost of re-allocating large KV caches.
Key Results and Insights
Empirical evaluations demonstrate that incorporating predictions, even noisy ones, leads to substantial performance gains. Using predicted service times (SPRPT) significantly outperforms FIFO across various system loads (λ).
Specific LLM optimizations also show dramatic improvements:
- The Trail algorithm reduced mean latency by up to 2.01x and mean time-to-first-token by up to 24x compared to standard vLLM serving.
- The LAMPS system, which manages memory for LLMs making external API calls, improved end-to-end latency by 27% to 85%.
Open Problems and Future Work
The paper concludes by identifying several gaps in current research. Most mathematical proofs are currently limited to single-server systems; extending these to multi-server "supermarket" models is essential. Additionally, the emergence of "reasoning" models (like DeepSeek-R1) introduces new layers of unpredictability, as task size is determined by the depth of a reasoning tree rather than simple token counts. Developing formal queueing theory for these self-correcting, path-exploring systems remains a major open challenge.
Summary updated