Wei Zhang, Zhiyu Wu, Yi Mu, Rui Ning, Banruo Liu, Nikhil Sarda, Myungjin Lee, Fan Lai (UIUC / Google / Cisco Research) | 2025-04 | https://arxiv.org/abs/2504.20068 Category: framework | Tags: slo-aware, llm-serving, scheduling, goodput, agent-serving, length-prediction Read: 2026-04-18
首个面向多类型 SLO 的 LLM 服务调度系统——用"保守估计 + 在线精化"的方式处理未知的响应长度与依赖图,然后用 Grouped Margin Goodput Maximization (GMAX) 算法把"刚好够用的带宽"just-in-time 分配给每个请求,使 service goodput 相比 SOTA 提升 1.4× –6.3×,并给出常数竞争比(≈1/8.55)的可证明保证。
Motivation (为什么现在做):LLM 服务的请求类型正在从单一 chat 快速扩散到 三类 SLO 差异巨大的工作负载——latency-sensitive (TTFT/TBT)、deadline-sensitive (E2EL 截止时间)、compound (多阶段依赖,例如 multi-agent / deep research / test-time scaling)。现有调度器要么只看聚合吞吐 (vLLM FCFS, Sarathi-Serve),要么只看 mean E2EL (Autellix LAS, LTR SJF),作者在 Appendix D.1 中证明 SJF / EDF 对 goodput 的竞争比可以任意差。与此同时,精确预测响应长度和依赖图几乎不可能 (BERT/Llama3-based 预测器误差巨大)。
Method:JITServe 提出 JIT (Just-in-Time) 调度原则——允许信息不精确但可在生成过程中连续精化。系统由两部分组成:(1) Request Analyzer 用 Quantile Regression Forest (QRF) 预测响应长度的高分位上界 (7ms 推理,比 BERT 快 7×),每 50 个 token 重新调用以逐步收紧上界;对 compound 请求用 pattern graph + Gaussian-kernel 图相似匹配找历史相似执行图,按累积贡献比 $\phi(s)=t_{\leq s}/t_{\text{total}}$ 给每一阶段分配 sub-deadline。(2) GMAX scheduler 把每个请求建模为一个需要 $\text{bw}_\Delta(r) = \frac{t_\text{gen}(r)}{t_\text{rem}(r)}\cdot\Delta$ 带宽的"矩形",按 $\text{Priority}(r)=\text{goodput}(r)/t_\text{gen}(r)$ 排序,过滤得到 top-$p$ 候选后按 input length 滑动窗口 选出 batch size $B$ 的一组——前者保证 goodput,后者保证 batch 内长度同质以发挥 Flash Decoding 的效率。
Results:在 16×A100、Llama-3.1-8B/70B、Qwen2.5-14B、Qwen3-30B-MoE-A3B 上跑 Chatbot / Deep Research / Agentic CodeGen / Math Reasoning 混合工作负载 (>10K requests/run)。JITServe 相比 Sarathi-Serve / vLLM / Autellix / LTR 的 token-level goodput 提升 1.4× – 6.3×,或者在相同 goodput 下节省 28.5% – 83.2% 资源,且吞吐仅为 Sarathi-Serve 上限的 96–98%。距离 oracle (精确知道长度+依赖) 只差 3–9%。
client.responses.create(..., deadline=None, target_tbt=0.2, target_ttft=5, waiting_time=5)),QRF + graph matcher 通过 gRPC 异步 offload,元数据仅几字节/事件。
What it shows:论文开篇的"灵魂分类图"——把 LLM 服务请求分为 latency-sensitive (streaming chat,以 TTFT/TBT 衡量)、deadline-sensitive (单次 E2EL 截止,agent tool call)、compound (多阶段依赖 DAG,deep research / multi-agent)。
Why it matters:这是整篇论文的"问题定义"——一旦承认这三类共存、且在单一请求的生命周期内甚至会互相切换 ("thinking" → "streaming"),就无法再用单一调度目标 (throughput / mean E2EL) 覆盖,也就论证了 JITServe 的 necessity。
Detailed description:三行子图。第一行画一个 streaming chatbot,用户持续读取 token,重点标注 TTFT 和每个 token 之间的 TBT;第二行画一个 "LLM → external tool" 的单体请求,只要求整体 E2EL 在 deadline 前完成;第三行是 compound 的 DAG,若干 LLM/tool 节点之间有边,总 E2EL 决定整个 workflow 的 SLO。

