< Previous | Next > | |
Product: Volume Manager Guides | |
Manual: Volume Manager 4.1 Administrator's Guide |
Performance MonitoringAs a system administrator, you have two sets of priorities for setting priorities for performance. One set is physical, concerned with hardware such as disks and controllers. The other set is logical, concerned with managing software and its operation. Setting Performance PrioritiesThe important physical performance characteristics of disk hardware are the relative amounts of I/O on each drive, and the concentration of the I/O within a drive to minimize seek time. Based on monitored results, you can then move the location of subdisks to balance I/O activity across the disks. The logical priorities involve software operations and how they are managed. Based on monitoring, you may choose to change the layout of certain volumes to improve their performance. You might even choose to reduce overall throughput to improve the performance of certain critical volumes. Only you can decide what is important on your system and what trade-offs you need to make. Best performance is usually achieved by striping and mirroring all volumes across a reasonable number of disks and mirroring between controllers, when possible. This procedure tends to even out the load between all disks, but it can make VxVM more difficult to administer. For large numbers of disks (hundreds or thousands), set up disk groups containing 10 disks, where each group is used to create a striped-mirror volume. This technique provides good performance while easing the task of administration. Obtaining Performance DataVxVM provides two types of performance information: I/O statistics and I/O traces. Each of these can help in performance monitoring. You can obtain I/O statistics using the vxstat command, and I/O traces using the vxtrace command. A brief discussion of each of these utilities may be found in the following sections. Tracing Volume OperationsUse the vxtrace command to trace operations on specified volumes, kernel I/O object types or devices. The vxtrace command either prints kernel I/O errors or I/O trace records to the standard output or writes the records to a file in binary format. Binary trace records written to a file can also be read back and formatted by vxtrace. If you do not specify any operands, vxtrace reports either all error trace data or all I/O trace data on all virtual disk devices. With error trace data, you can select all accumulated error trace data, wait for new error trace data, or both of these (this is the default action). Selection can be limited to a specific disk group, to specific VxVM kernel I/O object types, or to particular named objects or devices. For detailed information about how to use vxtrace, refer to the vxtrace(1M) manual page. Printing Volume StatisticsUse the vxstat command to access information about activity on volumes, plexes, subdisks, and disks under VxVM control, and to print summary statistics to the standard output. These statistics represent VxVM activity from the time the system initially booted or from the last time the counters were reset to zero. If no VxVM object name is specified, statistics from all volumes in the configuration database are reported. VxVM records the following I/O statistics:
These statistics are recorded for logical I/O including reads, writes, atomic copies, verified reads, verified writes, plex reads, and plex writes for each volume. As a result, one write to a two-plex volume results in at least five operations: one for each plex, one for each subdisk, and one for the volume. Also, one read that spans two subdisks shows at least four reads---one read for each subdisk, one for the plex, and one for the volume. VxVM also maintains other statistical data. For each plex, it records read and write failures. For volumes, it records corrected read and write failures in addition to read and write failures. To reset the statistics information to zero, use the -r option. This can be done for all objects or for only those objects that are specified. Resetting just prior to an operation makes it possible to measure the impact of that particular operation. The following is an example of output produced using the vxstat command: OPERATIONS BLOCKS AVG TIME(ms) TYP NAME READ WRITE READ WRITE READ WRITE vol blop 0 0 0 0 0.0 0.0 vol foobarvol 0 0 0 0 0.0 0.0 vol rootvol 73017 181735 718528 1114227 26.8 27.9 vol swapvol 13197 20252 105569 162009 25.8 397.0 vol testvol 0 0 0 0 0.0 0.0 Additional volume statistics are available for RAID-5 configurations. For detailed information about how to use vxstat, refer to the vxstat(1M) manual page. Using Performance DataWhen you have gathered performance data, you can use it to determine how to configure your system to use resources most effectively. The following sections provide an overview of how you can use this data. Using I/O StatisticsExamination of the I/O statistics can suggest how to reconfigure your system. You should examine two primary statistics: volume I/O activity and disk I/O activity. Before obtaining statistics, reset the counters for all existing statistics using the vxstat -r command. This eliminates any differences between volumes or disks due to volumes being created, and also removes statistics from boot time (which are not usually of interest). After resetting the counters, allow the system to run during typical system activity. Run the application or workload of interest on the system to measure its effect. When monitoring a system that is used for multiple purposes, try not to exercise any one application more than usual. When monitoring a time-sharing system with many users, let statistics accumulate for several hours during the normal working day. To display volume statistics, enter the vxstat command with no arguments. The following is a typical display of volume statistics: OPERATIONS BLOCKS AVG TIME(ms) TYP NAME READ WRITE READ WRITE READ WRITE vol archive 865 807 5722 3809 32.5 24.0 vol home 2980 5287 6504 10550 37.7 221.1 vol local 49477 49230 507892 204975 28.5 33.5 vol rootvol 102906 342664 1085520 1962946 28.1 25.6 vol src 79174 23603 425472 139302 22.4 30.9 vol swapvol 22751 32364 182001 258905 25.3 323.2 Such output helps to identify volumes with an unusually large number of operations or excessive read or write times. To display disk statistics, use the vxstat -d command. The following is a typical display of disk statistics: OPERATIONS BLOCKS AVG TIME(ms) TYP NAME READ WRITE READ WRITE READ WRITE dm mydg01 40473 174045 455898 951379 29.5 35.4 dm mydg02 32668 16873 470337 351351 35.2 102.9 dm mydg03 55249 60043 780779 731979 35.3 61.2 dm mydg04 11909 13745 114508 128605 25.0 30.7 If you need to move the volume named archive onto another disk, use the following command to identify on which disks it lies: # vxprint -g mydg -tvh archive The following is an extract from typical output: V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL REFPLEX UTYPE PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WDTH MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE v archive - ENABLED ACTIVE 20480 SELECT - fsgen pl archive-01 archive ENABLED ACTIVE 20480 CONCAT - RW sd mydg03-03 archive-01 mydg03 0 40960 0 c1t2d0 ENA Note Your system may use device names that differ from these examples. For more information on device names, see Administering Disks. The subdisks line (beginning sd) indicates that the volume archive is on disk mydg03. To move the volume off mydg03, use the following command: # vxassist -g mydg move archive !mydg03 dest_disk Here dest_disk is the destination disk to which you want to move the volume. It is not necessary to specify a destination disk. If you do not specify a destination disk, the volume is moved to an available disk with enough space to contain the volume. For example, to move a volume from disk mydg03 to disk mydg04, in the disk group, mydg, use the following command: # vxassist -g mydg move archive !mydg03 mydg04 This command indicates that the volume is to be reorganized so that no part of it remains on mydg03. Tip The VERITAS Enterprise Administrator (VEA) has a graphical user interface (GUI), which provides an easier way to move pieces of volumes between disks. You may find that approach preferable to using the command line. If two volumes (other than the root volume) on the same disk are busy, move them so that each is on a different disk. If one volume is particularly busy (especially if it has unusually large average read or write times), stripe the volume (or split the volume into multiple pieces, with each piece on a different disk). If done online, converting a volume to use striping requires sufficient free space to store an extra copy of the volume. If sufficient free space is not available, a backup copy can be made instead. To convert a volume, create a striped plex as a mirror of the volume and then remove the old plex. For example, the following commands stripe the volume archive across disks mydg02, mydg03, and mydg04 in the disk group, mydg, and then remove the original plex archive-01: # vxassist -g mydg mirror archive layout=stripe mydg02 mydg03 \ mydg04 # vxplex -g mydg -o rm dis archive-01 After reorganizing any particularly busy volumes, check the disk statistics. If some volumes have been reorganized, clear statistics first and then accumulate statistics for a reasonable period of time. If some disks appear to be excessively busy (or have particularly long read or write times), you may want to reconfigure some volumes. If there are two relatively busy volumes on a disk, move them closer together to reduce seek times on the disk. If there are too many relatively busy volumes on one disk, move them to a disk that is less busy. Use I/O tracing (or subdisk statistics) to determine whether volumes have excessive activity in particular regions of the volume. If the active regions can be identified, split the subdisks in the volume and move those regions to a less busy disk. Caution Striping a volume, or splitting a volume across multiple disks, increases the chance that a disk failure results in failure of that volume. For example, if five volumes are striped across the same five disks, then failure of any one of the five disks requires that all five volumes be restored from a backup. If each volume were on a separate disk, only one volume would need to be restored. Use mirroring or RAID-5 to reduce the chance that a single disk failure results in failure of a large number of volumes. Note that file systems and databases typically shift their use of allocated space over time, so this position-specific information on a volume is often not useful. Databases are reasonable candidates for moving to non-busy disks if the space used by a particularly busy index or table can be identified. Examining the ratio of reads to writes helps to identify volumes that can be mirrored to improve their performance. If the read-to-write ratio is high, mirroring can increase performance as well as reliability. The ratio of reads to writes where mirroring can improve performance depends greatly on the disks, the disk controller, whether multiple controllers can be used, and the speed of the system bus. If a particularly busy volume has a high ratio of reads to writes, it is likely that mirroring can significantly improve performance of that volume. Using I/O TracingI/O statistics provide the data for basic performance analysis; I/O traces serve for more detailed analysis. With an I/O trace, focus is narrowed to obtain an event trace for a specific workload. This helps to explicitly identify the location and size of a hot spot, as well as which application is causing it. Using data from I/O traces, real work loads on disks can be simulated and the results traced. By using these statistics, you can anticipate system limitations and plan for additional resources. For information on using the vxdmpadm command to gather I/O statistics for a DMP node, path, or enclosure, see Gathering and Displaying I/O Statistics. You can also use the vxdmpadm command to change the I/O load-balancing policy for an enclosure as described in Specifying the I/O Policy. |
^ Return to Top | < Previous | Next > |
Product: Volume Manager Guides | |
Manual: Volume Manager 4.1 Administrator's Guide | |
VERITAS Software Corporation
www.veritas.com |