Performance monitoring can help you understand how the various parts of your overall computer system are working. There are two types:
You need to plan how you will monitor your system and how you will analyze the data that results. When you create your plan, do the following:
An important factor affecting the accuracy of your performance measurements is the monitoring interval. Most useful performance values, whether measured directly or calculated from other measures, are averages over time.
If the interval that you use to calculate this average is too long, you may lose significant values. For example, you would not see a 10-minute peak in DASD paging load or a 10-minute drop in the effective use of the local buffers if you only look at your performance indicators once a day.
If the interval is too short, your results may not be statistically valid. For example, if one checkpoint occurred during one 30-minute interval, you could not confidently say that the database manager was performing two checkpoints per hour.
You need to weigh the benefits of making performance measurements against the additional overhead involved. While recording performance numbers every 10 seconds may give you an excellent picture of how your database manager is working, the additional load on the operating system may reduce your overall performance, or consume large amounts of DASD space.
Performance measurements are relative: they tell how a system behaves for a particular workload. A system is considered to perform well if it can complete a particular workload faster than other systems or with fewer resources.
In a test system, you can control the workload by running the same tasks many times. During each iteration you can measure how fast your system completed the tasks and how much resource it used.
However, in a production system it is difficult to compare measurements taken at different times, because the workload is constantly changing. To obtain a performance measurement, you must compare the average performance of your system measured over a period of time to the workload it processed during that time. To make these comparisons, you need to calculate two types of relative measurements: load and performance.
Load is usually measured as a rate, in tasks per unit of time. These measurements help you determine the amount of work that the database manager or the operating system is performing during a period of time. High load values in some areas and low load in others may suggest a bottleneck in the system. Also, while similar load measurements do not guarantee that two workloads are comparable, different ones show that they are not comparable.
Performance can be measured as a percentage from 0% to 100%, where 100% is optimal. For practical reasons it is often calculated by comparing the number of successes compared to the number of attempts. For example, if the database manager looks in the local buffers for a page 100 times, and finds the page it is looking for 75 times, the local buffers are 75% effective. This measurement helps you estimate how effectively various components of the entire system are performing.
The percentage can be calculated in several ways:
You can also express a performance measurement as a hit ratio, with the following calculation:
In this case, the higher the ratio the better the performance. The lowest value for a hit ratio is 1.
Use the formula that makes the most "sense" to you. Some formulas fit some measurements better or are easier to understand than others. Mathematically, they are all equivalent.
A wide range of tools for monitoring performance is available in both VM and in VSE. Each tool covers a particular area or a different level of the overall system.
The CP Monitor subsystem measures the performance of the VM operating system and its resources and the VM/Performance Reporting Facility (VM/PRF) product creates usage and historical reports from those measurements. You can control the amount and nature of the data collection, based on the analysis you want to do. To create reports from the collected data, you must either do some programming, or you can use VM/PRF to produce standard reports. This facility contains reports helpful in monitoring the overall DASD I/O performance of your database. The CP Monitor subsystem is included with the VM system. VM/PRF is available from IBM.
The CP INDICATE USER and QUERY TIME commands measure the resources consumed by your database virtual machine. Includes measurements of system paging use, database manager DASD I/O, and CPU load. Included with VM as a part of CP. (Refer to page ***.)
The Real Time Monitor VM/ESA (RTM VM/ESA) provides on-line performance monitoring. Data is typically gathered in short intervals, usually one to three minutes.
You can use this tool to capture system level data about your system and the database machine. It is available from IBM.
The VSE Interactive Interface contains information about CPU use, system paging, active users, channel and device activity, storage layout, and system activity. Each is presented in a separate dialog. It is included with VSE. Refer to the DB2 Server for VSE & VM Operation manual.
VSAM LISTCAT provides information on the location of VSAM data sets. It is provided with VSE. (Refer to the DB2 Server for VSE & VM Operation manual.)
The CICS Monitoring Facility measures the performance of CICS under VSE and CICSPARS/VSE creates historical reports. Both are available from IBM. (Refer to page ***.)
The CIRD transaction displays a snapshot of the links between CICS and your application server. It is provided with the DB2 Server for VSE & VM base product. (Refer to page ***.)
The CICS statistics facility gathers statistical data on CICS performance. It is provided with CICS. (Refer to the CICS/VSE Performance Guide manual.)
As well as the tools described below, the DB2 Family Solutions Directory manual contains descriptions and ordering information for a wide variety of performance monitoring and tuning tools. These tools are available from a number of companies including IBM and are included under the section heading "Database Administration Tools".
Whenever the application server starts, it displays how its Initialization Parameters are set. These parameters describe how the server has been configured. It is included with the DB2 Server for VSE & VM base product. (Refer to page ***.)
The DB2 Server for VSE & VM system catalog contains information about the dbspaces, tables, indexes, keys, packages, authorities, and other objects in the database. Much of the information is used by the database manager when it decides how to retrieve data from the database. It is included with the DB2 Server for VSE & VM base product. (Refer to page ***.)
The SHOW operator commands are available which display the status of the application server. For example, user activity, locking, log usage, and storage can all be monitored with these commands. It is included with the DB2 Server for VSE & VM base product. (Refer to page ***.)
The COUNTER operator command measures the performance of your application server by recording how often significant events occur in the database manager. These events relate to workload, locking, and database manager storage (buffer pools). It is included with the DB2 Server for VSE & VM base product. (Refer to page ***.)
IBM DB2 Control Center for VSE & VM automates DBA functions such as archiving, recovery, adding dbextents, deleting dbextents, adding dbspaces, startup, shutdown, startup parameter changing, dbspace reorganizations, catalog index reorganizations, and database monitoring. Any of these functions may be initiated immediately by an automated user (local or remote), or they may be scheduled to execute at any specified date and time, or repetitive execution interval. It is available from IBM.
The DB2 Server for VSE & VM accounting facility records how much CPU time is consumed and how many buffer pool looks were done during the time that a user is signed onto the application server. The DB2 Server for VSE & VM trace facility records the sequence of events that occur in different components of the database manager (for example, you could trace the sequence of locks that lead up to a deadlock). While both these tools can be extremely useful in diagnosing performance problems, use them very sparingly. Both consume a great deal of system resources and can actually severely affect overall performance when they have been turned on. For more information on the accounting facility, refer to the DB2 Server for VSE System Administration or the DB2 Server for VM System Administration manuals. For more information on the trace facility, refer to the DB2 Server for VSE & VM Operation manual.
The DB2 Server DSS SHOW TARGETWS operator command measures the amount of main and expanded storage your database machine is currently using. It is included with the DB2 Server DSS Feature. (Refer to the DB2 Server for VSE & VM Operation manual.)
The DB2 Server DSS COUNTER POOL operator command measures the performance of individual storage pools, internal dbspaces and the directory. It is included with the DB2 Server DSS Feature. (Refer to the DB2 Server for VSE & VM Operation manual.)