mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[PR #902] [MERGED] [Store]: Add option to use jemalloc in mooncake store master #1893
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#1893
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?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/Mooncake/pull/902
Author: @nickyc975
Created: 9/29/2025
Status: ✅ Merged
Merged: 9/30/2025
Merged by: @ykwd
Base:
main← Head:jinlong/jemalloc📝 Commits (2)
4375b11[Store]: Add option to use jemalloc in mooncake store master1353825Address code review issues📊 Changes
4 files changed (+22 additions, -1 deletions)
View changed files
📝
.devcontainer/Dockerfile(+5 -1)📝
CMakeLists.txt(+2 -0)📝
dependencies.sh(+1 -0)📝
mooncake-store/src/CMakeLists.txt(+14 -0)📄 Description
With more tests and analysis, we found that the root cause of #834 is serious memory fragmentation.
Insertion and deletion of metadata in Mooncake Master are accompanied by allocation and deallocation of small memory objects (typically hundreds of bytes). With large amount of metadata being inserted and removed, the memory space of Master gets seriously fragmented, resulting in unexpected memory consumption.
Using a more modern memory allocator (i.e. jemalloc) can effectively alleviate this problem. Here is a comparision between the default libc allocator and jemalloc:
Test script:
Test results:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.