What it shows:在混合工作负载上,Autellix (LAS/SJF 风格) 虽然把 mean E2EL 降下来了,但 SLO 违反率 > 90%;Sarathi-Serve (chunked prefill 优化 TBT) 则在 deadline-sensitive 上 TTLT 很大。
Why it matters:这张图是 motivation 的"铁证"——证明聚合指标改善并不等于 goodput 改善。也说明 Appendix D.1 里的理论结果 (SJF/EDF 非竞争性) 在真实系统上会真的 manifest。

What it shows:Request Analyzer (QRF length predictor + pattern-graph matcher) → SLO-Aware Scheduler (GMAX) → SLO Tracker,整个 loop 挂在 vLLM 上作为中间件,只加几行 API 代码。
Why it matters:理解 JITServe 架构的"一张图";特别是看清 Request Analyzer 是旁路的 (gRPC),Scheduler 是核心路径,Tracker 反馈到 Analyzer 用于在线精化。

What it shows:(a) QRF 推理 7ms,比 fine-tuned BERT 快 7×;(b) QRF 能随生成过程输出"从上到下"收紧的保守上界 (ratio → 1),而 BERT/Llama3 的点估计器会系统性低估。
Why it matters:这是论文最核心的"工具论证"——如果 QRF 不能给出可用的上界,整个 GMAX 的前提 (bw 估计) 就崩塌了。图 (b) 中红线 ratio=1 是 ground truth,QRF 的阴影区间始终在 ratio=1 上方下探。

What it shows:左图——每个请求 rectangle 的高度代表带宽需求 $\text{bw}_\Delta(r)$,在每个 frame $\Delta$ 内填入 $B$ 个 slot;右图——先按 Priority = goodput/t_gen 过滤出 top-$p$ 候选,再在候选集按 input length 排序用长度为 $B$ 的滑动窗口选出 sum(priority) 最大的那一组作为 batch。
Why it matters:GMAX 算法最直观的可视化,把"maximize goodput"和"batch 内长度同质"两个目标解耦为两步——第一步保 goodput 的下界 (top-$p$ 过滤),第二步在候选内部保 batch 效率 (滑动窗口)。正是这种解耦使得作者能在 Appendix D.2 证明出 $p$ 只引入 $p$ 的乘法损失。

What it shows:在一个 1 小时的 online serving trace 下,JITServe 的 service goodput 稳定在高位,而 vLLM / Sarathi-Serve 随时间累积 head-of-line blocking 导致 goodput 逐步退化。
Why it matters:这是论文的主结果图——说明 JITServe 不仅瞬时性能好,而且在长时间运行下不会出现 baseline 常见的"雪球"式 SLO 违反。

What it shows:JITServe 相比 JITServe\* (oracle,已知精确长度+依赖) 在各种 RPS 下只差 3–9%。
Why it matters:给出了"imprecise information 的成本上限"——即使把未来研究的预测器做到完美,goodput 也只能再涨 3–9%。这实际上限制了下游 length-prediction 类论文的价值空间。

