[Tfug] Poor NFS write performance with Linux

John Gruenenfelder jetpackjohn at gmail.com
Sun Jan 8 19:45:40 MST 2012

On Fri, Jan 6, 2012 at 16:53, Tom Rini <trini at kernel.crashing.org> wrote:
> On Fri, Jan 6, 2012 at 2:40 AM, John Gruenenfelder
> <jetpackjohn at gmail.com> wrote:
>> I'm looking for some tips and suggestions to improve the dismal
>> performance I am currently seeing with NFSv4 writes.
> Have you pulled up tcpdump/etc and seen if something is going on?
> None of your speeds are screaming "I'm near wire/disk speed".
> But part of the answer is just going to be "yes, NFS sucks", and
> figure out where in your workflows you really need NFS writing all of
> the time.

Thanks Tom.  I have looked at various values in /proc for things like
errors, retransmissions, fragmentation, etc.  Everything looked okay.
Next chance I get, I will inspect some of the packets with tcpdump or

I realize that NFS isn't going to be the fastest option available, but
for my purposes that's perfectly acceptable.  I think the throughput
values show that raw I/O speed on my LAN, even with NFS, is not
horrible.  When I was still using 100 MBit Ethernet, speeds were
always stuck at 10 MB/s which is as fast as it will go, so anything
faster than that is fine with me.  And the throughput test shows that
an FTP transfer of a large file is approximately 10x faster that it
was with the 100 MBit network.

The problem seems to be related to NFS interaction with file system
metadata, such as creating or deleting a file.  When it performs one
of these actions, it slows down by at least an order of magnitude.
So, it seems clear that there is something not configured correctly

As for why I'm using NFS, the answer is because it is very easy to set
up and its performance is adequate.  If I need to transfer a large
amount of data, I will usually use FTP as it is the fastest option,
but for simple things, among UNIX hosts, NFS is nice and transparent.

Since my server has its data stored on a RAID-5 array and, until
recently, was also on a UPS, I typically store more important data on
that machine rather than locally on my desktop.  Since I have NFS
working and symlinks here and there, I don't have to change much to
have programs access data remotely.

To sum up, NFS = adequate.  If I can solve this multi-file write
slowdown, I'll be all set.

--John Gruenenfelder    Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for Palm OS  --  http://weaselreader.org
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max

More information about the tfug mailing list