From ab8f8b94dcfa4984d95c91a10c4322ec5fde8a74 Mon Sep 17 00:00:00 2001 From: houseme Date: Sun, 23 Aug 2026 13:47:33 +0800 Subject: [PATCH] perf(runtime): enable fsync thread isolation by default (#6438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change DEFAULT_FSYNC_BLOCKING_THREADS from 0 to 64 to isolate fsync/fdatasync operations into a dedicated blocking thread pool. A/B validation on 4-node EC cluster (testing, 10.0.0.5/8/9/11:9000): PUT 256KiB c16: p99 226ms → 135ms (−40%), p50 60ms → 19ms (−68%) GET 256KiB c16: p99 3.97ms → 3.63ms (−9%), throughput +1.8% GET 4KiB c64: neutral (pure read, no fsync involvement) Without isolation, fsync operations contend with read I/O (pread/stat/open) on the main blocking pool, causing device-bound fsync to starve read operations under mixed PUT+GET workloads. Co-authored-by: heihutu --- crates/config/src/constants/runtime.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/config/src/constants/runtime.rs b/crates/config/src/constants/runtime.rs index 783ad6993..36fc33141 100644 --- a/crates/config/src/constants/runtime.rs +++ b/crates/config/src/constants/runtime.rs @@ -60,9 +60,9 @@ pub const DEFAULT_RNG_SEED: Option = None; // None means random /// Dedicated blocking thread pool for fsync/fdatasync operations. /// When > 1, fsync operations are isolated from the main blocking pool to /// prevent device-bound fsync from starving read operations (pread/stat/open). -/// Default 0 means auto (no isolation, use main runtime). +/// Default 64 isolates fsync from the main blocking pool to prevent device-bound fsync from starving read I/O. pub const ENV_FSYNC_BLOCKING_THREADS: &str = "RUSTFS_RUNTIME_FSYNC_BLOCKING_THREADS"; -pub const DEFAULT_FSYNC_BLOCKING_THREADS: usize = 0; +pub const DEFAULT_FSYNC_BLOCKING_THREADS: usize = 64; // Dial9 Tokio Telemetry Default values pub const DEFAULT_RUNTIME_DIAL9_ENABLED: bool = false; // Disabled by default