Skip to content
Back to search

schedcp

MCP Server for Linux Scheduler Management and Auto optimization

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/eunomia-bpf--schedcp/badge.svg)](/listings/eunomia-bpf--schedcp)

HTML

<a href="/listings/eunomia-bpf--schedcp"><img src="/api/listings/eunomia-bpf--schedcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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](https://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 ..

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 171 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # SchedCP - Automatically Optimize Linux Scheduler with MCP Server
  2. > WIP: We are building a benchmark for evaluating the optimizations for OS!
  3. 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.
  4. Paper: [SchedCP: Towards Agentic OS](https://arxiv.org/abs/2509.01245)
  5. *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!*
  6. It includes the following tools:
  7. - **autotune** - AI Agent-powered automatic OS optimization
  8. - **schedcp** - MCP server for scheduler management and generation
  9. ## Demo
  10. Start optimize any workload with AI by simply run:
  11. ```sh
  12. autotune/target/release/autotune cc "<your workload command>"
  13. # example for linux build
  14. autotune/target/release/autotune cc "make -C workloads/linux-build-bench/linux clean -j && make -C workloads/linux-build-bench/linux -j"
  15. # example for schbench
  16. autotune/target/release/autotune cc workloads/basic/schbench/schbench
  17. ```
  18. Allow LLM Agent to auto select and config the best scheduler:
  19. ![document/schbench-optimize.gif](https://github.com/eunomia-bpf/schedcp/blob/master/document/schbench-optimize.gif?raw=true)
  20. Allow LLM Agents to write new schedulers:
  21. ## Features & design
  22. - Automatic workload profiling
  23. - Automatic scheduler selection based on workload characteristics
  24. - Performance tracking across different schedulers
  25. - Real-time scheduler management and generation
  26. ![document/design.png](https://github.com/eunomia-bpf/schedcp/blob/master/document/design.png?raw=true)
  27. The current MCP tools include:
  28. - **list_schedulers** - Get detailed information about all available schedulers
  29. - **run_scheduler** - Start schedulers with custom configurations
  30. - **stop_scheduler** - Stop running scheduler instances
  31. - **get_execution_status** - Monitor scheduler performance and output
  32. - **create_and_verify_scheduler** - Create custom BPF schedulers from source code
  33. - **system_monitor** - Collect real-time CPU, memory, and scheduler metrics
  34. - **workload** - Manage workload profiles and execution history
  35. ## Installation
  36. ### Requirements
  37. - Linux kernel 6.12+ with sched-ext support
  38. - Rust toolchain
  39. The major dependencies are the dependencies for the sched-ext framework. You can check the [github.com/sched-ext/scx](https://github.com/sched-ext/scx) for more details.
  40. You also need to install the deps for the workloads you want to optimize.
  41. ### Build
  42. ```bash
  43. # Clone with submodules
  44. git clone https://github.com/eunomia-bpf/schedcp
  45. cd schedcp
  46. git submodule update --init --recursive scheduler/scx
  47. # Build schedulers
  48. cd scheduler && make && make install && cd ..
  49. # Build autotune
  50. cd autotune && cargo build --release && cd ..
  51. # Build MCP server
  52. cd mcp && cargo build --release && cd ..
  53. ```
  54. ## Documentation
  55. ### User Guides
  56. - **[USAGE_GUIDE.md](document/USAGE_GUIDE.md)** - Complete guide on how to use schedulers
  57. - Installation and setup
  58. - Using schedulers with CLI, MCP server, and autotune
  59. - Understanding scheduler selection
  60. - Troubleshooting
  61. - **[PROJECT_STRUCTURE.md](document/PROJECT_STRUCTURE.md)** - Detailed project organization
  62. - Component overview and responsibilities
  63. - Directory structure and file locations
  64. - Data flow and integration points
  65. - Build system architecture
  66. - **[AI_AGENTS.md](document/AI_AGENTS.md)** - AI agent implementation
  67. - How observation, planning, execution, and learning agents work
  68. - MCP tools and agent capabilities
  69. - Example optimization workflows
  70. - Integration with Claude and other AI systems
  71. ### Design Documents
  72. - **[sched-agent-design.md](document/sched-agent-design.md)** - Multi-agent framework design
  73. - **[schedcp-design.md](document/schedcp-design.md)** - System control plane architecture
  74. - **Research Paper**: [SchedCP: Towards Agentic OS](https://arxiv.org/abs/2509.01245)
  75. ## Quick Start
  76. **You should run the claude-code on project root directory.**
  77. ### Autotune (Recommended)
  78. ```bash
  79. # Set sudo password
  80. export SCHEDCP_SUDO_PASSWORD="your_password"
  81. # Optimize any workload
  82. ./autotune/target/release/autotune cc "<your workload command>"
  83. ```
  84. ### MCP Server
  85. check the [.mcp.json](https://github.com/eunomia-bpf/schedcp/blob/master/.mcp.json) for more details. You can just open the claude-code on the
  86. ### CLI Tool
  87. ```bash
  88. export SCHEDCP_SUDO_PASSWORD="your_password"
  89. # List schedulers
  90. ./mcp/target/release/schedcp-cli list
  91. # Run a scheduler
  92. ./mcp/target/release/schedcp-cli run scx_rusty --sudo
  93. # Monitor system metrics
  94. ./mcp/target/release/schedcp-cli monitor
  95. ```
  96. For detailed usage instructions, see [USAGE_GUIDE.md](document/USAGE_GUIDE.md).
  97. ## Artifact from Paper
  98. Artifact for reproducing results from **"Towards Agentic OS: An LLM Agent Framework for Linux Schedulers"** (arXiv:2509.01245).
  99. ### Evaluation Workloads
  100. #### 1. **Linux Kernel Build**
  101. - **Location**: [`workloads/linux-build-bench/`](workloads/linux-build-bench/)
  102. - **Run**: `autotune/target/release/autotune cc "make -C workloads/linux-build-bench/linux -j"`
  103. #### 2. **schbench**
  104. - **Location**: [`workloads/basic/schbench_test/`](workloads/basic/schbench_test/)
  105. - **Run**: `autotune/target/release/autotune cc "workloads/basic/schbench/schbench"`
  106. #### 3. **Batch Workloads**
  107. - **Location**: [`workloads/processing/`](workloads/processing/)
  108. - **Run**: See [`workloads/processing/README.md`](workloads/processing/README.md). The schedulers there are already generated by Claude Code. The original version was letting Claude Code generate them first and run the workloads with benchmarks mannually.
  109. - Workloads: [workloads/processing/assets](workloads/processing/assets/)
  110. - Prompt and testcases: [workloads/processing/scripts](workloads/processing/scripts)
  111. - Generated schedulers: [workloads/processing/schedulers](workloads/processing/schedulers)
  112. ## Related Projects
  113. - [sched-ext](https://github.com/sched-ext/scx) - Linux kernel BPF scheduler framework
  114. - [Model Context Protocol](https://modelcontextprotocol.io/) - AI-application integration protocol
  115. ## License
  116. See [LICENSE](https://github.com/eunomia-bpf/schedcp/blob/master/LICENSE) for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.