Skip to content

Scan ETA: retune HDD per-file weight to 256 KiB - #101

Merged
martinus merged 1 commit into
masterfrom
eta-hdd-weight
Jul 23, 2026
Merged

Scan ETA: retune HDD per-file weight to 256 KiB#101
martinus merged 1 commit into
masterfrom
eta-hdd-weight

Conversation

@martinus

Copy link
Copy Markdown
Owner

What

The scan ETA weights each file as a fixed number of byte-equivalents of work (its per-file open+do_fiemap+DB overhead, the d/k ratio). 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:

overhead=7702.9us/file  hash=30.11s/GiB  ->  ideal weight 268 KiB/file (using 1024 KiB)

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).
  • Anchored on the same real-hardware calibration line the change documents.

🤖 Generated with Claude Code

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>
@martinus
martinus merged commit b98ff98 into master Jul 23, 2026
4 checks passed
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.

1 participant