mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #2026] [Performance]: Improve erdma register/unregister performance by reducing local memory region bookkeeping overhead #564
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#564
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 @stmatengss on GitHub (May 2, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/2026
We observed that erdma-based
registerLocalMemoryandunregisterLocalMemoryperformance in Mooncake can be improved by reducing the overhead of local memory region bookkeeping in the TransferEngine.Background
The current optimization replaces linear scans over registered memory regions with ordered address-based indexing in the local bookkeeping path. The main goal is to reduce the cost of:
registerLocalMemoryunregisterLocalMemoryThis is especially relevant for erdma deployments with a large number of already-registered regions, where bookkeeping overhead becomes more visible.
What changed locally
We added two manual benchmarks:
mooncake-transfer-engine/tests/memory_region_index_bench.cpp: synthetic bookkeeping benchmark comparing linear scan vs ordered indexmooncake-transfer-engine/tests/transfer_engine_register_bench.cpp: end-to-end benchmark that exercises realTransferEngine::init,installTransport,registerLocalMemory, andunregisterLocalMemoryInitial results
Synthetic bookkeeping benchmark showed large improvements for lookup-hit and register/unregister churn workloads:
End-to-end erdma benchmark showed that the benefit depends on the number of already-registered regions:
ibv_reg_mrdominates and the bookkeeping optimization may not translate into immediate end-to-end gainsMeasured end-to-end erdma numbers
Environment:
rdmaerdma_1Case 1
Current optimized branch:
Main baseline:
Case 2
Current optimized branch:
Main baseline:
Observed improvement in the high-preload case:
Takeaway
For erdma, this optimization is most helpful when Mooncake already maintains a large registered-region set and additional user-space registrations continue to happen on top of that. In small-region or low-preload cases, the verbs registration cost itself can dominate and hide the bookkeeping improvement.
Suggested next steps
update_metadata=falseandupdate_metadata=trueibv_reg_mrcost more clearly in follow-up benchmarks@github-actions[bot] commented on GitHub (Aug 2, 2026):
This issue has had no activity for 90 days and will be closed in 7 days if there is no further activity. Please comment or react if it should stay open.
@github-actions[bot] commented on GitHub (Aug 10, 2026):
Closing due to 3 months of inactivity. If this is still relevant, please comment and we can reopen.