arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.09345cs.OScs.AI
收藏

AgentCgroup: 理解和控制AI代理的操作系统资源

AgentCgroup: Understanding and Controlling OS Resources of AI Agents

UC Santa Cruz(加州大学圣克鲁兹分校);Virginia Tech(弗吉尼亚理工大学);UConn(康涅狄格大学)

Yusheng Zheng, Jiakun Fan, Quanzhi Fu, Yiwei Yang, Wei Zhang, Andi Quinn

AI总结:

AgentCgroup通过意图驱动的eBPF资源控制器,解决多租户云环境中AI代理资源管理的粒度、响应性和适应性不匹配问题,提升隔离性和减少资源浪费。

摘要:

AI代理越来越多地部署在多租户云环境中,其中它们在沙盒容器中执行多样化的工具调用,每个调用都有不同的资源需求和快速波动。我们系统地表征了沙盒AI编码代理的操作系统级资源动态,分析了来自SWE-rebench基准的144个软件工程任务,跨越两个LLM模型。我们的测量发现:(1)操作系统级执行(工具调用、容器和代理初始化)占端到端任务延迟的56-74%;(2)内存,而不是CPU,是并发瓶颈;(3)内存峰值由工具调用驱动,峰值与平均值的比值高达15.4倍;(4)资源需求在任务、运行和模型之间高度不可预测。将这些特性与无服务器、微服务和批量工作负载进行比较,我们发现现有资源控制存在三个不匹配:粒度不匹配(容器级策略与工具调用级动态)、响应性不匹配(用户空间反应与亚秒级不可预测的突发)以及适应性不匹配(基于历史的预测与非确定性状态执行)。我们提出了AgentCgroup,一个基于意图的eBPF资源控制器,利用代理声明资源需求和重构执行策略的能力,使用与工具调用边界对齐的分层cgroup结构,通过内核中的sched_ext和memcg_bpf_ops实现内核级执行,并采用运行时自适应策略。初步评估显示多租户隔离性和资源浪费减少有所改善。AgentCgroup在https://github.com/eunomia-bpf/agentcgroup上开源。

英文摘要:

AI agents are increasingly deployed in multi-tenant cloud environments, where they execute diverse tool calls within sandboxed containers, each call with distinct resource demands and rapid fluctuations. We present a systematic characterization of OS-level resource dynamics in sandboxed AI coding agents, analyzing 144 software engineering tasks from the SWE-rebench benchmark across two LLM models. Our measurements reveal that (1) OS-level execution (tool calls, container and agent initialization) accounts for 55-60% of end-to-end task latency; (2) memory, not CPU, is the concurrency bottleneck; (3) memory spikes are tool-call-driven with a up to 15.4x peak-to-average ratio; and (4) resource demands are highly unpredictable across tasks, runs, and models. Comparing these characteristics against serverless, microservice, and batch workloads, we identify three mismatches in existing resource controls: a granularity mismatch (container-level policies vs. tool-call-level dynamics), a responsiveness mismatch (user-space reaction vs. sub-second unpredictable bursts), and an adaptability mismatch (history-based prediction vs. non-deterministic stateful execution). We propose AgentCgroup, an intent-driven eBPF-based resource controller that exploits agents ability to declare resource needs and reconstruct execution strategies, using hierarchical cgroup structures aligned with tool-call boundaries, in-kernel enforcement via sched_ext and memcg_bpf_ops, and runtime-adaptive policies. Preliminary evaluation demonstrates improved multi-tenant isolation and reduced resource waste. AgentCgroup is open-source at https://github.com/eunomia-bpf/agentcgroup

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

↑