next up previous contents
Next: Rsync Up: NFS Previous: Caching NFS Client   Contents

New Linux NFS Server And Client

The new NFS server and client that is now included in 2.1 kernels has many performance enhancements over the previous implementation [OK98]. The old server and client are still part of the 2.0 kernels and is hence in widespread use in production environments.

The new implementation implements NFSV3 [BC95] that has many improvements over the previous NFS specification [Mic98]. Of particular interest is the provision of more information in the return from RPC calls that allows for more aggressive caching strategies.

The new server has been moved from user space to kernel space. The main advantage of this is that inode information no longer needs to be cached as the server has direct access to kernel data structures. This allows for multiple server threads to operate as cache consistency is no longer an issue. Additionally running in kernel space reduces the number of memory copies and context switches needed to server data.

Empirical evidence suggests that when a block of a file is requested subsequent blocks in the file are very likely to be requested in the near future. Rather than wait for each read request NFS clients typically employ a read-ahead mechanism to read the blocks of the file before they are requested. The NFS client has traditionally spawned copies of a daemon, nfsiod to deal with read-ahead. The new client has a single daemon that can handle multiple read-ahead requests simultaneously. This has the advantage of saving context switches as only a single process is involved in handling a read-ahead for a client. Additionally there has always been a restriction on the number of simultaneous read-ahead requests that can be handled as running a large number of copies of nfsiod is not practical. The new single process approach removes this restriction.

While this NFS implementation is still in development and by no means addresses all of the performance issues it is a significant advancement. NFS is not an ideal file system for redundant applications however it is a very mature technology that is supported across a variety of platforms. It is of particular note that read performance of NFS is quite good compared to the write performance for various reasons. This is to our advantage as the HTTP Server application that I alluded to earlier overwhelmingly involves reads from the server.


next up previous contents
Next: Rsync Up: NFS Previous: Caching NFS Client   Contents
Horms
1999-03-07