arXiv:2509.01245cs.AIcs.MA2025-09被引 1

让大模型自主优化Linux调度器,提升性能1.79倍且成本降13倍

Towards Agentic OS: An LLM Agent Framework for Linux Schedulers

  • 分两阶段优化:先理解应用需求,再生成调度策略
  • 实现1.79倍性能提升,相比传统方法成本降低13倍
  • 适合系统优化、AI与操作系统融合方向的研究者

操作系统调度器存在语义鸿沟,内核策略难以理解应用具体需求,导致性能不佳。我们提出SchedCP,首个让大语言模型(LLM)代理在无须人工干预下安全高效优化Linux调度器的框架。核心思想是将语义推理(优化什么)与执行控制(如何观测和动作)解耦,形成目标推断与策略合成两个阶段。通过模型上下文协议(MCP)服务器实现,提供三个关键服务:工作负载分析引擎、可演进的调度策略库、执行验证器(通过静态与动态分析验证所有生成代码与配置)。我们构建了sched-agent多代理系统,可自主分析工作负载、生成定制eBPF调度策略,并通过sched_ext基础设施部署。评估显示,SchedCP实现最高1.79倍性能提升,相较朴素代理方法成本降低13倍,成功率高。该框架弥合了语义鸿沟,使专家级系统优化民主化,迈向真正自优化、应用感知的操作系统。代码已开源:https://github.com/eunomia-bpf/schedcp

原文摘要 · Abstract (English)

Operating system schedulers suffer from a fundamental semantic gap, where kernel policies fail to understand application-specific needs, leading to suboptimal performance. We introduce SchedCP, the first framework that enables fully autonomous Large Language Model (LLM) agents to safely and efficiently optimize Linux schedulers without human involvement. Our core insight is that the challenge is not merely to apply a better LLM, but to architect a decoupled control plane that separates the AI's role of semantic reasoning ("what to optimize") from the system's role of execution ("how to observe and act"), thereby separating the optimization problem into two stages: goal-inference and policy-synthesis. Implemented as Model Context Protocol(MCP) server, SchedCP provides a stable interface with three key services: a Workload Analysis Engine, an evolving Scheduler Policy Repository, and an Execution Verifier that validates all AI-generated code and configure before deployment with static and dynamic analysis. We demonstrate this architecture's power with sched-agent, a multi-agent system that autonomously analyzes workloads, synthesizes custom eBPF scheduling policies, and deploys them via the sched\_ext infrastructure. Our evaluation shows that SchedCP achieves up to an 1.79x performance improvement, and a 13x cost reduction compared to naive agentic approaches, all while maintaining high success rate. By bridging the semantic gap, SchedCP democratizes expert-level system optimization and represents a step towards creating truly self-optimizing, application-aware operating systems. The code is open-sourced in https://github.com/eunomia-bpf/schedcp

系统优化大模型代理Linux调度eBPF

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