The NFS distributed file service uses a remote procedure call (RPC) facility which translates local commands into requests for the remote host. The remote procedure calls are synchronous. That is, the client application is blocked or suspended until the server has completed the call and returned the results. One of the major factors affecting NFS performance is the retransmission rate.
If the file server cannot respond to a client's request, the client retransmits the request a specified number of times before it quits. Each retransmission imposes system overhead, and increases network traffic. Excessive retransmissions can cause network performance problems. If the retransmission rate is high, you could look for:
Overloaded servers that take too long to complete requests
An Ethernet interface dropping packets
Table 65-3 describes the nfsstat options to display client and server statistics.
Table 65-3 Commands for Displaying Client/Server Statistics
Use ... |
To Display ... |
---|---|
nfsstat -c |
Client statistics |
nfsstat -s |
Server statistics |
netstat -m |
Network statistics for each file system |
Use nfsstat -c to show client statistics, and nfsstat -s to show server statistics. Use netstat -m to display network statistics for each file system. For more information, see nfsstat(1M).
The following example displays RPC and NFS data for the client, pluto.
$ nfsstat -c Client rpc: Connection oriented: calls badcalls badxids timeouts newcreds badverfs timers 1595799 1511 59 297 0 0 0 cantconn nomem interrupts 1198 0 7 Connectionless: calls badcalls retrans badxids timeouts newcreds badverfs 80785 3135 25029 193 9543 0 0 timers nomem cantsend 17399 0 0 Client nfs: calls badcalls clgets cltoomany 1640097 3112 1640097 0 Version 2: (46366 calls) null getattr setattr root lookup readlink read 0 0% 6589 14% 2202 4% 0 0% 11506 24% 0 0% 7654 16% wrcache write create remove rename link symlink 0 0% 13297 28% 1081 2% 0 0% 0 0% 0 0% 0 0% mkdir rmdir readdir statfs 24 0% 0 0% 906 1% 3107 6% Version 3: (1585571 calls) null getattr setattr lookup access readlink read 0 0% 508406 32% 10209 0% 263441 16% 400845 25% 3065 0% 117959 7% write create mkdir symlink mknod remove rmdir 69201 4% 7615 0% 42 0% 16 0% 0 0% 7875 0% 51 0% rename link readdir readdir+ fsstat fsinfo pathconf 929 0% 597 0% 3986 0% 185145 11% 942 0% 300 0% 583 0% commit 4364 0% Client nfs_acl: Version 2: (3105 calls) null getacl setacl getattr access 0 0% 0 0% 0 0% 3105 100% 0 0% Version 3: (5055 calls) null getacl setacl 0 0% 5055 100% 0 0% |
The output of the nfsstat -c command is described in Table 65-4.
Table 65-4 Output From the nfsstat -c Command
Field |
Description |
---|---|
calls |
Shows the total number of calls sent. |
badcalls |
The total number of calls rejected by RPC. |
retrans |
The total number of retransmissions. For this client, the number of retransmissions is less than 1 percent (10 time-outs out of 6888 calls). These may be caused by temporary failures. Higher rates may indicate a problem. |
badxid |
The number of times that a duplicate acknowledgment was received for a single NFS request. |
timeout |
The number of calls that timed out. |
wait |
The number of times a call had to wait because no client handle was available. |
newcred |
The number of times the authentication information had to be refreshed. |
timers |
The number of times the time-out value was greater than or equal to the specified time-out value for a call. |
readlink |
The number of times a read was made to a symbolic link. If this number is high (over 10 percent), it could mean that there are too many symbolic links. |
The following example shows output from the nfsstat -m command.
pluto$ nfsstat -m /usr/man from pluto:/export/svr4/man Flags: vers=2,proto=udp,auth=unix,hard,intr,dynamic, rsize=8192, wsize=8192,retrans=5 Lookups: srtt=13 (32ms), dev=10 (50ms), cur=6 (120ms) All: srtt=13 (32ms), dev=10 (50ms), cur=6 (120ms)
This output of the nfsstat -m command, which is displayed in milliseconds, is described in Table 65-5.
Table 65-5 Output From the nfsstat -m Command
Field |
Description |
---|---|
srtt |
The smoothed average of the round-trip times |
dev |
The average deviations |
cur |
The current "expected" response time |
If you suspect that the hardware components of your network are creating problems, you need to look carefully at the cabling and connectors.