16

How can I achieve low latency for NFS exports in order to e.g. have developers work nicely in Eclipse/Visual Studio with their workspaces mounted over NFS?

Robert Munteanu
  • 1,644
  • 5
  • 23
  • 41

4 Answers4

14

This sounds like you're still in the design stage. If that's true, a few things to look at are:

  • NFSv3/4 over NFSv2, to allow for larger packets, and features like "safe asynchronous write"
  • Check your NFS client for read-ahead and delayed write, both of those features will help
  • Obviously keep network latency low - GBit connections over a fast switch
  • Make sure your NFS server is tuned for speed. That's both the NFS implementation, and how it is configured.

There's a good NFS FAQ, including some tuning tips, over yonder: http://nfs.sourceforge.net/

Thorsten
  • 211
  • 1
  • 3
  • 4
    It's worth pointing out that on modern linux, it's probably better to not specify any options as it'll do a better job at using the best values than you will. – David Pashley Jun 05 '09 at 08:18
7

Don't compile over NFS. NFS performance is usually a factor of the disk I/O performance and compiling is what's going to drive your number of file I/O ops.

If you can't avoid that, caching is what will save the day. Cram that NFS server as full of RAM as you can, use asynchronous writes and enable all caching you can client-side. The fact is that a RAID is no better at handling (non-cached) disk operations then a single hard disk. And with the small file sizes of a compilation workload, combined throughput won't change a thing.

1

Wait for filesystem caching, or don't do compiles over NFS. Hard disks are always going to be quicker than network filesystems.

David Pashley
  • 23,497
  • 2
  • 46
  • 73
-1

Put the files on a very fast disk or a built-for-speed RAID array since disk IO will determine the lower bound on your latency whether the client is local or remote. The other answers are also OK.

A nice solution is to make the file server be a build server also.

Allen
  • 1,315
  • 7
  • 12