Skip to content

Task scheduling - #47

Merged
zchuango merged 10 commits into
LinQuickDev:supercache-snapshot-930from
yyyuanhao426-hash:task_scheduling
Sep 14, 2026
Merged

zchuango merged 10 commits into
LinQuickDev:supercache-snapshot-930from
yyyuanhao426-hash:task_scheduling

Conversation

@yyyuanhao426-hash

@yyyuanhao426-hash yyyuanhao426-hash commented Sep 14, 2026

Copy link
Copy Markdown

Description

增加任务调度与通信大小包调度

Module

  • Transfer Engine (mooncake-transfer-engine)
  • Mooncake Store (mooncake-store)
  • Mooncake Conductor (mooncake-conductor)
  • Reshard (mooncake-reshard)
  • Mooncake EP (mooncake-ep)
  • Mooncake PG (mooncake-pg)
  • Integration (mooncake-integration)
  • P2P Store (mooncake-p2p-store)
  • Python Wheel (mooncake-wheel)
  • Common (mooncake-common)
  • Mooncake RL (mooncake-rl)
  • CI/CD
  • Docs
  • Other

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation update
  • Performance improvement
  • Other

How Has This Been Tested?

Test commands:

# Example: bash scripts/run_ci_test.sh

Test results:

  • Unit tests pass
  • Integration tests pass (if applicable)
  • Manual testing done (describe below)

Checklist

  • I have performed a self-review of my own code
  • I have formatted my code using ./scripts/code_format.sh
  • I have run pre-commit on the files changed in this PR and all hooks pass
  • I have updated the documentation (if applicable)
  • I have added tests to prove my changes are effective
  • For changes >500 LOC: I have filed an RFC issue

AI Assistance Disclosure

  • No AI tools were used
  • AI tools were used (specify below)

引入 SchedulerCore 实现调度循环,支持任务提交、取消、状态查询;提供可插拔策略:意图解析、分层准入、限界调度预算、分层任务选择;为 RDMA 和 UB 传输添加 scheduledTransferLength 接口;新增调度策略与核心的单元测试。
实现 SchedulerCore 调度核心,支持 QoS 分类、准入控制、分片调度与批量任务生命周期管理。
集成到 MultiTransport,新增 configureScheduling、submitScheduledTransfer 等接口,
并适配 freeBatchID、submitTransfer、getTransferStatus 等方法以处理调度器场景。
引入 SchedulerCore 核心调度器及可插拔策略(QoS 解析、准入、选路、预算),
为 TransferEngine 提供 configureScheduling、submitScheduledTransfer 和 cancelTransfer 接口。
各 Transport 适配 scheduledTransferLength 以支持分片调度,
并提供基准测试验证调度器对前台时延和总吞吐的影响。
TransferSubmitter 的 submit、submit_batch 等方法现在接受 OperationOptions,
其中包含可选的 SchedulingHint。未提供时,根据操作类型自动设置任务意图。
submitTransfer 改为使用 submitScheduledTransfer 传递调度信息。
同时添加了调度器的基准测试和结果比较脚本,用于验证调度效果。
扩展基准测试为目标/发起者双角色,取消对tebench的依赖。
添加--protocol、--device_name、--numa_node参数,支持多设备列表及拓扑生成。
内存分配改用numa_alloc,目标模式添加信号处理。
更新README文档,提供完整运行示例。
支持通过 --scheduler_class_weights 配置 HIGH:MEDIUM:LOW 权重,影响调度器决策。
JSONL 输出升级至 schema v2,新增每个流量类别的 avg/min/p50/p99/p999/p9999/max 延迟与吞吐量字段。
对比脚本更新以计算各类别的 Avg 减少、P99 减少和带宽保留率,并支持 class_weights 验证。
为 Client 和 RealClient 增加 configureScheduling 接口,支持通过命令行参数(如 --scheduling、--scheduler_quantum_bytes 等)启用并配置传输引擎调度策略,并解析类权重字符串。
@zchuango
zchuango merged commit 0563af1 into LinQuickDev:supercache-snapshot-930 Sep 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants