Repository navigation
[Store] Allow DFS-only replica placement - #4637
Merged
Merged
Conversation
2xdevv
requested review from
ShangmingCai,
UNIDY2002,
XucSh,
YiXR,
alogfans,
staryxchen,
stmatengss and
ykwd
as code owners
October 13, 2026 17:26
fcczzz
approved these changes
Oct 14, 2026
fcczzz
left a comment
Collaborator
There was a problem hiding this comment.
The existing allocation, transfer finalization, read, and cleanup paths support DFS-only replica lists. Removing the admission restriction is consistent with those paths, and the added tests cover the main lifecycle and failure cases. LGTM
ykwd
approved these changes
Oct 19, 2026
This was referenced Oct 19, 2026
13 of 14 tasks
9 of 32 tasks
daegyu94
pushed a commit
to daegyu94/vllm
that referenced
this pull request
Oct 20, 2026
Mooncake now accepts replica_num=0 with dfs_replica_num=1 (kvcache-ai/Mooncake#4637), storing the object only in DFS. Relax the replica_num check from >= 1 to >= 0 and document the requirement. Signed-off-by: Daegyu Han <daegyu94.han@samsung.com>
daegyu94
pushed a commit
to daegyu94/vllm
that referenced
this pull request
Oct 20, 2026
Add opt-in DFS support to MooncakeStoreConnector. With "enable_dfs": true in the Mooncake JSON config, the connector passes enable_ssd_offload=True to the native SDK, which creates FileStorage and its distributed backend, and forwards replica_num and dfs_replica_num from kv_connector_extra_config to ReplicateConfig. The existing vLLM enable_offload option still only controls GET budgeting for external SSD owners. replica_num may be 0 for DFS-only placement, which Mooncake supports since kvcache-ai/Mooncake#4637; dfs_replica_num must be 1. Validate SDK support, replica counts, and the default-tenant restriction before Store setup, and reject DFS in the RAM-only cross-encoder cache. DFS reads reuse the GET batch splitter with local_buffer_size as the per-call budget. Document the Master and client settings, including MOONCAKE_OFFLOAD_FILE_STORAGE_PATH. Validation: Mooncake connector unit tests (336) and pre-commit pass. A native 3FS/CUDA run on Mooncake main d855a6ae with Qwen2.5-0.5B-Instruct stored 33 keys from a 537-token prompt. With replica_num=0 none had a memory replica (Master memory usage 0 B); with replica_num=1 all did. After resetting the local prefix cache, both runs loaded 528 tokens from the Store and the 32 output token IDs matched the first generation. Aggregate buffer accounting across concurrent receivers is deferred; multiple receivers can exhaust the shared buffer. Multi-node, RDMA, and long-duration stress remain untested. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Daegyu Han <daegyu94.han@samsung.com>
daegyu94
pushed a commit
to daegyu94/vllm
that referenced
this pull request
Oct 20, 2026
Add opt-in DFS support to MooncakeStoreConnector. With "enable_dfs": true in the Mooncake JSON config, the connector passes enable_ssd_offload=True to the native SDK, which creates FileStorage and its distributed backend, and forwards replica_num and dfs_replica_num from kv_connector_extra_config to ReplicateConfig. The existing vLLM enable_offload option still only controls GET budgeting for external SSD owners. replica_num may be 0 for DFS-only placement, which Mooncake supports since kvcache-ai/Mooncake#4637; dfs_replica_num must be 1. Validate SDK support, replica counts, and the default-tenant restriction before Store setup, and reject DFS in the RAM-only cross-encoder cache. DFS reads reuse the GET batch splitter with local_buffer_size as the per-call budget. Document the Master and client settings, including MOONCAKE_OFFLOAD_FILE_STORAGE_PATH. Validation: Mooncake connector unit tests (336) and pre-commit pass. A native 3FS/CUDA run on Mooncake main d855a6ae with Qwen2.5-0.5B-Instruct stored 33 keys from a 537-token prompt. With replica_num=0 none had a memory replica (Master memory usage 0 B); with replica_num=1 all did. After resetting the local prefix cache, both runs loaded 528 tokens from the Store and the 32 output token IDs matched the first generation. Aggregate buffer accounting across concurrent receivers is deferred; multiple receivers can exhaust the shared buffer. Multi-node, RDMA, and long-duration stress remain untested. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Daegyu Han <daegyu94.han@samsung.com>
daegyu94
pushed a commit
to daegyu94/vllm
that referenced
this pull request
Oct 20, 2026
Add opt-in DFS support to MooncakeStoreConnector. With "enable_dfs": true in the Mooncake JSON config, the connector passes enable_ssd_offload=True to the native SDK, which creates FileStorage and its distributed backend, and forwards replica_num and dfs_replica_num from kv_connector_extra_config to ReplicateConfig. The existing vLLM enable_offload option still only controls GET budgeting for external SSD owners. replica_num may be 0 for DFS-only placement, which Mooncake supports since kvcache-ai/Mooncake#4637; dfs_replica_num must be 1. Validate SDK support, replica counts, and the default-tenant restriction before Store setup, and reject DFS in the RAM-only cross-encoder cache. DFS reads reuse the GET batch splitter with local_buffer_size as the per-call budget. Document the Master and client settings, including MOONCAKE_OFFLOAD_FILE_STORAGE_PATH. Validation: Mooncake connector unit tests (335) and pre-commit pass. A native 3FS/CUDA run on Mooncake main d855a6ae with Qwen2.5-0.5B-Instruct stored 33 keys from a 537-token prompt. With replica_num=0 none had a memory replica (Master memory usage 0 B); with replica_num=1 all did. After resetting the local prefix cache, both runs loaded 528 tokens from the Store and the 32 output token IDs matched the first generation. Aggregate buffer accounting across concurrent receivers is deferred; multiple receivers can exhaust the shared buffer. Multi-node, RDMA, and long-duration stress remain untested. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Daegyu Han <daegyu94.han@samsung.com>
daegyu94
pushed a commit
to daegyu94/vllm
that referenced
this pull request
Oct 20, 2026
Add an opt-in "enable_dfs" option to the Mooncake JSON config. When set, the connector initializes Mooncake's DFS backend during Store setup and writes one DFS replica per object plus replica_num memory replicas (kv_connector_extra_config, default 1). replica_num=0 stores objects only in DFS and requires kvcache-ai/Mooncake#4637. DFS is limited to the default tenant and is rejected for the cross-encoder cache. DFS loads are split so each GET fits in local_buffer_size. Tested with the Mooncake store unit tests and a 3FS run on Mooncake main (d855a6ae) with replica_num 0 and 1. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Daegyu Han <daegyu94.han@samsung.com>
6 tasks done
daegyu94
pushed a commit
to daegyu94/vllm
that referenced
this pull request
Oct 21, 2026
Add an opt-in "enable_dfs" option to the Mooncake JSON config. When set, the connector initializes Mooncake's DFS backend during Store setup and writes one DFS replica per object plus replica_num memory replicas (kv_connector_extra_config, default 1). replica_num=0 stores objects only in DFS and requires kvcache-ai/Mooncake#4637. DFS is limited to the default tenant and is rejected for the cross-encoder cache. DFS loads are split so each GET fits in local_buffer_size, or in the SSD owner's staging buffer if smaller when enable_offload is also set, since Mooncake reads SSD replicas first. Tested with the Mooncake store unit tests and a 3FS run on Mooncake main (d855a6ae) with replica_num 0 and 1. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Daegyu Han <daegyu94.han@samsung.com>
Open
4 of 5 tasks
9 tasks done
daegyu94
pushed a commit
to daegyu94/vllm
that referenced
this pull request
Oct 31, 2026
Add an opt-in "enable_dfs" option to the Mooncake JSON config. When set, the connector initializes Mooncake's DFS backend during Store setup and writes one DFS replica per object plus replica_num memory replicas (kv_connector_extra_config, default 1). replica_num=0 stores objects only in DFS and requires kvcache-ai/Mooncake#4637. DFS is limited to the default tenant and is rejected for the cross-encoder cache. DFS loads are split so each GET fits in local_buffer_size, or in the SSD owner's staging buffer if smaller when enable_offload is also set, since Mooncake reads SSD replicas first. Tested with the Mooncake store unit tests and a 3FS run on Mooncake main (d855a6ae) with replica_num 0 and 1. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Daegyu Han <daegyu94.han@samsung.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Allow DFS-only placement with
replica_num = 0,nof_replica_num = 0, anddfs_replica_num = 1. Previously,PutStartandUpsertStartrejected DFS requests without a memory replica.Add lifecycle coverage and update the C++, Python, and deployment documentation. When DFS is the only copy, DFS eviction or object removal deletes the object. Existing same-size upsert topology checks and DFS tenant, recovery, and durability limitations remain unchanged.
Module
mooncake-store)Type of Change
How Has This Been Tested?
Added tests covering:
Validation performed:
git diff HEAD^ HEAD --check: passed.HEAD^: passed.Test results:
Checklist
./scripts/code_format.shAI Assistance Disclosure
Codex assisted with code review, local validation, and drafting this PR description. The human submitter is responsible for reviewing every changed line and understanding the change end-to-end.