 |
» |
|
|
 |
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: Diagnose
NFS Performance Problems |  |
Issue the following command on several of your NFS clients: 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”
. See Installing and Administering LAN/9000 Software for information
on troubleshooting LAN problems. 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 “Improve
NFS Server Performance”. Try doubling the value of the timeo mount option on the NFS clients. See “Changing
the Default Mount Options”.
Improve
NFS Server Performance |  |
Issue the following command
to check your server’s memory utilization: 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 “Adjust
the Number of nfsd Processes”. Issue the following command on the NFS server: 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: 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. 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”. 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.
Adjust
the Number of nfsd Processes |  |
Issue the following command on the NFS server: 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 |
To increase the number of nfsd daemons that will start at the next system boot
(or when restarting the NFS services by running the /sbin/init.d/nfs.server start command), change the value of the NUM_NFSD variable in the /etc/rc.config.d/nfsconf file, as in the following example: Issue the following command to directly start more nfsd processes once you ensure there is no nfsd process currently running on the system: The value of the num_nfsd option is the suggested number of nfsd daemons that will start. The actual number of
daemons started is one daemon to support kernel TCP threads, plus
a number of UDP daemons. The number of UDP daemons started is the
value of num_nfsd rounded up to a multiple of the number of active
CPUs in the system. For more information, type man 1M nfsd at the HP-UX prompt. 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.)
For more information on how the number of nfsd processes impacts performance,
refer to the “NFS performance tuning for HP-UX
11.0 and 11.11 systems” white paper available
at http://docs.hp.com/hpux/onlinedocs/1435/NFSPerformanceTuninginHP-UX11.0and11iSystems.pdf. Improve
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. See “Changing
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 “Changing
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 “Changing
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 “Changing
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.
To
Improve NIS+ Performance |  |
Issue the following command
to check the size of your transaction log: /usr/lib/nis/nislog | head -10 |
If your transaction log is fully checkpointed, it will contain
only three entries. If it contains many entries, issue the following
command to checkpoint it: The nisping -C command can cause a long delay if your namespace is
large. Do not reboot the system. Do not reenter the nisping command. This
problem will solve itself. Just wait until the server finishes checkpointing. Make sure your NIS_PATH environment variable is set to something clean
and simple, like org_dir.$:$. A complex NIS_PATH value, particularly one that contains a variable,
will slow your system and may cause some operations to fail. See “Change
the Search Order of Domains”. Concatenation paths in tables slow performance.
If performance is a problem in your NIS+ namespace, do not use concatenation
paths. See “Create
or Remove Paths Among Tables”. Make sure you have 10 or fewer replica servers per
domain. NIS+ groups that contain other groups (recursive
groups) slow NIS+ performance. If performance is a problem in your
NIS+ namespace, do not use recursive NIS+ groups. See “Add
or Remove Members of an NIS+ Group”. Large transaction logs slow NIS+ performance, particularly
at system startup. If your transaction logs are large, or if you
have just run the nispopulate script to populate your domain tables, issue the nisping -Ca command to checkpoint your directories. Make sure your
master server has a cron job scheduled to issue the nisping -Ca command daily. Type man 1 crontab for information. Issue the ps -ef command to make sure nis_cachemgr is running on every NIS+ client host. Start it
if it is not. Type man 1M nis_cachemgr for information. An NIS+ lookup command like niscat returns the error message for one of the following reasons: The server is busy
synchronizing and checkpointing its directories. Just wait until
the server is finished checkpointing and try the command again. The server is out of swap or disk space. Increase
the swap space on the server, and then checkpoint the server’s
directories with nisping -Ca.
|