* perf(ecstore): reduce allocations for bounded bitrot frames * test(s3): cover dynamic block layouts over HTTP * perf: measure quantized range read shape * chore: checkpoint quantized read metrics draft Save work in progress for collaboration. Counts omit retired readers and transient or cancelled hedges. Frame semantics, async recorder coverage and disabled-metrics overhead remain unresolved; these counters are not ready for performance conclusions. Validation: rustfmt and ecstore check passed; io-metrics 120, quantized 4 and hashed-read 3 tests passed. No new live or performance validation. * perf(ecstore): reduce dynamic layout read overhead * fix(ecstore): avoid prefetching conservative short range tails * perf(ecstore): compact deferred shard reader state * perf(ecstore): include shard checksums in file buffer cap * fix(ecstore): preserve bounded quantum frames during heal * perf(ecstore): reuse owned quantized frame batches * perf(ecstore): batch q reads and retain shared copy framing * fix(ecstore): preserve typed quantized read errors * perf(ecstore): avoid zero-fill and serial copies in local batch reads The local batch reader zero-initialized every window at a nonzero offset before reading it, and copied every shard serially inside one blocking task. Two-segment q-window range reads (cross-shard, cross-block) pay both costs twice per request. Read each window with a positioned read into uninitialized Vec capacity, and dispatch each shard separately when every window is at least 512 KiB, where copies dominate blocking-pool round trips. Smaller windows keep one coalesced dispatch. * perf(ecstore): keep readahead pipelined for local batch windows A single window-sized pread on cold pages waits on each kernel readahead chunk in turn. Seek to the window start and fill the buffer with read_to_end over a length-limited reader instead: it still reads into uninitialized spare capacity, but its growing sequential reads keep readahead pipelined. Warm windows cost the same. * Revert "perf(ecstore): keep readahead pipelined for local batch windows" This reverts commitc252fca525. On the ESSD-backed cloud footprint, the growing read_to_end reads were slower than one window-sized positioned read for cold windows at nonzero offsets (cross-block -27% on 4 MiB layouts, cross-shard -21% on 64 KiB layouts versus the previous batch reader). The local benchmark that motivated the change ran on a WSL virtual disk and did not represent the target storage. Keep the single positioned read into spare capacity and the per-shard dispatch for large windows. * perf(ecstore): choose the batch read method by window size Measured on ESSD-backed cloud storage, a cold window of about 1 MiB is fastest as one positioned read, which completes as a single device request, while windows of 2 MiB and more are faster with growing sequential reads that keep readahead pipelined (one large read waits on each readahead chunk in turn). Use one positioned read up to 1.5 MiB and a seek plus length-limited read_to_end above it. Both paths read into uninitialized spare capacity; per-shard dispatch for large windows is unchanged. * perf(ecstore): read local batch windows with an exact readahead hint Kernel readahead sizes its first request from the read size. A cold 16 KiB window at offset 0 pulled 64-128 KiB, and a single 2 MiB read was split into serial readahead chunks that cached almost twice the window, which is why neither the single positioned read nor growing sequential reads won for every window size on block storage. Announce each window with POSIX_FADV_WILLNEED, which submits exactly the window at once, and then fill the exact spare capacity with positioned reads. This replaces the size-based choice between the two read methods. The hint is advisory and its failure does not fail the read. A residency test checks that cold reads cache only their window; it failed with the hint disabled (a 5-page window cached 32 pages). * perf(ecstore): use half-shard read quantum at 1 MiB EC layout * revert(release): defer certification rollout for 1.0.5 (#9254) Reverte5563e6004only on release/1.0.5. Its trusted verifier workflow and immutable-candidate integration are not available yet. Restore the previous publication path under the approved release policy; retain the completed product regression and preview acceptance requirements. * fix(ecstore): preserve legacy full-shard framing for default 1 MiB layout * perf(ecstore): enable direct-memory GET and coalesce cross-shard range reads for bounded-quantum blocks * chore(ecstore): remove unused schedule_bitrot_reader_task wrapper * fix(ecstore): run delete-recovery discovery off the metadata lane Bucket-wide delete-recovery discovery starts with the server and walks the whole bucket tree in pages of up to 4096 entries, one lstat per entry. Each page ran on the per-disk namespace queue's foreground lane, which has a single worker and also serves GET metadata reads. On a cold tree a page holds that worker for hundreds of milliseconds, so every GET on the disk waits behind it until the walk finishes. Run the page on the queue's sync lane instead, as the delete-transaction inspection already does for the same reason. The namespace lease and the page bounds are unchanged. The regression test occupies the foreground lane and requires a discovery page to complete within ten seconds; it times out without this change. * test(ecstore): align read_appending rollback assertions on error * fix: align multipart and EC read paths with current workspace APIs --------- Co-authored-by: Xiaoyang Han <lux1an@qq.com> Co-authored-by: Chris An <anzhengchao@gmail.com>
4.2 KiB
Dynamic block size HTTP regression
Use this when: validating S3 block hints, multipart layout persistence, or reads after disabling the bounded-frame write rollout.
Before performance measurements, verify physical shard checks and recovery:
cargo test -p rustfs-ecstore --lib bounded_quantum_ -- --test-threads=1
These regressions cover healthy deep verification, normal/deep repair after a missing shard, exact restored frame bytes, and Range reads with the write gates disabled. They also retain the legacy framing control and reject invalid or conflicting persisted q metadata. HTTP GET success alone does not validate heal.
scripts/dynamic_block_size_e2e.py checks S3 PUT and multipart initiation hints
against a disposable RustFS endpoint. Install boto3 in a test virtualenv and
export AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for that endpoint. The SDK
performs SigV4 signing; the helper bypasses proxies and disables retries.
Start a freshly built RustFS binary with four isolated local volumes, compression disabled, and these process environment variables:
RUSTFS_EC_BLOCK_SIZE_HINT_ENABLE=true
RUSTFS_EC_BLOCK_SIZE_HINT_FLEET_CONFIRMED=true
RUSTFS_EC_READ_QUANTUM_ENABLE=true
RUSTFS_EC_READ_QUANTUM_FLEET_CONFIRMED=true
For four test directories on the same physical disk, the existing local-test
configuration RUSTFS_UNSAFE_BYPASS_DISK_CHECK=true is also necessary. Use it
only for this disposable functional test; it does not validate disk independence.
Four volumes use two data shards and two parity shards. This geometry supports the bounded bitrot read quantum; a geometry with six or twelve data shards does not currently select a smaller quantum for the allowed block sizes.
python scripts/dynamic_block_size_e2e.py --endpoint http://127.0.0.1:19180 \
--bucket dynamic-block-restart-test --keep
The helper writes non-inline deterministic payloads using 64 KiB, 256 KiB, 1 MiB,
and 4 MiB hints, plus default and unsupported-size probes. It checks actual B
and hint status/reason in write responses, then validates HEAD, full GET, and
Ranges spanning EC block and multipart boundaries. A malformed enabled hint
must return InvalidArgument. JSON output contains no credentials. Use a fresh
bucket for write runs; existing probe objects are never overwritten.
Stop only that test server, restart the same binary with the same volumes and all four gates false, then verify persisted layouts without rewriting objects:
python scripts/dynamic_block_size_e2e.py --endpoint http://127.0.0.1:19180 \
--bucket dynamic-block-restart-test --verify-only
Separately run against a server with block hint enable false using
--write-policy disabled, or enable true and fleet confirmation false using
--write-policy fleet-unconfirmed. Both must report ignored hints and actual
B of 1 MiB. Without --keep, ordinary write runs remove only the objects they
created and their disposable bucket. Verify-only runs never delete data.
B is exposed by x-rustfs-effective-ec-block-size. The internal q marker is
deliberately filtered from public metadata. For isolated local volumes, decode
an object's xl.meta using the existing filemeta example:
cargo run -p rustfs-filemeta --example dump_fileinfo -- /path/to/object/xl.meta
Confirm both x-rustfs-internal-ec-read-quantum and
x-minio-internal-ec-read-quantum agree. With two data shards, non-inline 4 MiB
objects use q=1048576; 64 KiB and 256 KiB use q=16384 and q=65536 respectively.
The 1 MiB layout keeps the historical full shard frame and has no q marker.
For a cross-repository probe, write one task-prefixed object with BrewFS's
object-put-bench, then check its actual layout and Range bytes:
python scripts/dynamic_block_size_e2e.py --endpoint http://127.0.0.1:19180 \
--bucket brewfs-task-bucket --external-prefix dynamic-block-task/ \
--external-block-size 4194304 --external-size 6291713 \
--external-sha256 "$EXPECTED_SHA256"
External verification reads only the selected prefix and never deletes it. The optional size and SHA-256 checks validate the intended payload before comparing Range bytes to full GET bytes. SHA-256 must be exactly 64 hexadecimal characters.