目录

Mooncake Fragmentation-Aware Allocation Strategy

Competition: The 8th CCF Open Source Innovation Competition, Open Source Task Challenge Track.

Task: Mooncake KVCache storage design and performance optimization.

Official Topic-2 Alignment - 2026-07-06

This package is now explicitly aligned to official Mooncake track track2_2026Mooncake, 赛题2:优化 Mooncake Store 吞吐性能、高可用功能和可扩展性,优化 SGLang HiCache + Mooncake Store 性能.

The precise positioning is:

Mooncake Store fragmentation-aware allocation for Store scalability/performance stability

This is not a generic KVCache proposal. The implemented patch targets Mooncake Store segment allocation for mixed-size KVCache objects. The expected competition value is fewer avoidable failed allocation attempts, lower fallback pressure, and more stable large-object placement when long-running Store memory pools become fragmented. SGLang HiCache relevance is through its Mooncake Store backend path; no real SGLang HiCache benchmark is claimed.

New topic-alignment artifacts:

  • OFFICIAL_TOPIC_ALIGNMENT.md
  • topic_alignment_metrics_20260706.md
  • repro/topic_aligned_store_scalability_sim.cpp
  • logs/topic_aligned_store_scalability_sim_20260706.log
  • TOPIC_ALIGNMENT_REPORT.md

Work Summary

This submission adds a new Mooncake Store allocation strategy named fragmentation_aware. The strategy improves allocation decisions for mixed-size KV cache workloads by considering the largest contiguous free region in each candidate segment, not only the aggregate free-space ratio.

The feature is designed to reduce failed allocation attempts in long-running clusters where memory becomes fragmented. It keeps Mooncake’s existing best-effort replica semantics and uses a bounded sampled candidate set to avoid full-cluster scans.

Nightly Update - 2026-07-03

This package now includes a PR-ready patch regenerated against current upstream Mooncake:

mooncake_fragmentation_aware_pr_ready_20260703.patch

Baseline:

kvcache-ai/Mooncake@a325291c6baccc872ce137bd0c58d5791ac4e8c4

The earlier mooncake_fragmentation_aware.patch is retained for traceability, but the 2026-07-03 patch is the preferred review artifact because it passes git apply --check against the current upstream commit.

Additional evidence added:

  • official_verification_20260703.md
  • quantitative_metrics_20260703.md
  • patch_pr_ready_notes_20260703.md
  • final_report.md
  • NIGHTLY_IMPROVEMENT_REPORT.md
  • New logs under logs\*20260703*
  • Final nightly package path and SHA256 are recorded in NIGHTLY_IMPROVEMENT_REPORT.md.

Key Deliverables

  • New AllocationStrategyType::FRAGMENTATION_AWARE.
  • New FragmentationAwareAllocationStrategy.
  • Master startup support via --allocation_strategy=fragmentation_aware.
  • Unit test covering a deterministic fragmentation scenario.
  • Allocation benchmark matrix support for the new strategy.
  • Updated design, deployment, and quick-start documentation.
  • TCP-only / old-libibverbs build compatibility fixes needed for local validation on Ubuntu 20.04.

Repository

Current scoped working repository:

C:\CCFOpenSource:\CCFOpenSource\02_Mooncake_FragmentationAware\upstream\Mooncake2_Mooncake_FragmentationAware\upstream\Mooncake

Current upstream baseline:

a325291c6baccc872ce137bd0c58d5791ac4e8c4

Usage

Start Mooncake master with:

mooncake_master --allocation_strategy=fragmentation_aware

For HTTP metadata quick start:

mooncake_master \
  --allocation_strategy=fragmentation_aware \
  --enable_http_metadata_server=true \
  --http_metadata_server_port=8080

Status

Implementation patch is prepared at:

C:\CCFOpenSource:\CCFOpenSource\02_Mooncake_FragmentationAware\mooncake_fragmentation_aware_pr_ready_20260703.patch2_Mooncake_FragmentationAware\mooncake_fragmentation_aware_pr_ready_20260703.patch

Local verification results are recorded in C:\CCFOpenSource:\CCFOpenSource\02_Mooncake_FragmentationAware\testing.md2_Mooncake_FragmentationAware\testing.md and C:\CCFOpenSource:\CCFOpenSource\02_Mooncake_FragmentationAware\logs2_Mooncake_FragmentationAware\logs.

Primary local validation:

  • allocation_strategy_light_test.log: passed.
  • fragmentation_aware_sim.log: passed.
  • fragmentation_aware_sim_verify_20260703_0002.log: passed.
  • fragmentation_aware_metrics_verify_20260703_0002.log: passed.
  • topic_aligned_store_scalability_sim_20260706.log: passed; deterministic topic-2 simulation shows primary fit success improved from 0/6 to 6/6 and fallback attempts reduced from 11 to 0 in the synthetic fragmented Store scenario.
  • git_apply_check_pr_ready_20260703_0002.log: PR-ready patch apply check passed.
  • Full upstream Store target was attempted but did not finish in the local WSL/GCC10/Windows-mounted workspace within the available resource window.
关于
240.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号