Bench/infra: collision-safe EC2 provisioning, harness hooks, EC2 validation runbook - #30
Merged
Conversation
…validation runbook - clickbench/launch-ec2.sh: never terminate existing instances implicitly; launching aborts with --name guidance if the name is taken, and teardown requires explicit --terminate-only. PROFILE/KEY_NAME/KEY_FILE/NAME are env-overridable; personal key-pair defaults removed (KEY_NAME must now be provided, KEY_FILE derives from it). - tests/clickbench_queries.py: add Q21 to LIMIT_TIE_QUERIES — at subset scales the top-10 boundary ties at c=1-2, so plain-PG vs pg_deltax result comparison must treat tie-filler rows as equivalent. - dev/docs/EC2_VALIDATION_PLAN.md: runbook for validating session perf work on full 100M-row ClickBench EC2 hardware (A/B GUC discipline, per-improvement measurements, leaderboard generation, setup tuning gap).
…, doc fixes - launch-ec2.sh: --terminate-only now refuses to run without an explicit --name (or NAME env) — terminating whatever holds the default name was the same implicit-termination hazard this PR removes. Validate --name has a non-empty value (clean error instead of a set -u unbound $2), guard $USER under set -u, and move the account-level enable-serial-console-access call into the launch path only, after all abort checks. - clickbench/Makefile: fix stale launch-ec2 comment that still claimed implicit termination. - EC2_VALIDATION_PLAN.md: preface note that partition blooms / partition_bloom_filters / blob_storage / .dxs land in sibling PRs and that #NN means PERF_IMPROVEMENTS.md numbering; genericize the branch checkout step; rewrite section 4 to point at the existing make bench leaderboard automation (the manual commands had a personal ~/src path and a mkdir-after-redirect ordering bug). - tests/clickbench_queries.py: collapse Q21 comment to one line.
SferaDev
marked this pull request as ready for review
June 12, 2026 12:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What / Why
Benchmark and infra changes only — no Rust. Extracted from a longer perf session (
perf/clickhouse-gap-session) that is being split into review-ready PRs.clickbench/launch-ec2.sh— collision-safe provisioning--name <name>-$USER) if the name is taken.--terminate-only --name <name>— it refuses to run against the implicit default name, so you must name the instance you are destroying.PROFILE/KEY_NAME/KEY_FILE/NAMEare env-overridable.KEY_NAMEhas no default and must be provided (clear error before any AWS call);KEY_FILEderives from it (~/.ssh/$KEY_NAME.pem), including the serial-console.pubhint.--namevalidates a non-empty value (clean error instead of aset -uunbound-variable crash),$USERis guarded underset -u, and the account-levelenable-serial-console-accesscall only runs in the launch path, after all abort checks — teardown and every error path make no AWS mutations.clickbench/Makefile: stalelaunch-ec2comment (still claimed implicit termination) updated. The Makefile's owndestroy-ec2/destroy-reference-ec2targets do their inline AWS teardown against fixed names and are unaffected.tests/clickbench_queries.py— Q21 tie handlingQ21 added to
LIMIT_TIE_QUERIES(tie column =c, index 2): at subset scales (≤10M rows) the top-10 boundary ties at c=1–2, so any tie-filler row set is a valid result. Needed for correct plain-PG vs pg_deltax result-equality checks in the local bench harness.dev/docs/EC2_VALIDATION_PLAN.md— EC2 validation runbookRunbook for validating the session's perf work on the full 100M-row ClickBench on c6a.4xlarge: baseline-first discipline, per-improvement measurement table, GUC A/B kill-switch discipline, official leaderboard-page generation (via the existing
make benchautomation), and a recorded setup gap (stock PG tuning aftermake setup). It references features that do not exist onmainyet — partition blooms (pg_deltax.partition_bloom_filters), storage-v2 (pg_deltax.blob_storage,.dxs), merge rework — which land in sibling PRs being split from the same session; the doc carries an explicit preface note saying so, and clarifies that its#NNnumbers arePERF_IMPROVEMENTS.mdimprovement numbers, not GitHub PRs. IPs/credentials/instance ids scrubbed (uses<ip>placeholders).Measured numbers
None — this PR is harness/infra only; no performance claims.
Testing
bash -n clickbench/launch-ec2.sh— clean.python3 -m py_compile tests/clickbench_queries.py— clean.KEY_NAME→ exit 1 with guidance;--terminate-onlywithout--name→ exit 1;--namewith missing/empty value → exit 1; unknown option → exit 1 + usage. None of them reach an AWS call.make build/clippy/testnot applicable.Notes
mainverified to contain only the above.