Skip to content

Optimizations

Speed up NFS shares.

Tip

Double check any guidance that does not explicitly specify NFSv4.2. The massive changes in NFSv4.2 means most guidance no longer applies, or should be applied only after reconsideration.

Server

Use SLOG for exported ZFS datasets

More than a 12x throughput improvement by using synchronous flush based log for ZIL writes. See ZFS increase write throughput.

Set large chunk size

A large chunk size will minimize network traffic.

/etc/nfs.conf.d/local.conf

0644 root:root

# Use 15MB chunks to optimize for streaming large files.
nfs_conf_nfsrahead_nfsv4: 15360 # 15 * 1024KB (minimum chunk size).
nfs_conf_nfsrahead_default: 15360

Allow More Threads

/etc/nfs.conf.d/local.conf

0644 root:root

# number of shares * mounts + 8
nfs_conf_nfsd_threads: 75

Client

Set 1MB read and write sizes

A large chunk size will minimize network traffic.

# NFS mount command
... nfs4 ... rsize=1048576,wsize=1048576 ...

Reference123456