FULL AI ANALYSIS

NFS clients hang and server iowait spikes during ZFS pool scrub on a production storage host

Generated Oct 17, 2026, 9:26:11 AM

Analysis summary

Scrub processes perform full pool read of all blocks and can saturate disk IO, especially on pools with heavy metadata (many small files) or constrained ARC leading to increased seeks. NFS server threads block on disk IO, causing client RPC stalls. The immediate cause is scrub IO saturating disk queue leading to high await and NFS timeouts. Long-term solutions include throttling scrub IO, increasing cache to reduce random seeks, or moving scrubs to low-load windows. If ZoL version lacks scrub throttling knobs or if scrub implementation mismanages IO priority, community/vendor escalation is warranted.

Possible causes

ZFS scrub saturates disks (sequential and random IO) leading to high disk await and NFSd threads blocked — scrub not IO‑throttled on this ZoL version

80%

ARC set too small so scrub causes large numbers of cache misses and random disk seeks, worsening latency under scrub load

55%

Block layer I/O scheduler or queue depth settings not tuned for heavy background workloads, allowing scrub to monopolise dispatch slots

40%

RAID controller cache/write policies forcing extra syncs during concurrent NFS activity (e.g., write cache disabled)

30%

Suggested fixes

1

Diagnostic step 1

Avoid changing on-disk data during diagnostics. Schedule a maintenance window and snapshot current pool and NFS export config before making tunable changes.

2

Diagnostic step 2

Increase ZFS ARC (zfs_arc_max) temporarily during a scrub to reduce cache misses if memory is available; monitor hit ratio and client latency. This is reversible by restoring the previous ARC setting.

3

Diagnostic step 3

If available in your ZoL/kernel version, enable or tune ZFS scrub throttling parameters (module parameters that control scrubbing I/O priority or inter-scan delays). If parameters are not present, test on staging before rebooting production.

4

Diagnostic step 4

Adjust Linux block layer and elevator parameters (mq-deadline/none) and reduce per-device queue depth to limit concurrent scrub IO; tune nfsd thread count to improve RPC responsiveness. Make one change at a time and monitor iostat and NFS latency.

5

Diagnostic step 5

As a mitigation, split scrub into smaller granular operations (if using multiple pools or datasets) and stagger scrubs across pools/hosts. If none of the above reduce impact, gather iostat, zpool status, ZFS module parameters, and kernel traces and escalate to the ZFS on Linux community or your storage vendor with those logs.