fix(bench): drop cgroup page cache between certify subprocesses (#904) - #1071
Conversation
BenchExec attributes file-backed page cache from sequential gf invocations to the 4 GiB cgroup memlimit. S18 Fly evidence showed every certification phase passed with <=555 MiB anonymous RSS while cumulative cgroup memory still reached 4000067584 B after ~3.5 h. Release page cache after each public-command child completes so long progressive qualification lifecycles stay within declared BenchExec limits. Co-authored-by: David Spencer <DecisionNerd@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
Problem
Fly S18 re-qualification with canonical ordered-LIMIT queries completed every GraphForge certification phase (
status: passed, max per-phase anonymous RSS 555 MiB), yet BenchExec terminated the run with OUT OF MEMORY at cgroup memory 4000067584 B after ~3.5 h.Root cause: BenchExec's 4 GiB cgroup memlimit counts file-backed page cache from sequential
gfsubprocess invocations. Each phase stays bounded in anonymous RSS, but cache from multi-TB logical reads accumulates across the full S18 lifecycle (ingest → query → export → reopen_proof).Fix
After each public-command child completes in
graphforge-benchmark-certify, callsyncand write3to/proc/sys/vm/drop_cacheson Linux to release page-cache pressure before the next subprocess starts.Evidence
Downloaded from Fly machine
89122db6197348run #2 (commitc640c49):graphforge-certify-evidence.json: all 10 phasespassed, maxpeak_rss_bytes= 555175936terminationreason=memory,memory=4000067584B,returnvalue=0Testing
cargo test -p graphforge-benchmark-certify(16 passed)cargo clippy -p graphforge-benchmark-certify -- -D warningsCloses #904 (partial — Fly S18 re-run required after merge to confirm full lifecycle under 4 GiB).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Drop cgroup page cache between certify subprocesses in
execute_processrelease_cgroup_page_cachehelper that runssyncand writes"3"to/proc/sys/vm/drop_caches, best-effort with all errors ignored; non-Linux gets a no-op stub.execute_processin lib.rs after the child process exits, so page cache is evicted between subprocess runs.Macroscope summarized 720a140.