[CentOS] Increasing NFS Performance

Mon Jun 21 23:08:05 UTC 2010
Tim Nelson <tnelson at rockbochs.com>

Greetings all-

I have a CentOS 5 (Final) system that is serving up content to several other hosts via NFS. The amount of data transferred is rather small as most of the files are under 100kb and each export has maybe 100 files that are accessed regularly. I'm finding that as I add more hosts accessing the NFS server, the performance seems to be getting poorer. There are obvious delays when doing simple 'ls' on an NFS mounted directory.

The mounts are all done on the local LAN (100mbit FDX), all on the same broadcast domain, no routing. One of the clients is a physical CentOS 5 node, the rest (5-6 total) are OpenVZ containers also running CentOS 5. The NFS server is a Dell PE2950 loaded with 7.2K SATA drives. While the disks aren't exactly performance grade, the bottleneck does not seem to be the disks as access on the NFS server itself is 'normal'.

Here are the items I've found so far that are told to increase performance. Since this is a production system, I have yet to try these:

1. Increase the number of instances of NFS running. (As found in /etc/sysconfig/nfs)
2. Try sync vs async behavior in mount parameters on clients
3. rmem_default and wmem_default parameters 
4. rsize and wsize parameters (Dependent on MTU. Currently, mine is default at 1500)

These are the items I'm planning to try but before I dive in (especially during a late night maintenance period...), I was hoping the list members brighter than me could give some comments on the above items and/or suggest some other things I might try.

Thank you!

--Tim