SchedCP - Automatically Optimize Linux Scheduler with MCP Server
WIP: We are building a benchmark for evaluating the optimizations for OS!
WIP: We are building a benchmark for evaluating the optimizations for OS!
SchedCP is an experimental project that enables AI optimization of Linux kernel schedulers using the sched-ext framework. It provides e2e automatic scheduler selection/synthesis, workload profiling, and performance optimization without any human intervention or guidance.
Paper: SchedCP: Towards Agentic OS
The future is not just about letting AI write code for you; the AI agent should act as your system administrator, able to optimize anything for you automatically, without requiring any manual intervention!
GitHub Repository: https://github.com/eunomia-bpf/schedcp ⭐
It includes the following tools:
- autotune - AI Agent-powered automatic OS optimization
- schedcp - MCP server for scheduler management and generation
Demo
Start optimize any workload with AI by simply run:
autotune/target/release/autotune cc "<your workload command>"
# example for linux build
autotune/target/release/autotune cc "make -C workloads/linux-build-bench/linux clean -j && make -C workloads/linux-build-bench/linux -j"
# example for schbench
autotune/target/release/autotune cc workloads/basic/schbench/schbenchAllow LLM Agent to auto select and config the best scheduler:

Allow LLM Agents to write new schedulers:
Features & design
- Automatic workload profiling
- Automatic scheduler selection based on workload characteristics
- Performance tracking across different schedulers
- Real-time scheduler management and generation

The current MCP tools include:
- list_schedulers - Get detailed information about all available schedulers
- run_scheduler - Start schedulers with custom configurations
- stop_scheduler - Stop running scheduler instances
- get_execution_status - Monitor scheduler performance and output
- create_and_verify_scheduler - Create custom BPF schedulers from source code
- system_monitor - Collect real-time CPU, memory, and scheduler metrics
- workload - Manage workload profiles and execution history
Installation
Requirements
- Linux kernel 6.12+ with sched-ext support
- Rust toolchain
The major dependencies are the dependencies for the sched-ext framework. You can check the github.com/sched-ext/scx for more details.
You also need to install the deps for the workloads you want to optimize.
Build
# Clone with submodules
git clone https://github.com/eunomia-bpf/schedcp
cd schedcp
git submodule update --init --recursive scheduler/scx
# Build schedulers
cd scheduler && make && make install && cd ..
# Build autotune
cd autotune && cargo build --release && cd ..
# Build MCP server
cd mcp && cargo build --release && cd ..Usage
You should run the claude-code on project root directory.
Autotune (Recommended)
# Set sudo password
export SCHEDCP_SUDO_PASSWORD="your_password"
# Optimize any workload
./autotune/target/release/autotune cc "<your workload command>"MCP Server
check the .mcp.json for more details. You can just open the claude-code on the
CLI Tool
export SCHEDCP_SUDO_PASSWORD="your_password"
# List schedulers
./mcp/target/release/schedcp-cli list
# Run a scheduler
./mcp/target/release/schedcp-cli run scx_rusty --sudo
# Check status
./mcp/target/release/schedcp-cli statusRelated Projects
- sched-ext - Linux kernel BPF scheduler framework
- Model Context Protocol - AI-application integration protocol
License
See LICENSE for details.
继续阅读
返回索引
eBPF × AI/LLMs:系统可观测性与人工智能的融合
人工智能与eBPF的融合正在快速引领系统软件的新方向,彻底改变了复杂应用程序的构建和管理方式。随着大语言模型(LLMs)从单纯的应用程序演变为软件开发生命周期中的活跃AI代理,它们越来越多地用于生成、优化和验证低级系统代码,包括内核扩展。同时,这些复杂的AI工作负载和代理在执行时需要全新的运行时环境,以实现高效、安全、可靠的运行。这正是eBPF的优势所在,它提供了安全且高性能的内核编程机制,为现代系统提供所需的高质量监控数据。
上一篇 / 上一页
GPTtrace 文档
使用自然语言和AI生成并运行eBPF程序。通过GPT驱动的自动化和智能分析追踪您的Linux系统。
- 最后更新
- 2025年10月5日
- 首次发布
- 2025年10月5日
- 贡献者
- yunwei37
这个页面有帮助吗?