What it shows:分别移除 Request Analyzer (退化为 avg length)、移除 GMAX (退化为 SJF using QRF estimates),goodput 都显著下降——两者缺一不可。
Why it matters:说明 JITServe 不是"用 QRF + 普通调度器就行"或"随便估计长度 + GMAX 就行"——两个组件乘性地贡献最终效果。
| Application | Real-Time (low TBT) | Direct Use (low E2EL) | Content-Based (mixed) |
|---|---|---|---|
| Code generation | 38.1% | 30.5% | 31.4% |
| Report generation | 39.1% | 36.2% | 24.7% |
| Deep research | 38.6% | 47.1% | 14.3% |
| Real-time translation | 36.2% | 39.9% | 23.9% |
| Batch data processing | 15.6% | 49.6% | 34.8% |
| Reasoning task | 28.9% | 47.4% | 23.7% |
Takeaway:即使在同一个应用内部,用户对 SLO 的偏好也显著分化——例如 code generation 中 38% 希望流式读取、30% 希望整体最快返回。这直接否决了"按应用分类 + 专用集群"的朴素方案。
| Workload | Type | Input Mean/Std/P50/P95 | Output Mean/Std/P50/P95 |
|---|---|---|---|
| Chatbot (Single) | latency | 93 / 244 / 27 / 391 | 318 / 313 / 225 / 1024 |
| Chatbot (Compound) | multi-stage | 1300 / 912 / 1097 / 2767 | 4458 / 1176 / 4417 / 6452 |
| Deep Research (Single) | deadline | 1911 / 2781 / 403 / 7573 | 534 / 644 / 410 / 1544 |
| Deep Research (Compound) | multi-stage | 12223 / 8407 / 10807 / 29282 | 3541 / 2370 / 3148 / 7525 |
Takeaway:Deep Research compound 请求的输入均值比 Chatbot single 的输出均值还大一个数量级——batch 内混合 chatbot 和 deep research 会产生极端的长度异质,这正是 GMAX 引入"滑动窗口按长度分组"的直接动机。
deadline/target_tbt/target_ttft。deadline/target_tbt/waiting_time 很可能被 OpenAI 风格 API 采纳。时代定位:2024–2025 年 LLM serving 的 low-hanging fruit (continuous batching / paged attention / chunked prefill / 分离 P-D) 已被 Orca / vLLM / DistServe / Sarathi-Serve 挨个摘走。下一阶段的核心矛盾从"系统吞吐"转向"应用级 goodput"——因为 agent / deep research / multi-agent 三类 workload 把 SLO 空间从一维 (TBT) 扩张到三维 (TBT × E2EL × compound-E2EL),单一调度目标已经不够用。JITServe 代表的就是"serving 进入深水区":从无视 SLO 的 FCFS/SJF 过渡到 SLO-aware + imprecise-info tolerant 的调度。
约束推导(为什么不能用更简单的方案?):
| 替代方案 | 能否 work | 失败原因 (first principles) |
|---|---|---|
| 按应用分专用集群 | ❌ | Table 1 显示同一应用内部用户 SLO 偏好分化到 38%/30%/31%,按应用分并不能消除 SLO 多样性;且请求在生命周期内会从 "thinking" (deadline) 切到 "streaming" (latency),跨集群迁移 KV cache 代价极高。 |
| EDF (earliest deadline first) | ❌ 任意差 | Appendix D.1.1 构造:一个高 goodput 长任务 A + N 个小而紧 deadline 的低 goodput 任务 B_i,EDF 会优先 B_i 导致 A miss SLO;竞争比 OPT/EDF = M/N 可任意大。 |
| SJF (shortest job first) | ❌ 任意差 | Appendix D.1.2 同类构造:SJF 系统性地偏好短任务,忽略 goodput value;竞争比同样发散。 |
| 精确预测长度后再调度 | ❌ 不可行 | Figure 5(b) 和 §2.2 给出证据:BERT/Llama3-based predictor 系统性低估;自回归生成 + 随机采样 + self-reflection 使得精确预测在信息论上几乎不可能。 |
| DP on request rectangles | ❌ 规模问题 | 文中提及 $DP(\mathcal{R}, t, B)$ 对上千请求 + 在线抢占不可扩展 (Figure 9 显示 GMAX 扩展到 thousands of requests,而 DP 无法)。 |
| 单纯用 QRF + SJF / LAS | ❌ 部分 | Figure 19 ablation 证明:仅去掉 GMAX (换成 SJF-on-QRF) 也会显著掉 goodput——预测精确不能补偿调度错误。 |
剩余可行设计空间:"保守的上界估计 + 基于 goodput/bandwidth 的启发式优先级 + batch 内部长度同质约束"——这正是 JITServe 占据的 niche。
核心技术壁垒:不是 QRF (现成工具),也不是 margin goodput 公式 (直观),而是 GMAX 的"两步解耦"——top-$p$ 过滤 + 滑动窗口分组。这种解耦是可证明竞争比的根源:作者在 Appendix D.2 证明 top-$p$ 引入的只是 $p$ 的乘法损失 (Eq. 50),而滑动窗口仅在候选集内部运作,不会把 priority 拖到 $p \cdot R(r_{(B)})$ 下方。其他任何"直接联合优化 goodput + length homogeneity"的写法都会破坏这个竞争比分析。
质疑假设:JITServe 的 QRF 预测只有 7ms 这个数字,前提是 QRF 在部署点已经训练好。作者没有披露 QRF 训练数据量、训练耗时、re-training 频率。对新模型 (Qwen3-MoE) 或新 application (未见过的 agent workflow) 下的 cold-start 精度是个未知数——这部分的 3-9% oracle gap 很可能会放大。此外,pattern-graph matching "500 graphs 足够" (Figure 7) 是在作者选取的 workload 上测得,对 deep research 这种图结构可以有 10+ stage 的应用是否仍成立存疑。
设计绑定批判:JITServe 强制绑定了 (a) 外部提供的 SLO——没有 deadline/target_tbt 就无法工作;(b) vLLM 风格的 continuous batching + chunked prefill——GMAX 的 frame 模型假设 batch size 在一个 $\Delta$ 内近似恒定,若换成 P-D 分离或大 chunk 预填,$\text{bw}_\Delta$ 的定义需要重写;(c) QRF 训练数据——对完全冷启动 (全新模型 + 全新应用) 没有兜底方案。
生态影响追踪:论文声称只需几行代码即可集成 vLLM,且 API 形式 (deadline=, target_tbt=) 与 OpenAI 现有 API 风格一致——这强烈暗示作者希望被 OpenAI / 云厂商吸收。截至 2025 Q2 尚未看到 vLLM / SGLang 主线 PR 采用此设计,但 AdaServe / Autellix / u-Serve 等后续论文已经把 JITServe 列为对照组,说明在学术圈已经成为新的 goodput baseline。

