mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #3812] [RFC]: dfs replica supports dynamic capacity scaling #975
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#975
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sun-baoshan-sunshine on GitHub (Sep 1, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/3812
Changes proposed
背景
很高兴看到mooncake 目前完善了dfs写入支持的相关工作#2683 ,在测试使用过程中,我发现目前机制下,还不能支持dfs后端的动态扩容。更详细的描述是,dfs 后端的总容量大小由单个文件大小以及总的文件数量决定,这些作为配置在master启动时设定,而一旦服务启动后,没有任何方式能够再进行更改。我认为这是一种目前机制的缺陷,在推理场景下,初期的评估不足 或者dfs 后端容量暂时的紧缺,可能导致出现后期 dfs 容量设置的太小的问题,需要调整。但是在当前机制下,只能通过master 重启的方式重新约定dfs 后端总容量,而master 一旦重启,会导致dfs 中已有的 kvcache 数据 元信息丢失,进而变为孤儿数据在dfs中,这本身对dfs 是无害的,但是在推理角度来看,历史缓存的kvcache全部都需要重新计算。
在这个issue 中,我想就动态扩容的问题提出一些探讨,增加dfs 实现 动态扩容的能力。
初步设计思路
实现步骤
目前初步评估,这个pr 的代码改动不会很大。具体的,可以分为两个步骤完成:
考虑项
......
Before submitting a new issue...
@sun-baoshan-sunshine commented on GitHub (Sep 1, 2026):
@fcczzz Please take a look at whether this issue is feasible,thanks
@github-actions[bot] commented on GitHub (Sep 1, 2026):
Thanks for opening this issue, @sun-baoshan-sunshine!
78401405A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide
@fcczzz commented on GitHub (Sep 1, 2026):
Thanks for proposing this. The proposal looks useful, but a few points should be clarified before implementation:
Existing clients open a fixed number of shard files and will reject descriptors for newly added shards. The RFC should define client-side lazy opening or a versioned update/acknowledgement mechanism.
Shard filenames must not depend on the total shard count. Currently, expanding from 100 to 101 shards changes names such as
dfs_shard_00.datatodfs_shard_000.data.Expansion must be atomic with concurrent allocation, free, and eviction. New shards should only become allocatable after their files and allocator states are fully ready.
The current
hash(key) % shard_countplacement tries only one shard. Adding empty shards may therefore not help keys that still map to full shards. A fallback placement strategy and updated eviction semantics are needed.Overall, the direction is feasible, but these lifecycle and compatibility details should be included in the RFC.