Tier RAM budget by host size#752
Conversation
Use 25% of physical RAM on hosts with 16GB or less, 35% on 32GB or less, and 50% above. Expose cbm_mem_ram_fraction_for_total() for unit tests and call it from MCP/CLI startup instead of a fixed 50% fraction. Signed-off-by: Andy11-cpu <canada11@duck.com>
|
Thanks for the RAM-budget split. Triage: high-priority stability/performance work from the memory-pressure track. Review will check that the tiered default is conservative on 16GB machines, does not regress larger-host throughput unexpectedly, and composes correctly with explicit memory-budget overrides. Please keep any benchmark or before/after memory observations in the PR description as it evolves. |
|
Quick status note: this PR is one of four open memory/RAM-policy changes (#833, #752, #586, #685) that we've reviewed individually and found genuinely complementary — so rather than merging them piecemeal, we're doing a combined design pass over the whole memory policy (explicit override, host-tiered defaults, retention bounds, post-index release, and the Windows auto-sync driver in #841) and will respond here with a concrete direction shortly. Your work is very much part of that plan — thanks for your patience! |
|
Thank you — this is a clean, well-judged fix: tiering the RAM fraction by host size (25% ≤16GB / 35% ≤32GB / 50% above) so small and containerized hosts don't over-commit, and it correctly reads the cgroup-aware total so a memory-limited container gets the right tier. Atomic, green on all platforms, with genuine boundary tests. Merged as a960d3d. It composes cleanly with the CBM_MEM_BUDGET_MB explicit override (override still wins) and the retention layer's re-read fallback covers the smaller-budget case with no lost edges. Appreciated — and thanks for splitting this out from the earlier bundle so it could land on its own merits! |
Summary
cbm_mem_ram_fraction_for_total()with unit testsMotivation
Split from #625 — reduces default memory reservation on 16GB machines without changing indexing behavior.
Test plan
mem_ram_fraction_*tier tests intest_mem.cmake -f Makefile.cbm test(CI)Signed-off-by: Andy11-cpu canada11@duck.com