解读:Request arrival → Request Analyzer (1️⃣ QRF 预测 len_upper + pattern-graph match 依赖图) → SLO-Aware Scheduler (2️⃣ GMAX) → Execution Backend (vLLM engine, chunked prefill + continuous batching) → SLO Tracker 监测真实生成速度并反馈给 Analyzer 用于 online refinement。
Control plane vs data plane separation:Request Analyzer (QRF + graph matcher) offloaded 到独立进程,通过 gRPC 与主调度器通信;元数据仅几字节/事件。Scheduler 本身是 vLLM scheduler layer 的 policy module 扩展 (data plane 内),但用 priority cache 摊薄计算。
Stateful components:(1) SLO Tracker (per-request actual generation speed);(2) Request Analyzer 中的 pattern-graph 历史库 (K-medoids 聚类 + 0.9/hour 衰减);(3) Scheduler priority cache。
Stateless components:QRF 推理本身 (given prompt → quantile);GMAX 决策函数 (given request set + priorities → batch)。
Failure handling:作者只提到 monitoring daemon 跟踪 component liveness + 周期性 checkpoint metadata,未深入讨论 GPU/node failure 的 mid-request recovery。
| Stage | Input → Output | Location | Latency | Data format |
|---|---|---|---|---|
| Tokenize | text → token IDs | CPU (vLLM frontend) | <1ms | List[int] |
| Request Analyze | prompt + history → len_upper, graph_sig, priority | 独立 CPU 进程 (gRPC) | ~7ms QRF + <5ms graph match | 几字节/event |
| GMAX Schedule | request queue + priorities → batch of $B$ | main scheduler (CPU) | <1ms (priority cache 摊薄) | in-memory struct |
| Prefill/Chunked Prefill | tokens → KV cache | GPU HBM | O(input_len²) | [layers, heads, seq, dim] fp16/bf16 |
| Decode | KV cache + last token → next token | GPU HBM | O(batch × layers) per token | logits [vocab_size] |
| SLO Track | actual token output → per-req speed update | CPU | <1ms | scalar per req |
| Refine | every 50 tokens trigger QRF re-call | CPU (gRPC async) | ~7ms | 新 len_upper |
见上文 0. 时代定位与约束推导 中的 feasibility matrix 和核心技术壁垒分析。
Assumption audit(补深):
| Innovation | Mechanism | Benefit | Cost / Tradeoff |
|---|---|---|---|
| QRF upper-bound length prediction | Quantile Regression Forest,每 50 token re-invoke | 7ms/次,比 BERT 快 7×;不会低估 | 需要离线训练 QRF;对 cold-start 未量化 |
| Pattern-graph matching | K-medoids 聚类 + Gaussian-kernel 相似 + 0.9/hour 衰减 | <5ms for 500 graphs,准确率 > 80% | 对真正 novel workflow 退化 |
| Margin goodput priority | Priority(r) = goodput(r) / t_gen(r) | 对 $\Delta$ 不敏感;可证明竞争比 | 需要 goodput(r) 的 closed-form 定义 |
| GMAX two-step (filter + window) | top-$p$ 过滤 + input-length 滑窗 | 同时保 goodput 下界 + batch 效率;可证明 $p$ 损失 | 候选集大小受 $p$ 影响,$p$ 需调 |
| $(1+\delta)$ preemption threshold | 只有 goodput ratio > $1+\delta$ 才抢占 | 抢占链长有限(几何级数收敛) | $\delta$ 过小→抢占风暴;过大→ goodput 损失 |
| Starvation-avoid additive $\delta$ | 每帧给 goodput(r) 加常数 | 长等请求最终升到顶 | 可能让 best-effort 请求也消耗 bandwidth |
Priority = goodput/t_gen,每帧重算。| Scenario | Workload | SLO | 主瓶颈 | 为何其他系统失败 |
|---|---|---|---|---|
| Chat streaming | 短输入短输出,高并发 | TTFT<2s, TBT~100ms | scheduling-bound (HOL blocking) | vLLM FCFS 被长请求堵塞 |
| Agent tool call | 中长输入,一次输出 | E2EL<20s | length-prediction bound | Autellix SJF 用错预测器 |
| Deep research (compound) | 长输入长输出,多阶段 | E2EL=20×#stages | compound-deadline 分配 | 现有系统无 sub-deadline 概念 |
| Math reasoning | 长 thinking + 短 final | 混合 deadline→latency | 请求类型切换 | 静态分类无法处理 |

