14.5. Version 2 and Version 3 differences
NFS Version 2 and NFS Version 3 are entirely
separate protocols and should be treated
as such. The two protocols define different over-the-wire operations.
For example, a single over-the-wire NFS Version 3 operation may
correspond to several over-the-wire NFS Version 2 operations.
Consider the case of a long list (
ls -l ) of an
NFS-mounted directory that generates a series of
readdir/
lookup/
getattr
NFS Version 2 calls. The same operation generates one or more
readdir+ NFS Version 3 calls instead.
In general, NFS Version 3 attempts to reduce the number of
over-the-wire requests by placing more information into each RPC.
This makes NFS Version 3 more efficient under certain circumstances
but less under others. The important point here is to understand that
it is not possible to compare many of the NFS operations between the
two protocols.
For example, writing a several megabyte file over NFS Version 3 will
generate far fewer RPC write operations than the same file written
over NFS Version 2. This is because NFS Version 3 writes generated by
current Solaris clients are 32 KB in length.
[35] In contrast, NFS Version 2
writes can only be up to 8 KB. You should be careful not to assume
that NFS Version 2 writes are faster only because
nfsstat
-c reports that the server handles more of them.
You may also notice that NFS Version 3 generates fewer
lookup and
getattr
operations than NFS Version 2. The reduction in lookups in NFS
Version 3 is partly due to the use of
readdir+,
which includes the filehandle of the directory entries along with the
directory names. The reduction of
getattrs is
mostly due to the fact that NFS Version 3 operations include
post-operation attributes in all
replies.
| | |
14.4. Publicly available diagnostics | | 14.6. NFS server logging |