Re: Suggestions to reduce FreeBSD nfsd I/O latency on ZFS?

vermaden <[email protected]> Wed, 13 May 2026 00:09:35 +0200
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <wmynxeukpnqrewmcteqq@oemg>
> Are there suggestions on how to reduce
> FreeBSD nfsd I/O latency on ZFS?
> Can putting nfsd into a realtime process class help?
> 
> Lionel

Putting nfsd(8) in 'realtime' class with rtprio(8) command
will surely guarantee You the CPU time ... but on I/O part:

These ZFS settings should help:
- atime -> off
- primarycache -> all
- redundant_metadata -> none
- sync -> standard
- logbias -> latency
- prefetch -> none
- xattr -> sa

On nfsd(8) part ... you may want to enable more threads with '-n' option in 'nfs_server_flags'.
# grep nfs_server /etc/rc.conf
nfs_server_enable="YES"
nfs_server_flags="-n 32"

You may also want to increase Max I/O to 1MB.
# sysctl vfs.nfsd.srvmaxio
vfs.nfsd.srvmaxio: 1048576

Hope that helps.

Regards,
vermaden