NFS performs ways worse than SSHFS, how can I debug

nfsperformance-tuning

Situation: zfs server over 10GbE p2p at 192.168.201.1 running omnios, debian client at 192.168.201.2. The nfs performs fairly well on big files but horribly slow on small ones. For instance, cp -r /etc /mnt/nfs_mountpoint takes 8 minutes while cp -r /etc /mnt/sshfs_mountpoint to the same machine takes 40 seconds.

I have experimented quite a lot with nfs mount parameters. Currently, the mount looks like this:

zfs:/z2pool/fs on /mnt/shared/fs type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.201.1,mountvers=3,mountport=61082,mountproto=udp,local_lock=none,addr=192.168.201.1)

I've been stuck here for weeks now. I won't downvote anything, hence trial n error suggestions are welcome.

Update: I have tried both async and sync with no or little difference.

Best Answer

This page mentions performance optimising, and mentions things like sync versus async options for NFS.

http://nfs.sourceforge.net/nfs-howto/ar01s05.html