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
Installing and Administering NFS Services with 10.20 ACE and HWE: HP 9000 Networking > Chapter 7 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. It contains the following sections:

To Diagnose NFS Performance Problems

  1. Issue 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 “To Change the Default Mount Options” .

    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.

    See “To Improve NFS Server Performance”.

    Try doubling the value of the timeo mount option on the NFS clients. See “To Change the Default Mount Options”.

  4. Issue the following command on any machine on the network:

    netstat -i

    The number of collisions (Coll) divided by the number of output packets (Opkts) is the collision rate. If your collision rate is greater than 10%, consider dividing your network into smaller segments and putting an NFS server on each segment. See Installing and Administering LAN/9000 Software for information on dividing your network.

To Improve NFS Server Performance

  • Issue 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.

  • Make sure your server is running the correct number of nfsd processes. See “To Adjust the Number of nfsd Processes”.

  • Issue 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.

  • Issue 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 issue 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 file system 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.

    CAUTION: Do not remove symbolic links in an NFS diskless environment. File sharing in NFS diskless is done by means of symbolic links.
  • 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 “To Change the Default Mount Options”.

  • Export directories with the async option. When async is specified, the server acknowledges write requests from clients before writing data to disk. Clients do not have to wait for a write request to complete before issuing another request.

To Adjust the Number of nfsd Processes

  1. Issue the following command on the NFS server:

    netstat -s

    If the UDP statistics displayed by the netstat command indicate a large number of socket overflows, as in the following example, then your server is not running enough nfsd daemons.

    udp:
    0 incomplete headers
    0 bad data length fields
    0 bad checksums
    1375 socket overflows
  2. To increase the number of nfsd daemons running, change the value of the NUM_NFSD variable in the /etc/rc.config.d/nfsconf file, as in the following example:

    NUM_NFSD=8
  3. Issue the following command to start more nfsd processes:

    /usr/sbin/nfsd number
  4. Issue the netstat -s command again to check the number of socket overflows. Continue to adjust the NUM_NFSD value and start nfsd processes until the number of new socket overflows is close to zero. (The output of nfsstat is cumulative, so when there are no new socket overflows, the number will stay the same.)

As a general rule, an NFS server should run approximately two nfsd daemons for each entry in the /etc/exports file.

For more information, type man 1M nfsd at the HP-UX prompt.

To Improve NFS Client Performance

  • Issue the ps -ef command to make sure four biod processes are running on each client. To start four biod processes, set the NUM_NFSIOD variable to 4 in the /etc/rc.config.d/nfsconf file, and issue the following command:

    /usr/sbin/biod 4
    NOTE: If your performance bottleneck is a slow server, increasing the number of biod processes beyond four will not improve NFS performance, and it might make it worse.
  • 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. See “To Change the Default Mount Options” .

  • 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. See “To Change the Default Mount Options” .

  • 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). See “To Change the Default Mount Options” .

  • Type the following command on the NFS server, to find out the block size of the server's file system:

    /usr/sbin/tunefs -v devicefilename

    On the NFS clients, set the wsize and rsize mount options to the bsize value displayed by tunefs. See “To Change the Default Mount Options” .

  • 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.

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