Tuesday, July 26, 2011

Tuning NFS Performance

Tuning NFS might make you think of 'Need for Speed' - but we all know we are referring to Network File System - one of those love it or hate it network protocols. NFS can be a cheap way to implement shared storage or as the base protocol for a Network Access Storage (NAS) - unfortunately NFS can be slow out of the box, so this article will help you boost a bit of performance from it!

Ok this is not going to be one of those long articles depicting what each mount option of NFS does and what not, without giving an actual solution to tune its performance. In any case, you can use the man page of nfs to check those out! So the most important options which help in speeding up NFS are:

  • udp - contrary to what other people say, we suggest to use udp instead of tcp - this will increase transfer speeds by hundred times without any compromise!
  • wsize/rsize - put these as high as possible, normally values of 32768 or 524288 or 1048576 - just experiment!

Yep it's just as simple as that...no dark secrets. Now you have a fast NFS communication. Thus, in all, the mount options should look something like this:

rw, intr, hard, nolock, wsize=1048576,rsize=1048576, 
udp, nfsvers=3, noauto
Post a Comment