针对智能体服务优化大模型调度,提升吞吐量并保持缓存效率
SMetric: Rethink LLM Scheduling for Serving Agents with Balanced Session-centric Scheduling

- 按会话首请求负载均衡,后续请求缓存感知调度
- 实测集群吞吐提升10%-16%,预填充吞吐最高提升34%
- 适合大规模智能体服务场景,兼顾性能与系统简洁性
大模型调度对服务至关重要,但现有设计在智能体驱动请求场景下的适配性尚不明确。智能体仅在完整响应后行动,使每秒令牌数(TPS)成为核心目标,而单令牌延迟要求可适度放宽;且生产环境数据显示,智能体请求的键值缓存复用率超过80%,远高于聊天场景的54%-62%。本文基于两个真实数据流进行系统研究,发现现有调度器为提升缓存复用,过度将请求导向缓存实例,导致少数节点过载、其余空闲,限制了整体TPS。由此提出两大洞察:(1)借助全局缓存层,负载均衡无需牺牲全部本地缓存复用;(2)利用会话内局部性,仅平衡每个会话首请求即可实现集群均衡,同时保留本地实例的高缓存复用。SMETRIC采用会话中心化调度:首请求纯为负载均衡,后续请求则按缓存状态调度,兼顾负载均衡、本地复用与低全局缓存压力。以会话轮次信息作为调度指标,可从用户输入高效准确推导,使调度器保持轻量无状态。实验表明,在预填充-解码共置+全局缓存下,集群TPS提升10%-16%;在解耦架构下,预填充TPS提升2%-34%,且延迟更优。
原文摘要 · Abstract (English)
LLM scheduling is critical to serving, yet it remains unclear how well existing designs fit agentic serving--with LLM requests issued by agents instead of humans. This shifts the workload in two ways: (1) agents act only on complete responses, making the cluster's tokens per second (TPS) the primary goal and relaxing--not eliminating--per-token latency requirements; and (2) requests share much of their KV\$-reuse exceeds 80% of request tokens in a production trace from BAILIAN, versus 54-62% in chat. This paper first contributes a systematic study of request scheduling for agents on two real-world traces. We find that to increase KV\$ reuse, existing schedulers overly prioritize routing requests to instances caching their KV\$, overloading a few while leaving the rest idle, capping TPS. We thus present two key insights: (1) load balance need not sacrifice all KV\$ reuse, thanks to the global-tier KV\$ store and (2) by utilizing the workload's intra-session locality, balancing a small fraction of requests--the first request in each agent session--suffices to balance the cluster without sacrificing most KV\$ reuse on local instances. SMETRIC realizes these insights with balanced session-centric scheduling: it routes each session's first request purely for load balance and its follow-up requests in a cache-aware manner, preserving load balance and local reuse while keeping demand on the global tier low. Using the session turn information as the scheduling metric is deliberate: it is derived efficiently and accurately from the user inputs alone, so the scheduler stays clean and stateless. SMETRIC improves cluster TPS by 10-16% under prefill-decode colocation with a global store and prefill TPS by 2-34% under disaggregation over state-of-the-art schedulers, also with a better per-token latency.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。