Beyond Prediction: Tail-Aware Scheduling for LLM Inference
This paper introduces a distribution-aware, prediction-free scheduling framework that uses soft priority boosting and cache-aware preemption to significantly reduce tail latency and time-to-first-token in LLM inference, outperforming traditional prediction-based policies even under challenging conditions like bursty arrivals and GPU memory pressure.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine a busy restaurant kitchen where chefs (the GPUs) are cooking meals for customers (the AI requests). Some orders are simple: "Just a glass of water" (a short chat message). Others are complex: "Design a 50-page novel with a detailed plot" (a long reasoning task).
The problem is that the kitchen manager doesn't know how long any order will take until it's almost done. A "glass of water" might turn into a "10-course tasting menu" if the customer keeps asking for more.
The Old Way: Guessing the Future
Current kitchen managers try to be efficient by guessing how long each order will take. They use a strategy called "Shortest Job First" (SJF).
- The Logic: "I think this order will be quick, so I'll cook it first to get it off the table."
- The Flaw: If the manager guesses wrong (which happens often with complex AI tasks), the quick order gets delayed, and the long order that was supposed to be "short" ends up hogging the stove forever.
- The Result: The average wait time looks okay, but the worst-case wait times (the tail latency) are terrible. Some customers wait hours while others get served in seconds. This is bad for user experience.
The New Way: The "Boost" System (UNIBOOST)
The authors of this paper propose a new manager who stops guessing and starts observing. They call their system UNIBOOST.
Here is how it works, using simple analogies:
1. The "Soft Boost" (No Crystal Balls Needed)
Instead of trying to predict the future, the new manager gives every order a "priority score" that changes smoothly over time.
- The Analogy: Imagine a line of people waiting for a ride. The new manager doesn't ask, "How far are you going?" Instead, they say, "The longer you've been waiting, the more your ticket gets a little 'boost' in priority."
- How it helps: Short orders get served quickly because they arrive first. But if a long order has been waiting a while, it gets a gentle nudge forward so it doesn't get stuck behind a never-ending stream of new, short orders. This prevents the "long tail" of customers from waiting forever.
2. The "Memory Guard" (Don't Waste the Pan)
In AI, cooking a meal requires a lot of memory (the "KV cache"). If you stop cooking a meal halfway through to switch to a new one, you have to throw away the ingredients you just prepped and start over. This is expensive and slow.
- The Analogy: Imagine a chef is halfway through baking a huge cake. If the manager yells, "Stop! Cook a cookie instead!" the chef has to scrape the cake batter off the pan, wash it, and start the cookie. Then, if they switch back, they have to wash the pan again.
- The Solution: The new manager uses a "Memory Guard." They say, "Once you start cooking a cake, you must finish at least a 'slice' of it before we even consider switching." This prevents the kitchen from constantly switching tasks and wasting time cleaning pans.
3. The "Adaptive Thermostat"
The kitchen conditions change. Sometimes it's a rush of small orders; other times, it's a few massive orders.
- The Analogy: The manager has a smart thermostat that watches how long people are actually waiting. If the line gets too long, the manager automatically adjusts the "boost" settings to be more aggressive about helping the people who have been waiting the longest. It learns on the fly without needing a crystal ball.
The Results
The paper tested this new system against the old "guessing" systems using real-world data (like coding tasks and chat conversations).
- The Old Systems: When the workload got crazy (bursty), the "guessing" systems failed. The worst-case wait times (P99) got huge.
- The New System (UNIBOOST): It didn't just improve the average wait time; it drastically cut the worst wait times.
- It reduced the worst-case wait time (P99) by 35% to 50% compared to the best "perfect prediction" systems.
- It made the first token appear (TTFT) 34% to 47% faster.
The Bottom Line
The paper argues that trying to predict how long an AI task will take is fragile and often wrong. Instead, a system that reacts to how long tasks have been waiting, while being careful not to waste memory by switching tasks too often, creates a much fairer and faster experience for everyone. It's about managing the flow of the line, not guessing the destination.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.