Skip to content

runner: post-pre-run hook before schelk promote (BENCHMARKOOR_POST_PRERUN_CMD) - #315

Draft
CPerezz wants to merge 1 commit into
ethpandaops:masterfrom
CPerezz:state-db-journal-drain
Draft

CPerezz wants to merge 1 commit into
ethpandaops:masterfrom
CPerezz:state-db-journal-drain

Conversation

@CPerezz

@CPerezz CPerezz commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Runs an operator command between "pre-run steps complete, client stopped, fs synced" and schelk promote, so baseline surgery gets baked into the promoted virgin. Hook failure aborts before the promote, so a half-treated baseline can never replace the golden image.

Motivation. A baseline built by replaying a pre-run bundle keeps the last ~4k blocks of geth trie state in the pathdb journal. promote bakes that journal into the golden image and every per-test restore hands it back, so geth loads it into memory on every boot. Accounts deployed in those final blocks are then served from RAM for the whole suite: in our runs one EEST account class read 23x faster than the same class on an identically-hosted generated-state baseline, purely from deploy recency. Draining the journal into the disk layer (and compacting) between pre-run and promote removes the bias.

Usage

BENCHMARKOOR_POST_PRERUN_CMD='drainjournal --datadir $DATADIR && geth db compact --datadir $DATADIR' \
  benchmarkoor run --config config.yaml

Unset (the default) the runner behaves exactly as before.

Write-up with the full investigation and before/after numbers: https://cperezz.github.io/articles/state-db-perf-divergence/state-db-perf-report.html

…ERUN_CMD)

Runs an operator command between 'pre-run steps complete, client stopped,
fs synced' and 'schelk promote', so baseline surgery gets baked into the
promoted virgin. Motivating use: draining geth's pathdb journal into the
disk layer (drainjournal tool) so no benchmark test inherits
journal-resident, RAM-served trie state - the root cause of the DIFF_MAX
divergence (state-db root-cause ledger R1-R3). Hook failure aborts before
promote: a half-treated baseline must never replace the golden image.
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