Revert "io/writeback: WRITEBACK_CHUNK_BYTES 32 -> 128 MiB"

This reverts commit 50867516b8.
This commit is contained in:
MattJackson
2026-05-16 09:30:44 -07:00
parent 39f2d0e992
commit b3576f2ae6
+4 -18
View File
@@ -121,24 +121,10 @@ use std::thread::{self, JoinHandle};
use super::writeback::WritebackPipeline; use super::writeback::WritebackPipeline;
/// Initial granularity at which the Linux writeback pipeline issues /// Granularity at which the Linux writeback pipeline issues
/// `sync_file_range` / `posix_fadvise(DONTNEED)` pairs. The pipeline's /// `sync_file_range` / `posix_fadvise(DONTNEED)` pairs. 32 MiB is the
/// adaptive autotuner grows/shrinks this between /// historical default — bounded-cache pressure stays at ~2 × this size.
/// [`super::writeback::linux::CHUNK_BYTES_MIN`] and `CHUNK_BYTES_MAX` const WRITEBACK_CHUNK_BYTES: u64 = 32 * 1024 * 1024;
/// based on p95 of `WAIT_AFTER` latency.
///
/// 0.21.14: bumped from 32 MiB to 128 MiB. On NFS,
/// `sync_file_range(WAIT_AFTER)` translates to an NFS COMMIT RPC whose
/// completion ack arrives within ~10 ms (measured via mountstats), so
/// the adaptive autotuner — which only grows when p95 > 200 ms —
/// never triggered and the pipeline sat at 32 MiB forever, paying
/// COMMIT-RPC overhead per ~1 s of writes. Empirical 2026-05-15:
/// bidirectional mux on rip1 capped at ~29 MB/s write side while the
/// rig's bidirectional dd ceiling is ~91 MB/s write + ~65 MB/s read.
/// At a larger initial chunk the COMMIT cadence drops 4×, leaving
/// the dirty-cache invariant intact (bounded at ~2 × chunk = 256 MiB,
/// well under the kernel's `vm.dirty_ratio` cap on a 32 GB rig).
const WRITEBACK_CHUNK_BYTES: u64 = 128 * 1024 * 1024;
/// Maximum bytes outstanding in the muxer → writer-thread ring. Sized /// Maximum bytes outstanding in the muxer → writer-thread ring. Sized
/// to cover ~4 s of muxer output at a 32 MB/s peak — enough to absorb a /// to cover ~4 s of muxer output at a 32 MB/s peak — enough to absorb a