Skip to content

fix(bench): drop cgroup page cache between certify subprocesses (#904) - #1071

Merged
DecisionNerd merged 1 commit into
mainfrom
cursor/904-cgroup-cache-release-5258
Sep 1, 2026
Merged

DecisionNerd merged 1 commit into
mainfrom
cursor/904-cgroup-cache-release-5258

Conversation

@DecisionNerd

@DecisionNerd DecisionNerd commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

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 gf subprocess 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, call sync and write 3 to /proc/sys/vm/drop_caches on Linux to release page-cache pressure before the next subprocess starts.

Evidence

Downloaded from Fly machine 89122db6197348 run #2 (commit c640c49):

  • graphforge-certify-evidence.json: all 10 phases passed, max peak_rss_bytes = 555175936
  • BenchExec XML: terminationreason=memory, memory=4000067584B, returnvalue=0

Testing

  • cargo test -p graphforge-benchmark-certify (16 passed)
  • cargo clippy -p graphforge-benchmark-certify -- -D warnings

Closes #904 (partial — Fly S18 re-run required after merge to confirm full lifecycle under 4 GiB).

Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Note

Drop cgroup page cache between certify subprocesses in execute_process

  • Adds a Linux-only release_cgroup_page_cache helper that runs sync and writes "3" to /proc/sys/vm/drop_caches, best-effort with all errors ignored; non-Linux gets a no-op stub.
  • Calls the helper on every return path in execute_process in lib.rs after the child process exits, so page cache is evicted between subprocess runs.
  • Behavioral Change: benchmarks now evict page cache after each subprocess, which may reduce cross-run cache interference and slow down individual runs that previously benefited from warm cache.

Macroscope summarized 720a140.

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>
@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: 04c69a23-9f23-485a-b384-d75ed8f143f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 @coderabbitai help to get the list of available commands.

@DecisionNerd
DecisionNerd marked this pull request as ready for review September 1, 2026 23:20
@DecisionNerd
DecisionNerd merged commit 0b0b535 into main Sep 1, 2026
21 checks passed
@DecisionNerd
DecisionNerd deleted the cursor/904-cgroup-cache-release-5258 branch September 1, 2026 23:50
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.

fix(exec): bound reopen and fixed-hop LIMIT query RSS at scale

2 participants