why nfs is so slow?

Michael Smith mksmith at adhost.com
Tue Dec 11 23:50:31 PST 2007


On Dec 11, 2007, at 6:45 PM, Mike Tancsa wrote:

> On Tue, 11 Dec 2007 12:02:07 +0100 (CET), in
> sentex.lists.freebsd.questions you wrote:
>
>> i'm getting about 6MB/s with NFS (100Mbit cross-connect ethernet),  
>> while
>> over 9.5 by FTP.
>>
>> nfs is set to work over TCP.
>
> What mount options are you using ?
>
> I use something like the following
>
> 172.18.23.34:/backup/backup2 /offsite-backup nfs
> rw,-r=32768,-w=32768,tcp,noauto
>
> in fstab
>
> 	---Mike
>
We've had good luck with the following options:

rw,tcp,intr,noatime,nfsv3,-w=65536,-r=65536

along with the following in /etc/sysctl.conf

net.inet.ip.fastforwarding=1
net.inet.ip.intr_queue_maxlen=5000
kern.ipc.maxsockbuf=8388608
net.inet.tcp.sendspace=3217968
net.inet.tcp.recvspace=3217968

And, finally, turning on polling on the interface on our disk array.

We are getting a solid 300 Mb/sec on a GigE link.

Regards,

Mike


More information about the freebsd-questions mailing list