解读:JITServe (紫) 在 1h trace 上保持平稳高 goodput;LTR/Sarathi-Serve/Autellix 都在累积 HOL blocking 后缓慢下滑。这直接证明 scheduling-bound 是四个系统在混合 workload 下的共同瓶颈,JITServe 是唯一能持续抑制它的系统。
| Metric | Definition | Unit | Direction |
|---|---|---|---|
| Token-level goodput | # tokens meeting SLO | tokens/s | ↑ |
| Request-level goodput | # requests meeting SLO | reqs/s | ↑ |
| TTFT / TBT | time-to-first-token / time-between-tokens | ms | ↓ |
| E2EL (TTLT) | time-to-last-token | ms | ↓ |
| Throughput (system) | all tokens/s (ignores SLO) | tokens/s | ↑ (not primary) |
| Resource saving | GPU hrs to hit same goodput | % | ↑ |
| Optimization | Metric | Baseline | JITServe | Improvement | Conditions |
|---|---|---|---|---|---|
| Full JITServe | token-goodput | Autellix | 5.3–6.1× | 5.3×+ | 16×A100, 1h online |
| Full JITServe | token-goodput | LTR | 1.3–1.7× | 1.3×+ | 同上 |
| Full JITServe | request-goodput | LTR | 2.3–4.5× | 2.3×+ | 同上 |
| Full JITServe | vs oracle JITServe\* | 3–9% gap | - | near-oracle | across RPS |
| No Request Analyzer | token-goodput | full JITServe | 显著下降 | ablation | Figure 19 |
| No GMAX | token-goodput | full JITServe | 显著下降 | ablation | Figure 19 |
| Full JITServe | throughput | Sarathi-Serve | 96–98% | 无退化 | Figure 14 |
| Full JITServe | multi-replica goodput | baseline | 1.34–2.42× | scalable | Figure 20 |
| Full JITServe | latency-only workload | Sarathi-Serve | 1.72× | 在其强项上也赢 | Figure 22 |
vLLM FCFS: scheduling-bound (HOL blocking)
→ Sarathi-Serve: scheduling-bound (TBT good, TTLT bad)
→ Autellix LAS: scheduling-bound (mean E2EL good, SLO violation 90%+)
→ JITServe: SLO-estimation bound (3–9% gap to oracle)
JITServe 实际上把 bottleneck 从"调度策略错误"推到了"信息完美性"——而 oracle 上限表明再改进只剩 3–9% 空间。

