Repository navigation
exp: hydrate extraction A/B (do not merge) - #4010
Draft
bryan-minimal wants to merge 2 commits into
Draft
bryan-minimal wants to merge 2 commits into
bryan-minimal wants to merge 2 commits into
Conversation
…do not merge) Experiment branch for minimal#1192. Adds env toggles, read once per process, whose defaults keep today's behaviour: - MINIMAL_EXP_EXTRACT_SYNC=per_file|none|end|end_files: when extracted files are flushed (end = one syncfs(2) of the destination's filesystem). - MINIMAL_EXP_XZ=lzma_rs|lzma_rust2: lzma-rust2's streaming XzReader feeds the tar reader directly, with no tempfile. - MINIMAL_EXP_EXTRACT_BLOCKING=0|1: SourceLoad extracts on the blocking pool. Also adds crates/common/examples/extract_bench.rs (concurrent extractions in a tokio runtime with a 10 ms heartbeat to show worker starvation) and scripts/exp/hydrate-ab.sh (fetch the pkgs tarballs, run the matrix per disk). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
The tar reader stops at its end-of-archive blocks, so the streaming decoder never reached the xz index and footer: the malformed-xz fixture extracted without error. Read the stream to its end so those checks run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Experiment branch. Do not merge. For the A/B runs proposed in #1192 (hydrate cost). Every toggle defaults to today's behaviour, so a build with none set extracts exactly as before.
Toggles (env, read once per process)
MINIMAL_EXP_EXTRACT_SYNCper_file|none|end|end_filessync_allafter each file / never / onesyncfs(2)after the extract / fsync every file after the extract.drop(f)(the ETXTBSY guard) always stays.MINIMAL_EXP_XZlzma_rs|lzma_rust2XzReaderstreams into the tar reader like gzip/zstd. Both are wrapped incatch_unwind.MINIMAL_EXP_EXTRACT_BLOCKING0|1SourceLoadextracts inline (today) or throughtokio::task::spawn_blocking.Bench and matrix
crates/common/examples/extract_bench.rsruns N concurrent extractions per rep in a K-worker multi-thread runtime, either inline in a task (asSourceLoaddoes today) or via spawn_blocking. A heartbeat task ticks every 10 ms, and its lateness (max/p99) shows worker starvation. Output is JSONL: wall, thread CPU, files, bytes. Each tree is deleted once it has been measured.scripts/exp/hydrate-ab.shhas three subcommands:list,fetch CACHE(the pkgs URLs and sha256s), andrun --cache --dest --out(sync x xz x mode x concurrency, interleaved rounds, a discarded warm-up, a free-space check per cell, and the fs, device and mount options recorded on every line). It needs no root.A unit test checks that every toggle combination extracts the same tree as the default, and that lzma-rust2 returns an error, not a panic, on the malformed-xz fixture.
🤖 Generated with Claude Code