OpenBSD NFS server over TCP performance
Hi guys,
I finally nailed this problem which had been bugging me for a few months, so here's my notes in case anyone else gets this.
PROBLEM: OpenBSD NFS server, using TCP, is slow - less than 20% the throughput of SMB or SFTP. Observed on OS X, FreeBSD and Linux clients.
Switching to UDP solves the throughput issue.
What bugged me was one client was connecting over a powerline network link with reliability issues. So UDP was not really an option there
After much trial and error I found this: setting rsize, wsize and dsize to 65536 on the client, TCP throughput matched UDP, give or take 5%.
The defaults in /usr/src/sys/nfs/nfs.h (on 5.3-STABLE) are set at 8192 - for NFSv2 compatibility?
Hope this helps someone.
|