解读:在 4 个不同 RPS 上,JITServe (实线) 紧跟 JITServe\* (虚线,oracle),gap 3–9%。这证明作者关于"imprecise information is actionable enough"的论断在实验上站得住。

解读:从左到右 — JITServe\* (oracle) / JITServe (full) / no-Analyzer / no-GMAX / Sarathi。移除任一组件掉 goodput 都很明显,且剩下的性能接近 Sarathi,说明 QRF+graph matcher 与 GMAX 是相互必需的。
client.responses.create(model, input, deadline=None, target_tbt=0.2, target_ttft=5, waiting_time=5)。| Layer | Impact |
|---|---|
| Algorithm | 激活 goodput-aware online scheduler 研究方向;pattern-graph 为 agent training 系统做 sub-deadline 分配提供模板。 |
| Kernel | 无新 kernel 需求;但暴露"混长 batch 比长度同质 batch 慢"的现象,为未来长度感知 attention kernel 提供动机。 |
| LLM | 不挑模型(dense + MoE 都测过);但要求响应长度可用 QRF 预测——高度创造性输出 (open-ended generation) 上 QRF 精度待测。 |
| Agent | 最大增量——为 multi-agent / deep research 框架提供了原生的 E2E deadline management。 |
| Ops | API 风格可直接进现有 OpenAI 生态;监控 daemon + metadata checkpoint 基本满足生产需求,但缺 autoscaling hook。 |
| Feature | JITServe | vLLM | Sarathi-Serve | Autellix | LTR |
|---|---|---|---|---|---|
| Continuous batching | ✓ (inherit) | ✓ | ✓ | ✓ | ✓ |
| Paged attention | ✓ (inherit) | ✓ | ✓ | ✓ | ✓ |
| Chunked prefill | ✓ (inherit) | ✗ | ✓ | ✗ | ✗ |
| SLO-aware scheduling | ✓ (multi-type) | ✗ FCFS | ✓ (TBT only) | ✗ (mean E2EL) | ✗ (rank-SJF) |
| Length prediction | ✓ QRF 上界 | ✗ | ✗ | ✗ | ✓ 点估计 |
| Compound/agent deadline | ✓ pattern graph | ✗ | ✗ | 部分 (LAS) | ✗ |
| Provable competitive ratio | ✓ ~1/8.55 | ✗ | ✗ | ✗ | ✗ |
| Multi-node | data-parallel replicas | ✓ | ✓ | ✓ | 未强调 |
| Preemption-aware | ✓ ($\delta$=10%) | ✗ | ✗ | ✓ | ✗ |
deadline= 类 SLO 参数进入 OpenAI-style API 规范的概率较高。Priority = goodput/t_gen 公式。