nfsstat -s
reports server-side statistics. In particular, the
following are important:
- calls: Total RPC calls received.
- badcalls: Total number of calls rejected by the RPC layer.
- nullrecv: Number of times an RPC call was not available even
though it was believed to have been received.
- badlen: Number of RPC calls with a length shorter than that
allowed for RPC calls.
- xdrcall: Number of RPC calls whose header could not be decoded
by XDR (External Data Representation).
- readlink: Number of times a symbolic link was read.
- getattr: Number of attribute requests.
- null: Null calls are made by the automounter when looking
for a server for a filesystem.
- writes: Data written to an exported filesystem.
Sun recommends the following tuning actions for some common conditions:
- writes > 10%: Write caching (either array-based or host-based,
such as a Prestoserv card) would speed up operation.
- badcalls >> 0: The network may be overloaded and should be
checked out. The
rsize
and wsize
mount options
can be set on the client side to reduce the effect of a noisy network, but
this should only be considered a temporary workaround.
- readlink > 10%: Replace symbolic links with directories on
the server.
- getattr > 40%: The client attribute cache can be increased
by setting the
actimeo
mount option. Note that this is
not appropriate where the attributes change frequently, such as on a
mail spool. In these cases, mount the filesystems with the noac
option.
nfsstat -c
reports client-side statistics. The following
statistics are of particular interest:
- calls: Total number of calls made.
- badcalls: Total number of calls rejected by RPC.
- retrans: Total number of retransmissions. If this number
is larger than 5%, the requests are not reaching the server consistently.
This may indicate a network or routing problem.
- badxid: Number of times a duplicate acknowledgement was
received for a single request. If this number is roughly the same as
badcalls
, the network is congested.
The rsize
and wsize
mount options
can be set on the client side to reduce the effect of a noisy network, but
this should only be considered a temporary workaround.
If on the other hand, badxid
=0, this can be an indication
of a slow network connection.
- timeout: Number of calls that timed out. If this is roughly
equal to
badxid
, the requests are reaching the server, but the
server is slow.
- wait: Number of times a call had to wait because a client
handle was not available.
- newcred: Number of times the authentication was refreshed.
- null: A large number of null calls indicates that the
automounter is retrying the mount frequently. The
timeo
parameter should be changed in the automounter configuration.
nfsstat -m
(from the client) provides server-based
performance data.
- srtt: Smoothed round-trip time. If this number is larger
than 50ms, the mount point is slow.
- dev: Estimated deviation.
- cur: Current backed-off timeout value.
- Lookups: If
cur
>80 ms, the requests are taking
too long.
- Reads: If
cur
>150 ms, the requests are taking
too long.
- Writes: If
cur
>250 ms, the requests are taking
too long.