| United States-English |
|
|
|
![]() |
HP Servers and Workstations: Managing Systems and Workgroups > Chapter 7 Administering a System: Managing
Printers, Software, and PerformanceManaging System Performance |
|
This section provides some guidelines and suggestions for improving the performance of a system or workgroup. A system may perform slowly or sluggishly for a variety of reasons, and you may need to do considerable investigation to determine the source of bottlenecks on a given system. You need to consider the interrelationships between the different components of the system, not just its individual components. Start with the tools described under “Measuring Performance”. Once you’ve isolated a performance problem and you decide how to address it, change only one thing at a time. If you change more than one thing, you will not know which change helped performance. It’s also possible that one change will improve performance while another makes it worse, but you won’t know that unless you implement them separately and measure performance in between. The following shows some possible system bottlenecks: CPU Bottlenecks:
Memory Bottlenecks:
Disk Bottlenecks:
Network Bottlenecks:
Performance is a notoriously difficult topic on which to provide definite advice; these guidelines should not be taken as formal recommendations from HP, but merely as the closest the authors could come to distilling a consensus from the observations of the experts they consulted.
To get an idea of your top CPU hogs, run SAM and select Performance Monitors. (On pre-10.20 systems select Process Management, then Performance Monitors.) Then select Processes With Highest CPU Usage. (Or run /usr/bin/top from the command line.) To compare memory use by the processes currently running, run ps -efl. Look under the SZ column of the resulting display. The saying, “you can’t manage what you don’t measure,” is especially true of system and workgroup performance. Here are some ways to gauge your workgroup’s performance against the “Guidelines” earlier in this section. To see how disk activity is distributed across your disks, run sar -d with a time interval and frequency, for example: sar -d 5 10 This runs sar -d ten times with a five-second sampling interval. The %busy column shows the percentage of time the disk (device) was busy during the sampling interval. Compare the numbers for each of the disks the exported file systems occupy (note the Average at the end of the report). Another way to sample disk activity is to run iostat with a time interval, for example: iostat 5 This will report activity every five seconds. Look at the bps and sps columns for the disks (device) that hold exported file systems. bps shows the number of kilobytes transferred per second during the period; sps shows the number of seeks per second (ignore msps). If some disks exporting file systems are consistently much busier than others, you should consider redistributing the load. See “Extending a Logical Volume to a Specific Disk ” and “Moving Data to a Different Physical Volume ”. If you decide to move a directory to a different server, the cookbook for “Moving a Directory to a Logical Volume on Another System” may be helpful.
In the case of an HFS file system, the client’s NFS read/write block size should match the block size for that file system on the server.
Enabling asynchronous writes tells the NFS server to send the client an immediate acknowledgment of a write request, before writing the data to disk. This improves NFS throughput, allowing the client to post a second write request while the server is still writing out the first. This involves some risk to data integrity, but in most cases the performance improvement is worth the risk. You can use SAM to see whether asynchronous writes are enabled on a server’s exported file systems. Run SAM on the NFS server, go to Networking and You can change the setting of the Asynchronous Writes flag in SAM, while the file system is still mounted and exported. Go to Exported Local File Systems, select the exported file system for which you want to allow (or prevent) asynchronous writes, pull down the Actions menu and select Modify. Then select Yes or No under Asynchronous Writes. Run nfsstat -rc on an NFS client to get an idea of how the server is performing. You’ll get a report that looks like this: Client rpc: badxid should be small in relation to timeout. If these numbers are nearly the same, it may mean the server is overloaded and generating duplicate replies to RPC requests that have timed out and been retransmitted. Check the server’s memory, disk and NFS configuration; see the “Guidelines” in the previous section.
vmstat displays a wealth of information; use the -n option to make it more readable on an 80-column display. The column to watch most closely is po. If it is not zero, the system is paging. If the system is paging consistently, you probably need more RAM. Although many different processes use sockets, and can contribute to socket overflows, regular socket overflows on an NFS server may indicate that you need to run more nfsd processes. The command, will show you a cumulative number for socket overflows (since the last boot). If you see this number rising significantly, and NFS clients are seeing poor response from this server, try starting more nfsds; see “Increasing the Number of nfsd Daemons”. If you have followed all the “Guidelines” and are still seeing poor response time, the problem may be with the network itself - either with a particular piece of hardware or with the configuration of the network. To see cumulative statistics on a server, run netstat -i If your system has been running for a long time, the numbers will be large and may not reliably reflect the present state of things. You can run netstat iteratively; for example netstat -I lan0 -i 5 In this case (after the first line), netstat reports activity every five seconds. Input and output errors should be very low in relation to input and output packets - much less than 1%. A higher rate of output errors on only one server may indicate a hardware problem affecting the server’s connection to the network. Collisions (colls) should be less than 5%; a higher rate indicates heavy network use which your users are probably experiencing as poor performance. Network traffic and configuration may be beyond your control, but you can at least raise a flag with your network administrator. To increase the number of nfsds running on a server, do the following steps:
Defragmenting an HFS file system could improve throughput by reducing disk seek time. In practice, though, most experts believe it will usually make little or no difference to performance. You should do it only if you have good reason to believe, or have received expert advice, that your system will really benefit.
You can defragment an HFS file system by backing it up to tape, removing and recreating it, then recovering the data from the tape. The example that follows shows an alternative method, using dcopy, and assumes you have enough disk space to create a new logical volume at least as large as /dev/vg01/lvol8. We’ll operate on the /work file system, which resides on the logical volume /dev/vg01/lvol8.
In some cases, you may be able to get the results you need by resetting kernel parameters. For example, if a user frequently runs out of processes (symptom no more processes), raising the value of maxuprc might be the answer.
SAM allows you to view and change kernel parameter settings. To view or adjust parameters, select Kernel Configuration and then Configurable Parameters. Then select Help/Overview, scroll down to the link for Configurable Kernel Parameters and select it; then scroll down till you find the parameter you are interested in and select it. Another way to get help on a single parameter is to select that parameter on the Configurable Parameters screen, then press the F1 function key. For more information on dynamic tunables, see “Reconfiguring the
Kernel
Some of the tools that HP provides are: HP also provides several sources for tools and support for HP-UX. See http://www.software.hp.com. This web page has links to:
The System Administration Manager (SAM) tool allows you to perform many system administration tasks without having to know all the HP-UX commands involved. In fact, SAM provides a good means of learning the HP-UX commands needed for a given task - it records its actions, including the HP-UX commands it has used, in a log, which you can look at by pulling down the Options menu on any SAM screen. For more information on SAM’s capabilities, use SAM’s online help or see the manpage sam(1M). See also “Using System Administration Manager (SAM) ”. To start SAM, enter: /usr/sbin/sam Use the top command to see processes ranked by CPU usage. See the manpage top(1). To run top, enter: /usr/bin/top A broad portfolio of OpenView based products to help you manage your HP-UX and Windows NT based systems is available from HP and HP OpenView Solutions Partners. HP OpenView products are available to help you:
and a lot more. Some of the products are:
For complete and current information on HP OpenView products, service, and support, go to http://www.openview.hp.com. HP GlancePlus is a diagnostic performance tool which provides detailed immediate performance information about your system. It has built-in bottleneck alarms and zoom-in capabilities to make performance troubleshooting easier. The HP GlancePlus Pak combines the HP GlancePlus and HP MeasureWare products. This provides both detailed immediate diagnostic and long-term analysis for performance data. These software products are available on multivendor platforms as well as for HP-UX. HP MeasureWare Agent is a comprehensive long-term performance tool which collects, alarms on, and manages system performance information as well as metrics from other sources such as database probes. It provides data and alarms for PerfView, HP OpenView NNM or IT/Operations as well as third-party products. The Kernel Resource Monitor is included with Event Monitoring Systems (EMS) Hardware Monitors. The KRM checks HP-UX resources such as nproc (number of processes) which are controlled by the kernel parameters. KRM continually checks the actual usage of these resources. If the amount of the usage meets or exceeds a preset value, you are notified by e-mail, console message, system log, or other means. This can be useful for tuning the kernel parameters for your particular system and avoiding panics and performance problems caused when usage of HP-UX resources approaches too high a level. The EMS Monitors can be integrated with applications responsible for maintaining system availability, such as MC/ServiceGuard. If configured to do so, they can provide event notification to system management applications such as HP OpenView IT/Operations and HP Network Node Manager. The EMS Hardware Monitors use the same EMS framework as the EMS High Availability (HA) monitors. The HA EMS monitors are a separate set of monitors available at additional cost. Some of the hardware monitors for fibre channel products write event information to text logs read by a new Predictive scanner, emsscan, which in turn may send events to the Response Center via On-line Predictive. The EMS Hardware Monitors (including the Kernel Resource Monitor) are distributed on the Support Plus CD media and available to download from http://software.hp.com. Select “Enhancement Releases” and then “Support Tools for the HP 9000.” For more information see Support Plus: Diagnostics User’s Guide, and EMS Hardware Monitors User’s Guide on the Instant Information CD or at http://docs.hp.com/hpux/systems/. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||