Page 1 of 1

Faster file transfers with NFS

Posted: 18 Aug 2009, 19:12
by jonj1
I don't know if this is written elsewhere in the forums, but I thought I would mention it for those using NFS file sharing with Mac / Linux.

The NFS file transfer speed from my bubba2 has reliably gone up from 6.5MB/s to 11.2MB/s by using the mount option proto=udp. A side benefit is that the cpu idle time is more like 25% during NFS transfer now rather than 0%... That makes for a happy bubba2 :)

Configuration:
Bubba -> 100Mb/s router -> ethernet cable -> Ubuntu 9.04

Entry in /etc/fstab:

Code: Select all

bubba:/home /mnt/bubbahomeNFS	nfs	noatime,proto=udp,intr	0	0
Test on client:
dd if=<large file> of=/dev/null

Edit:
On a Mac client over wireless, the transfer rate drops with UDP so it's not a catch all.

Re: Faster file transfers with NFS

Posted: 19 Aug 2009, 05:31
by dan13l
"On a Mac client over wireless, the transfer rate drops with UDP so it's not a catch all."

I'm not entirely sure what you mean by this? I'm tempted to give your tweak a try, but are you saying it doesn't work very well on Mac OS? (I'm guessing you're saying that using this tweak over wireless on a mac results in WORSE performance?)

Re: Faster file transfers with NFS

Posted: 19 Aug 2009, 11:31
by jonj1
dan13l wrote:I'm not entirely sure what you mean by this? I'm tempted to give your tweak a try, but are you saying it doesn't work very well on Mac OS? (I'm guessing you're saying that using this tweak over wireless on a mac results in WORSE performance?)
Yes, it's just that I've only tried it with two clients on the LAN - a Linux box with a 100Mb/s cable and a Mac using wireless. I suppose I'd guess the performance dropped in the Mac case because of the wireless connection rather than the OS, but can't be sure.

There's some info on this page http://nfs.sourceforge.net/nfs-howto/ar01s05.html under "NFS Over TCP", basically saying that TCP is better on lossy networks, but slower on ideal networks as the overhead is higher. For now I'm sticking with UDP for cable connections and TCP for wireless. Wireless transfers are still slow in comparison though (2MB/s or less), so I'd be interested in tweaks that speed it up..