mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 10:48:20 +00:00
fix(memwaste): index under one explicit budget on every venue
scripts/memwaste.sh set no memory budget, so the daemon derived one from the machine's RAM: 1792 MB on the 7 GB macos-14 runner, about 4 GB on the 16 GB Linux and Windows runners. The event layer itself holds 0.5-1 GB, and on macOS the index stopped with over_memory_budget before it measured anything, in both full-mode runs since the lane was added (dry runs 37212102899 and 38186491924, peaks 3449 and 3111 MB at the stop). The script now passes CBM_MEM_BUDGET_MB=4096, what the larger runners already derived, unless the caller sets one. Checked on macOS arm64 with CBM_WORKERS=3, the macos-14 runner's core count: - budget 1792: over_memory_budget in parallel_extract (rss 3904 MB), the CI failure; - budget 4096: the index completes and the report is written; - the edited script with no budget in the environment: 4096 is applied, rc 0. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
1 parent
a67a3f417a
commit
acf1cc2142
1 file changed
+12
-1
+12
-1
@@ -131,8 +131,19 @@ cleanup() {
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# One explicit memory budget on every venue. Left to the daemon, the budget
|
||||
# follows the machine's RAM: 1792 MB on the 7 GB macos-14 runner, about 4 GB on
|
||||
# the 16 GB Linux and Windows runners. The event layer itself holds 0.5-1 GB, so
|
||||
# on macOS the index stopped with over_memory_budget before it measured anything
|
||||
# (dry runs 2026-10-04 and 2026-10-12). A venue's RAM must not decide whether
|
||||
# the report exists. 4096 is what the larger runners already derived; the index
|
||||
# completes under it on macOS with the runner's 3 workers. CBM_MEM_BUDGET_MB
|
||||
# still overrides.
|
||||
MEMWASTE_BUDGET_MB="${CBM_MEM_BUDGET_MB:-4096}"
|
||||
|
||||
INDEX_RC=0
|
||||
CBM_MEMWASTE=1 CBM_MEMWASTE_OUT="$DUMP_ENV" CBM_CACHE_DIR="$CACHE_DIR" CBM_RUNTIME_DIR="$RUNTIME" \
|
||||
CBM_MEM_BUDGET_MB="$MEMWASTE_BUDGET_MB" \
|
||||
CBM_MEMWASTE=1 CBM_MEMWASTE_OUT="$DUMP_ENV" CBM_CACHE_DIR="$CACHE_DIR" CBM_RUNTIME_DIR="$RUNTIME" \
|
||||
CBM_LOG_LEVEL=error "$RUN_BIN" cli index_repository --repo-path "$REPO" --mode full \
|
||||
>"$OUT/index.json" || INDEX_RC=$?
|
||||
if [ "$INDEX_RC" -ne 0 ]; then
|
||||
|
||||
Reference in new issue
Block a user