Skip to content

[Store] decouple DRAM decisions from metrics - #3

Draft
Hubert-Zhu wants to merge 1 commit into
mainfrom
codex/decouple-store-dram-usage-metrics
Draft

[Store] decouple DRAM decisions from metrics#3
Hubert-Zhu wants to merge 1 commit into
mainfrom
codex/decouple-store-dram-usage-metrics

Conversation

@Hubert-Zhu

@Hubert-Zhu Hubert-Zhu commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Description

Implements a focused first slice of upstream RFC #3158.

  • Add an authoritative DRAM usage snapshot derived from mounted allocators.
  • Count the shared CXL allocator once without allocating on the 10 ms eviction path.
  • Move memory eviction and promotion watermark decisions away from MasterMetricManager.
  • Add allocator-state and metrics-reset regression coverage.

NoF eviction and the SsdMetricsProvider rename remain out of scope for this draft.

Module

  • Mooncake Store (mooncake-store)

Type of Change

  • Refactor

How Has This Been Tested?

Test commands:

git diff --cached --check
rg -n 'get_global_mem_used_ratio' mooncake-store/src mooncake-store/include
./scripts/code_format.sh --staged
/usr/bin/clang++ -std=c++20 -fsyntax-only -I./mooncake-store/include -I./mooncake-common/include mooncake-store/src/segment.cpp

Test results:

  • Unit tests pass — not run locally because this macOS environment has no CMake or Boost.
  • Integration tests pass (not applicable to this focused internal refactor)
  • Static diff and residual-call-site checks pass.
  • Formatting script was attempted but clang-format 20 is unavailable locally.
  • Direct syntax compilation was attempted but stopped at the missing Boost headers.
  • The fork currently exposes no enabled GitHub Actions workflows, so this Draft PR has no CI run yet.

Checklist

  • I have performed a self-review of my own code
  • I have formatted my code using ./scripts/code_format.sh (clang-format 20 unavailable)
  • I have run pre-commit run --all-files and all hooks pass (pre-commit unavailable)
  • Documentation is not required for this internal behavior-preserving refactor
  • I have added tests to prove my changes are effective
  • The existing RFC is #3158

AI Assistance Disclosure

  • AI tools were used

Codex helped trace the allocator/metrics dependency, implement the focused change, and add tests. The human submitter should review and understand every changed line before any upstream submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant