kvcache-ai / kvcache-ai/Mooncake

[Usage]: sglang使用mooncake时开启root_fs_dir, sglang内存飙升

Open
#1,195 34 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.6k
Forks
1.2k
Avg merge
3d 5h
Merged PRs (30d)
312

Description

### Describe your usage question

使用mooncake当作sglang hicache的L3,我给mooncake master开启了root_fs_dir,root_fs_dir是挂载的一个DFS。
`mooncake_master \
--enable_http_metadata_server=true \
--http_metadata_server_host=0.0.0.0 \
--http_metadata_server_port=8080 \
--global_file_segment_size=1073741824 \
--eviction_high_watermark_ratio=0.95 \
--root_fs_dir=/root/dfs_dir/`
我的mooncake部署是一个master,4个store,每个store机器上都挂载了该目录。现象是,能够正常地启动sglang,并正常运行bench,过程中dfs目录中也会持续写入文件。但我的问题是:sglang::scheduler进程的内存占用会飙升,直到吃满整个机器。我这里有两个需求:
1. 我怀疑是sglang内置了mooncake的client在吃内存,但不知道是什么确切的原因,还请解惑
2. 这种情况能否抑制或改善,我尝试了指定--global_file_segment_size参数没有看到预期的效果。
谢谢!

### Before submitting a new issue...

- [x] Make sure you already searched for relevant issues and read the [documentation](https://kvcache-ai.github.io/Mooncake/)

Contributor guide

Open the contributing guide

Research direction

Start with the reported mooncake_master configuration, especially root_fs_dir and global_file_segment_size, and reproduce the workload through the sglang scheduler and benchmark. Track scheduler memory growth alongside DFS writes and determine whether the client or another component accounts for it. Done means the cause is identified and a supported mitigation or configuration change is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.