Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
NFS Services Administrator’s Guide: HP-UX 11i version 3 > Chapter 5 Troubleshooting NFS Services

Performance Tuning

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

This section gives suggestions for identifying performance problems in your network and improving NFS performance on your servers and clients. This section addresses the following topics:

Diagnose NFS Performance Problems

  1. Enter the following command on several of your NFS clients:

    nfsstat -rc
  2. If the timeout and retrans values displayed by nfsstat -rc are high, but the badxid value is close to zero, packets are being dropped before they get to the NFS server.

    Try decreasing the values of the wsize and rsize mount options to 4096 or 2048 on the NFS clients. See “Changing the Default Mount Options”“Changing the Default Mount Options” on page 51 .

    See Installing and Administering LAN/9000 Software for information on troubleshooting LAN problems.

  3. If the timeout and badxid values displayed by nfsstat -rc are of the same magnitude, your server is probably slow. Client RPC requests are timing out and being retransmitted before the NFS server has a chance to respond to them.

    Try doubling the value of the timeo mount option on the NFS clients. See “Changing the Default Mount Options”“Changing the Default Mount Options” on page 51.

Improve NFS Server Performance

  • Enter the following command to check your server’s memory utilization:

    netstat -m

    If the number of requests for memory denied is high, your server does not have enough memory, and NFS clients will experience poor performance. Consider adding more memory or using a different host as the NFS server.

  • Put heavily used directories on different disks on your NFS servers so they can be accessed in parallel.

  • Enter the following command on the NFS server:

    vmstat -n

    If the us and sy values under cpu are high, and the id (idle time) value under cpu is close to zero, your server’s CPU is heavily loaded. Try using a faster machine as your NFS server. Do not use a gateway or a terminal server as an NFS or NIS server.

  • Enter the following command to determine which processes are using the most CPU:

    /usr/bin/top

    The top program sorts the processes running on your system, with the most CPU-intensive process at the top of the display. It refreshes the display every five seconds. Try taking some CPU-intensive processes off the server.

    Type q to exit the top program.

  • Log into the NFS server and enter the following command:

    nfsstat -s

    If the number of readlink calls is of the same magnitude as the number of lookup calls, you have a symbolic link in a filesystem that is frequently traversed by NFS clients.

    On the NFS clients that require access to the linked directory, mount the target of the link. Then, remove the link from the exported directory on the server.

    When a client requests access to a linked file or directory, two requests are sent to the server: one to look up the path to the link, and another to look up the target of the link. You can improve NFS performance by removing symbolic links from exported directories.

  • If the value of getattr displayed by nfsstat -s is greater than 60%, one or more clients have either turned off attribute caching (with the noac mount option) or set the caching timeout values too low.

    Increase the attribute caching timeouts on the clients that have them set below the default values. See “Changing the Default Mount Options”“Changing the Default Mount Options” on page 51.

  • Share directories with the async option. When async is specified, the server acknowledges write requests from clients before writing data to a disk. Clients do not have to wait for a write request to complete before issuing another request. This can be performed only for NFSv2. The default option for NFSv3 is async.

Improving NFS Client Performance

  • For files and directories that are mounted read-only and never change, set the actimeo mount option to 120 or greater in the /etc/fstab file on your NFS clients.

  • If you see several “server not responding” messages within a few minutes, try doubling the value of the timeo mount option in the /etc/fstab file on your NFS clients.

  • If you frequently see the following message when attempting access to a soft-mounted directory,

    NFS operation failed for server servername: Timed out

    try increasing the value of the retrans mount option in the /etc/fstab file on the NFS clients. Or, change the soft mount to an interruptible hard mount, by specifying the hard and intr options (the defaults).

  • Enter the following command on the NFS server, to find out the block size of the server’s filesystem:

    /usr/sbin/tunefs -v devicefilename

    On the NFS clients, set the wsize and rsize mount options to the bsize value displayed by tunefs.

  • On the NFS clients, look in the /etc/fstab file for “stepping-stone” mounts (hierarchical mounts), as in the following example:

    thyme:/usr /usr nfs defaults 0 0
    basil:/usr/share /usr/share nfs defaults 0 0
    sage:/usr/share/lib /usr/share/lib nfs defaults 0 0

    Wherever possible, change these “stepping-stone” mounts so that whole directories are mounted from a single NFS server.

    Stepping-stone (hierarchical) mounts, like the one in the example above, cause more NFS requests than mounts from a single server. In the example, if a client wants access to something in /usr/share/lib, a request must be sent to server thyme, then to server basil, and finally to server sage.

    For more information on the stepping-stone mounts, see “Changing the Default Mount Options”.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.