NFS clients hang and server iowait spikes during ZFS pool scrub on a production storage host
Environment
Production storage server running ZFS on Linux (ZoL) on kernel 5.15, 24-bay RAID with SAS HDDs in raidz2, exports NFSv4 to multiple application servers, scheduled zpool scrub runs weekly at 02:00. Typical workload: mixed small metadata operations and large sequential reads. ARC size tuned low to reserve RAM for other services.
Symptoms
During scheduled weekly scrub NFS clients experience blocking reads/writes and NFS RPC timeouts; application latency spikes and some app threads hang waiting on file IO. iostat shows disks with %await approaching 100% and long write/seek latencies. The scrub completes but client availability impact is severe for the duration.
Observations
zpool status shows scrub progress and sustained high dsk activity. System shows high iowait and low free memory (ARC small), but no kernel crashes. No disk SMART warnings. Enabling NFS export 'async' temporarily masks some client stalls but application correctness tests fail intermittently. Attempting to throttle scrub via available ZFS module knobs not present or ineffective on current ZoL version.
Already attempted
Rescheduled scrub to low-traffic window (already at 02:00); tried increasing ARC size slightly during scrub (temporary improvement), tested scrub on a staging pool (reproducible effect on heavy metadata pools), tested reducing scrub frequency (not acceptable for data integrity). Upgraded ZFS package to latest stable for distro (no change).
Question
How can I safely reduce the impact of ZFS scrubs on NFS clients without compromising data integrity? Which tunables and reversible mitigations should be applied on ZoL to throttle scrub IO, and when is escalation to storage vendor or kernel/ZFS community appropriate?
Verified community troubleshooting
No answers yet..