Friday, July 29, 2011

Details about NFS timeout on Red Hat Enterprise Linux 5

■ Requirement : Concept on nfs timeout
■ OS Environment : Linux[RHEL, Centos]
■ Application:nfs
■ Resolution  : 

There are two mount options for timeouts of an NFS request.

# timeo: a timeout value. the unit is 1/10 seconds.
# retrans: a retrans count.

               An NFS client waits an RPC response for timeo before issuing an RPC request. If the request is timed out, the NFS client retransmits the request and waits a response again for tomeo*2. The timeout valueis doubled until it reachs a maximum value. The maximum timeout is timeo*(retrans+1) in TCP, is NFS_MAX_UDP_TIMEOUT in UDP. The RPC timeout is called minor timeout. If the timeout reaches maximum timeout, the NFS request is timeout. That timeout is called major timeout. The default value of timeo is 60 seconds in TCP, is 1.1 seconds in UDP, and the default value of retrans is 2 in both of TCP/UDP. The maximum value of timeo is NFS_MAX_TCP_TIMEOUT in TCP, is NFS_MAX_UDP_TIMEOUT in UDP, and NFS_MAX_TCP_TIMEOUT is 600 seconds, and NFS_MAX_UDP_TIMEOUT is 60 seconds.

Additional  Section : Capture packets using tcpdump to troubleshoot NFS issue. Like :

$ tcpdump -vv -s 0 -i ethX -w /tmp/printdump_server.cap host {hostname or IP address of client/server}

Replace ethX, and IP of server/client. Packets must be captured at the same time on client and nfs server. Then analysis it using wireshark or similar tool.

1 comment: