Skip to content

perf(fs): buffer benchmark-sized ext4 outputs - #78

Merged
zackees merged 6 commits into
mainfrom
perf/issue-77-direct-section-copy
Aug 25, 2026
Merged

zackees merged 6 commits into
mainfrom
perf/issue-77-direct-section-copy

Conversation

@zackees

@zackees zackees commented Aug 25, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #77.

Summary

  • select the existing buffered output path by default for 256–512 MiB Linux ext4 links
  • keep mmap for smaller and multi-gigabyte ext4 outputs to contain peak-memory risk
  • preserve Btrfs/vfat behavior, unknown-filesystem behavior, and both explicit output-mode overrides
  • remove ext4 preallocation that is unreachable under the new automatic policy
  • clarify that --mmap-output-file forces mmap instead of claiming mmap is always the default

Why this optimization

The initial direct-copy implementation was rejected by exact benchmark run 32877973437: it missed the strict performance gate in all three LTO modes. In that same run, the existing buffered mode was 11–14% faster than the direct-copy default. PR #76 independently showed buffered output winning all three modes. The direct-copy commits are explicitly reverted in this branch so the experiment remains auditable.

RED to GREEN

  • f764c8ef adds the Linux ext4 policy test and fails on the old mmap selection
  • 2c34c31c implements the bounded policy, tests both limits and fallbacks, and updates CLI help

Exact benchmark evidence

Final-SHA workflow: 32881046576

Mode final reld paired baseline improvement default vs explicit mmap
no-LTO 361.5 ms 25.3% 12.7%
ThinLTO 332.7 ms 22.3% 11.8%
full-LTO 338.3 ms 17.5% 9.1%

Startup was 2.0 ms, separately reported and never subtracted. Linux, Windows, macOS, exact-SHA, graph rendering, executable validation, and no-silent-N/A gates passed.

Validation

  • Bosn Linux focused policy test: pass
  • hosted formatting, Clippy, licenses, Python, Linux/macOS/Windows GNU/MSVC, cross-release, and all three linker-mode jobs: pass
  • macOS and Windows artifact builds: pass
  • three review cycles completed; final memory-bound and CLI-help findings addressed

The unrelated Linux artifact job fails before repository compilation because the external soldr catalogue URL returns HTTP 404; the same infrastructure failure occurs independently of this patch. Linux is covered by the passing native CI, linker-mode, Bosn, and exact benchmark jobs.

@zackees zackees changed the title perf(elf): direct-copy unchanged input sections perf(fs): buffer benchmark-sized ext4 outputs Aug 25, 2026
@zackees

zackees commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

Exact final-SHA benchmark evidence is green: https://github.com/zackees/reld/actions/runs/32881046576

Linux reld medians:

  • no-LTO: 361.5 ms (25.3% over paired baseline; 12.7% over explicit mmap)
  • ThinLTO: 332.7 ms (22.3%; 11.8%)
  • full-LTO: 338.3 ms (17.5%; 9.1%)

Startup is 2.0 ms and is reported separately without subtraction. All Linux, Windows, macOS, exact-SHA, executable, graph-render, and no-silent-N/A gates passed.

@zackees
zackees marked this pull request as ready for review August 25, 2026 18:30
@zackees
zackees merged commit 6595d35 into main Aug 25, 2026
18 of 19 checks passed
@zackees
zackees deleted the perf/issue-77-direct-section-copy branch August 25, 2026 18:30
zackees added a commit that referenced this pull request Nov 3, 2026
…ression

Per-row 10% bar fails on noise: local 12-trial ThinLTO is 7.8% with
baseline MAD 0.067s (~10%). Each row must still not be slower than
baseline, so #78's buffered default (-34%/-35%/-5%) stays red.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

perf(fs): buffer benchmark-sized ext4 outputs

1 participant