Origin of performance problems
After running an application, if you determine that it does not meet your performance objectives, you need to determine the origin of the problem. This information describes how you identify performance problems and what tools can help you.
To identify a performance problem, you begin by looking at the overall system before you decide that you have a problem in Db2. In general, look closely to see why application processes are progressing slowly or why a given resource is being heavily used.
Within Db2, the performance problem is usually either poor response time or an unexpected and unexplained high use of resources. Check factors such as total processor usage, disk activity, and memory usage.
First, get a picture of task activity, from classes 1, 2, and 3 of the accounting trace. Db2 provides a trace facility that lets you monitor and collect detailed information about Db2, including performance and statistical information. Then, focus on specific activities, such as specific application processes or a specific time interval. You might see problems such as these:
- Slow response time. You can collect detailed information about a single slow task, a problem that can occur for several reasons. For example, users might be trying to do too much work with certain applications, and the system simply cannot do all the work that they want done.
- Real storage constraints. Applications progress more slowly than expected because of paging interrupts. The constraints result in delays between successive requests that are recorded in the Db2 trace.
If you identify a performance problem in Db2, you can look at specific reports. Reports give you information about:
- Whether applications are able to read from buffer pools rather than from disk
- Whether and how long applications must wait to write to disk or wait for a lock
- Whether applications are using more than the usual amount of resources
Db2 also provides several tools that help you analyze performance.