TL;DR
Serving Large Language Models (LLMs) at scale is like running a grocery checkout line where you have no idea how many items are in anyone’s cart, and some carts randomly expand to block the entire aisle. SageSched fixes this bottleneck by predicting the probability distribution of how long a response will take, modeling both compute and memory costs under one unified equation, and borrowing an optimal queuing strategy from bandit theory. The result is an over 28.7% drop in end-to-end completion latency without needing to train bulky auxiliary predictors.
What Problem Does This Paper Address?
When hundreds of users hit an LLM server simultaneously, a scheduler has to decide which requests go first to minimize overall wait times—specifically Time-to-Last-Token (TTLT), which is critical when downstream software agents or robots are waiting on a complete answer before acting.
Traditional operating system schedulers have it comparatively easy: standard workloads usually have predictable CPU demands. LLMs break those rules in two ways:
- Demand Uncertainty: Because LLMs generate text token-by-token, you don't know if a prompt will yield 10 tokens or 1,000. Even the exact same prompt can produce wildly different lengths across runs.
- Demand Hybridity: LLMs aren't just compute-hungry; they are memory-hungry. To avoid recalculating past tokens, frameworks store conversation state in GPU memory (the KVCache). A prompt with huge input context might finish generating quickly, yet hog so much memory that other jobs can't run concurrently.
Standard frameworks like vLLM use First-Come-First-Serve, causing short requests to get stuck behind massive ones. Newer schedulers try to approximate "Shortest-Job-First" by training small neural networks to guess the output length. However, training custom predictors for every LLM is tedious, predicting a single number throws away vital probability data, and looking only at output token counts ignores memory bottlenecks entirely.
Methods
SageSched replaces heuristics and heavy predictor models with three lightweight, mathematically grounded components built atop vLLM:
- Semantic-Aware History-Based Predictor: Instead of training a neural network to guess a single token length, SageSched keeps a sliding FIFO window of the last 10,000 completed requests. When a new prompt arrives, it extracts a quick semantic embedding and uses vector search (FAISS) to find past prompts with a cosine similarity above 0.8. The historical output lengths of these neighbors directly form a predicted output-length probability distribution—zero offline training required.
- Resource-Bound-Based Cost Modeling: Rather than counting output tokens ($O$) alone, the authors analyze the physics of GPU bottlenecks. Whether a server is memory-bound (throttled by KVCache space) or compute-bound (throttled by attention math), the cumulative resource-time footprint of a decoding request with input length $I$ and output length $O$ follows the exact same mathematical shape: $\mathcal{C} = \frac{O^2}{2} + IO$.
- Uncertainty-Aware Gittins Scheduling: How do you rank jobs when their costs are probability distributions rather than fixed numbers? Taking the simple average isn't optimal. The authors frame scheduling as a multi-armed bandit problem and compute each request's Gittins index—a classic mathematical metric representing the best possible ratio of expected service cost to completion probability. Requests with the lowest Gittins index go first, and active jobs have their indices periodically refreshed across 200-unit cost buckets to allow smart, thrash-free preemption.
Datasets
No new benchmarks are introduced. Instead, the authors evaluate SageSched using three established datasets selected to represent vastly different input-output profiles:
- ShareGPT: General conversational chat prompts.
- Alpaca-Summarization: Long input contexts paired with shorter, summarized outputs (very memory-heavy).
- Document-Write: Short prompts that trigger long, drawn-out text generation (compute-heavy).
To simulate realistic traffic spikes alongside synthetic Poisson arrivals, they also test request arrival patterns using the real-world BurstGPT trace.
Key Insights and Ideas
- Compute and memory bottlenecks share an identical equation: You might expect a scheduler to constantly flip switches depending on whether GPU memory or compute FLOPS are maxed out. Surprisingly, because attention compute time scales linearly with sequence length per step just like KVCache memory footprint does, integrating either over the decoding lifetime yields $\frac{O^2}{2} + IO$. One formula rules both regimes.
- Averages lie when distributions are skewed: If Request A takes ~850 cost units consistently, and Request B has a slightly higher average (~907) but has a massive probability spike of finishing almost immediately, prioritizing Request B actually lowers average cluster latency. The Gittins index naturally captures this upside; simple mean-based schedulers miss it.
- Prompt similarity mirrors length distribution: You don't need to emulate auto-regressive decoding to predict how windy an LLM will be; prompts that mean similar things statistically cluster into remarkably similar output-length distributions.
Key Results
Tested on Llama3.1-8B (A40 GPU) and Qwen3-32B (H800 GPU), SageSched consistently outperforms five baselines (FCFS, FastServe, SSJF, LTR, and TRAIL):
- Latency Reduction: Under heavy load (8 requests/sec on Qwen3-32B), SageSched cuts average TTLT by 28.7% compared to the runner-up (TRAIL), while simultaneously keeping Time-to-First-Token (TTFT) low by eliminating head-of-line blocking.
- Long-Context Dominance: On the memory-intensive Alpaca dataset, SageSched’s advantage peaks, beating baselines by 1.55x to 3.36x in average TTLT because competing schedulers ignore the massive input prompt's KVCache footprint.
- Tiny Overhead: Prediction takes under 0.5 ms per request (versus ~3.6 ms plus hours of offline training for BERT-based predictors). In 64-GPU cluster simulations, total scheduling overhead grows linearly and stays around a negligible 100 ms for multi-second inference jobs.
Limitations and Future Work
While the paper does not include a formal limitations section, a few operational assumptions and boundaries are noted in the design:
- Cold-Start Reliance: Because the predictor relies on a 10,000-request history window, sparse or cold-start phases without enough high-similarity matches ($\ge 0.8$) require falling back on augmented public datasets to populate the search space.
- Decode-Centric Costing: The unified cost formula focuses on the auto-regressive decoding phase (where modern reasoning LLMs spend most of their time) and intentionally omits constant Feed-Forward Network (FFN) compute times, which only amortize cleanly during long decodes or large batch sizes.
- Hyperparameter Tuning & Scaling: System stability relies on balancing the Gittins bucket refresh size (too small causes rescheduling overhead; too large stales priorities). For massive clusters beyond 64 nodes, the authors suggest deploying multiple concurrent schedulers to keep queuing latency flat.
Summary updated