mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4337] [RFC][Store] Offline timestamped master RPC trace replay #1088
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#1088
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 @CHiSwsz on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4337
Problem
Running a serving simulator and a Mooncake master together on a CPU-only host makes their CPU and memory contention part of the measurement. A saved sequence of master calls lets us stop the producer, repeat the same offered workload against a dedicated master, and inspect metadata pressure and background eviction separately from model execution and KV payload transfers.
The proposed addition accepts an external timestamped RPC-intent trace. It does not require or vendor SGLang, a model, a simulator fork, or generated workloads in Mooncake.
Related work and scope
Proposed design
Fake segment addresses represent logical capacity only: no KV payload is allocated or transferred. Use a fresh, dedicated master. The trace is fully parsed before timed replay; memory use grows with trace size. Summary generation avoids copying the full event trace for each phase.
Boundaries and alternatives
This is fixed-intent replay, not a closed-loop serving simulator. Actual misses and errors can differ from the producer's state; RPC latency does not feed back into future request generation. Logical GPU counts are provenance, not throughput calibration. Shared memory bandwidth and host contention remain possible even with disjoint CPU affinity.
The initial contract excludes HA recovery, topology changes during workload, transfers, placement/pinning policies and disk replicas. Producers must not silently discard such semantics. A small handwritten example and deterministic test fixtures are included; generated traces and framework adapters remain external.
A Python-only driver would need suitable direct master bindings; the existing C++ MasterClient provides the required metadata APIs without bringing a serving framework or payload path into the benchmark. The runtime synthetic workload in #3147 remains a complementary approach when no recorded trace is available.
Validation and review
The implementation branch is benchmark/master-rpc-trace-replay. It contains benchmark code, documentation and tests only; production master code and RPC schemas are unchanged.
Validation covers parser rejection, dependency scheduling, overload lag, phase barriers, partial writes, multiple slices per object, real-master lifecycle and heartbeat handling, workload-only metrics, and background eviction on an external fixed-capacity trace.
Feedback is welcome on the trace contract, overlap with other benchmark tooling, and whether this should remain a separate target or later share common launcher/reporting infrastructure.
AI assistance: Codex assisted with implementation, tests, documentation and this RFC. Human line-by-line review is pending and will remain explicit in the draft PR.
@github-actions[bot] commented on GitHub (Sep 26, 2026):
Thanks for opening this issue, @CHiSwsz!
94686251A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide