I am currently running samba and nfsv4 from the same laptop, which is being used as a home server. The server (laptop) is using FreeBSD 13.2-Release. Both services (samba and nfsv4) are sharing the same folders. When accessing the shared folders from the desktop (FreeBSD 13.2 + KDE) I notice that samba is almost twice as fast than nfsv4. According to KDE I get around 90-100MiB/s when copying to and from a samba share and around 40-50MiB/s to and from nfsv4. This took me by surprise as I was expecting the opposite, especially when both the server and client are using FreeBSD. Considering that mount_smbfs(8) doesn't support SMB2 and SMB3, I was keen to use nfsv4, but this would be sacrificing speed. Any suggestions what I could do to improve the speed of nfsv4?
Here are some more information:
On client side
On server side /etc/rc.conf
Perf3 test between the two
Here are some more information:
On client side
Code:
nfsstat -m
192.168.0.92:/Share on /mnt
nfsv4,minorversion=2,tcp,resvport,nconnect=1,hard,cto,sec=sys,acdirmin=3,acdirmax=6
0,acregmin=5,acregmax=60,nametimeo=60,negnametimeo=60,rsize=65536,wsize=65536,readd
irsize=65536,readahead=1,wcommitsize=8388608,timeout=120,retrans=2147483647
On server side /etc/rc.conf
Code:
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"
Perf3 test between the two
Code:
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.10 GBytes 942 Mbits/sec 0 sender
[ 5] 0.00-10.01 sec 1.10 GBytes 940 Mbits/sec receiver