arXiv:2504.07347stat.MLcs.LG2025-04被引 23

提出最优调度算法,让大模型推理吞吐量最大化

Throughput-Optimal Scheduling Algorithms for LLM Inference and AI Agents

  • 基于排队论建立大模型推理的数学模型,发现工作保持类算法最优
  • 实测表明Orca和Sarathi-Serve达到理论最大吞吐,而vLLM等不稳
  • 揭示批大小限制与循环路由对性能的影响,适合系统设计者参考

随着大语言模型(LLMs)和AI代理需求激增,优化其推理系统的效率变得至关重要。尽管已有大量系统工程研究,但从数学建模与排队论角度的研究仍不足。本文建立了大模型推理的排队基础理论,重点分析吞吐量问题。我们证明,在工作保持(work-conserving)类调度算法下,无论是单个请求还是具有有向无环图(DAG)和分叉-汇合(fork-join)拓扑结构的AI代理工作负载,均能达到最大吞吐量,确立了‘工作保持’作为实践中的关键设计原则。技术上,我们提出了在K-FCFS调度下多类别批处理网络的流极限框架,可能具有独立研究价值。真实系统评估显示,Orca和Sarathi-Serve为吞吐最优,可放心使用;而FasterTransformer和原生vLLM并非最大稳定,应谨慎使用。分析还揭示了批大小限制和循环路由拓扑如何复杂化吞吐表现,指出了排队论与大模型系统设计交叉领域中丰富的开放问题。

原文摘要 · Abstract (English)

As demand for Large Language Models (LLMs) and AI agents grows rapidly, optimizing systems for efficient LLM inference becomes critical. While significant efforts have targeted system-level engineering, little has been explored from a mathematical modeling and queueing perspective. In this paper, we develop the queueing fundamentals for LLM inference. In particular, we study the throughput aspect of LLM inference systems. We prove that a large class of `work-conserving' scheduling algorithms achieve maximum throughput for both individual requests and AI-agent workloads with directed acyclic graph (DAG) and fork-join routing topologies, establishing `work-conserving' as a key design principle for practitioners. Technically, we develop a fluid-limit framework for multi-class batched processing networks under $K$-FCFS scheduling, which may be of independent interest. Evaluations of real-world systems confirm that Orca and Sarathi-Serve are throughput-optimal, reassuring practitioners, while FasterTransformer and vanilla vLLM are not maximally stable and should be used with caution. Our analysis also reveals how constraints such as batch size limits and cyclic routing topologies complicate the throughput picture, pointing to rich open questions at the intersection of queueing theory and LLM system design.

大模型推理调度算法吞吐优化排队论

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。