arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.26963cs.OScs.DCcs.LGcs.MA
收藏

MARS:面向异构智能体系统的高效自适应协同调度

MARS: Towards High Goodput and Low KV Thrashing in Agent Serving under GPU Memory Constraints

Duke University(杜克大学)

Yifei Wang, Tsun-yu Yang, Hancheng Ye, Yechen Xu, Cong Guo, Chiyue Wei, Qinsi Wang, Dongting Li, Tingjun Chen, Hai "Helen" Li, Danyang Zhuo, Yiran Chen

AI总结:

提出MARS协同调度系统,通过统一信息流全局协调GPU推理与CPU工具执行,解耦准入与执行防止资源过载,并采用智能体中心调度器最小化端到端延迟,实验显示延迟降低5.94倍。

摘要:

大型语言模型(LLM)越来越多地被部署为自主智能体的执行核心,而非独立的文本生成器。智能体工作负载引发了时间上的转变,从单轮推理转向多轮LLM-工具循环,以及空间上的转变,从聊天规模的仅GPU执行转向仓库规模的GPU-CPU协同执行。因此,协调智能体执行的异构资源需求已成为一个关键的系统挑战。我们设计并实现了MARS,一个高效且自适应的协同调度系统,它在GPU-CPU耦合资源压力下全局协调异构智能体工作负载。通过统一信息流建立对GPU推理和CPU工具执行的全局可见性,MARS中的外部控制平面将准入与执行解耦,以防止异构资源过载。内部智能体中心调度器通过优先处理延迟敏感的延续,并仅在热恢复带来延迟收益时自适应保留KV缓存状态,进一步最小化端到端关键路径。我们的评估表明,MARS将端到端延迟降低高达5.94倍,同时保持接近最大的系统吞吐量。我们进一步将MARS作为OpenHands编码智能体框架的服务后端,通过加速端到端任务完成时间高达1.87倍,展示了其在现实世界中的有效性。我们的源代码在此https URL公开提供。

英文摘要:

Self-hosted LLM agents offer greater control over sensitive data and model customization while avoiding per-request API fees. However, serving concurrent, multi-turn workflows within limited GPU memory makes it difficult to achieve high workflow-level goodput. In particular, as workflows accumulate context, their reusable key-value (KV) caches can easily outgrow GPU capacity, triggering repeated eviction and recovery, known as KV cache thrashing. This process consumes resources and delays workflow completion. Although existing approaches propose various methods, our motivation study shows that the evaluated baselines still incur substantial thrashing overhead or fail to address the workflow-level goodput issue. We present MARS, an agent serving system that coordinates workflow admission and in-engine scheduling to achieve high workflow-level goodput on memory-constrained devices while avoiding KV cache thrashing. Specifically, outside the engine, an admission controller selects root workflows using initial prefix footprint estimates and live KV availability, adapting admissions to memory pressure. Inside, an agent-centric scheduler prioritizes turn completion and coordinates prefill allocation with KV reclamation to reduce disruptive evictions. Across two models and three GPU configurations, MARS achieves 1.59x-7.56x mean end-to-end latency speedups over the fastest baseline. Integrated as the serving backend for OpenCode, Codex, and OpenHands, MARS further improves mean workflow completion time by 1.17x-1.87x. Our source code is publicly available at https://github.com/Afterglow231/MARS_preview .

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