Scan ETA: retune HDD per-file weight to 256 KiB - #101
Merged
Conversation
The HDD file weight (per-file overhead in byte-equivalents) was an unmeasured 1 MiB guess. A cold full hash on a 4-HDD btrfs RAID (1.71M files, 4.9 TiB) calibrated it: overhead=7.7ms/file, hash=30.1s/GiB -> ideal weight ~268 KiB/file, vs the 1 MiB shipped (~3.8x too large). Set it to 256 KiB. Too-large a weight only degrades the ETA toward a plain file-rate estimate (over-weighting the small-file tail); 256 KiB matches the measurement. SSD stays 32 KiB (measured ~30). No logic change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
The scan ETA weights each file as a fixed number of byte-equivalents of work (its per-file open+
do_fiemap+DB overhead, thed/kratio). The HDD constant was an unmeasured 1 MiB guess.A cold full hash on a 4-HDD btrfs RAID (1.71M files, 4.9 TiB) calibrated it:
So the shipped 1 MiB is ~3.8× too large. Set it to 256 KiB (2¹⁸), matching the measurement.
Too-large a weight is self-limiting (it only degrades the ETA toward a plain file-rate estimate, over-weighting the small-file tail — it can't run away), so this is an accuracy improvement, not a correctness fix. SSD stays 32 KiB (measured ~30). No logic change — one constant.
Testing
make check— all 91 tests pass; clean build (warnings = failure gate).🤖 Generated with Claude Code