Repository navigation
Native release: a speed smoke of the candidate wheel against the previous release - #457
Merged
Merged
Conversation
…ious release (refs #404) Two native wheels built from one commit differ in speed by about a third on the single-record UPDATE, because a native-image build is not reproducible and the speed of a hot path is a draw from a spread. The release has to measure the wheel it publishes. scripts/native_update_smoke.py runs the process state of the paper cell on synthetic rows in a throw-away uv environment per wheel, one fresh process per wheel per round, in an interleaved ABBA order, with the baseline against itself as the control. It prints the ratio of the median of the per-round ratios with a bootstrap 95% interval, the library sha256 and the engine version of each candidate, and a verdict (PASS when the upper end is below 1.10). The exit status is 0 when a candidate passed, 1 when none did, 2 for a refused run and 3 when the control is outside 0.97 to 1.03. It refuses more than 4 allowed cores unless --quick, and each process checks that it loaded the library of its wheel. The runbook is development/release-native-smoke.adoc: when to run it (while Publish to PyPI waits for the reviewer, on the artifact that job will upload), the commands, how to read the verdict, what to do when none passes (reject, re-run, up to 4 builds), and what goes into the release notes. The tests cover the pure parts only and need no JVM, native library or wheel. This only refers to #404: the issue stays open until the 26.12.1 release has used the smoke.
This was referenced Nov 23, 2026
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 does this PR do?
I added the release-time speed smoke that #404 asks for:
scripts/native_update_smoke.pyand its runbookdocs/modules/ROOT/pages/development/release-native-smoke.adoc. Native wheels built from one commit differ in speed on the single-recordUPDATE, so the release has to measure the wheel it publishes. The tool takes the previous release as the baseline and one or more candidate wheels, and measures them on the current host in one session.What it measures: each wheel is installed into its own throw-away environment (
uv run --no-project --with <wheel>, from a private copy named by its sha256), and one fresh process per wheel per round runs the process state of the paper cell on synthetic rows (the async executor, the parallel columnar load ofLineItemwith 300,000 rows, thePartload with 200,000 rows, the indexes, the warm-up), then the single-record phases, each operation in its ownbeginandcommitpair. The verdict figure is the median latency per operation ofUPDATE Crud SET qty = 2 WHERE ckey=:cwith a parameter, throughcommand(). The order is interleaved (ABBA over the rounds). The ratio is the median of the per-round ratios against the baseline with a 95% percentile bootstrap interval. The control is the baseline against itself in its own processes of the same session. Each process hashes the library it loaded and compares it with thelibarcadedb.somember of its wheel.--max-ratio, default 1.10)--quick, fewer than 8 or an odd number of rounds, a wheel that does not load, a library that is not the wheel's)The tool reads
Cpus_allowed_listfrom/proc/self/status, records it, and does not pin anything itself: the caller pins it and every process checks that it runs on the same set.--outwrites a JSON file with the host, the allowed cores, the hashes of the wheels and libraries, the schedule, every process and every ratio and interval. The default is 12 measured rounds plus one warm-up round.--hash-onlyprints the library sha256 of a wheel, for the release notes and for checking a published wheel afterwards.How to run it (the runbook has the full commands, including how to get the candidate from the artifact
native-release-distwhilePublish to PyPIwaits for its reviewer, and what to write into the release notes):What it leaves out of the cell: real TPC-H data (the rows are synthetic, of the same columns and types,
LineItema tenth of scale factor 1 andPartthe scale-1 count), the harness around the cell (its container, its memory sampler, its other phases and queries), and the key streams of the cell (the keys come from a seeded generator of the script). The heap and the relaxed WAL flush of the cell are set throughARCADEDB_NATIVE_ISOLATE_ARGS(--isolate-args, default-Xmx8g -Darcadedb.txWalFlush=0). A pass says something about the host class where it ran and about the Linux x86-64 wheel only.Two things I did not do. I did not run the tool on a real wheel: this PR was written with static checks only, no timed run and no dispatched build, so the measurement process (the part that imports
arcadedb) is checked by reading, and the first real run is on a compare lane before the 26.12.1 release. And the sha256 does not go into the release notes by a script:release-notes.ymlrewrites the notes, so the runbook adds the lines by hand after the release exists. The repository has notools/folder, so the script is inscripts/with the other release tools.Related issues
Refs #404. The issue stays open until the 26.12.1 release has used the smoke.
Performance changes
None to the library or the bindings: this adds a measurement tool and its docs, and changes nothing on a hot path. No timed A/B ran for this PR.
Docs
New page
development/release-native-smoke.adoc(the runbook, in the navigation) and one line in the native release section ofdevelopment/release.adocthat points to it.Checklist
tests/test_native_update_smoke.py(the ratio and bootstrap arithmetic, the ABBA schedule, the allowed cores, the verdict and exit status, the library member hash of a fake wheel, the session loop with a fake process). They need no JVM, no native library and no real wheel, so the file is in neitherNATIVE_NOT_APPLICABLEnorWINDOWS_NOT_APPLICABLE, like the other tests of release scripts.uvx pre-commit run --files <changed files>passes (run twice)compile()andpyflakesclean on the two Python files