Operational monitoring of system performance
Operational monitoring refers to collecting key system performance metrics at periodic intervals over time. This information gives you critical data to refine that initial configuration to be more tailored to your requirements, and also prepares you to address new problems that might appear on their own or following software upgrades, increases in data or user volumes, or new application deployments.
Operational monitoring considerations
An operational monitoring strategy needs to address several considerations.
monitoring needs to be very light weight (not consuming much of the
system it is measuring) and generic (keeping a broad
for potential problems that could appear anywhere in the system).
Because you plan regular collection of operational metrics throughout the life of the system, it is important to have a way to manage all that data. For many of the possible uses you have for your data, such as long-term trending of performance, you want to be able to do comparisons between arbitrary collections of data that are potentially many months apart. The Db2® product itself facilitates this kind of data management very well. Analysis and comparison of monitoring data becomes very straightforward, and you already have a robust infrastructure in place for long-term data storage and organization.
Db2) system provides some excellent sources of monitoring data. The primary ones are snapshot
monitors and, in Db2 Version 9.5 and
later, workload management (WLM) table functions for data aggregation. Both of these focus on
summary data, where tools like counters, timers, and histograms maintain running totals of activity
in the system. By sampling these monitor elements over time, you can derive the average activity
that has taken place between the start and end times, which can be very informative.
There is no reason to limit yourself to just metrics that the Db2 product provides. In fact, data outside of the Db2 software is more than just a nice-to-have. Contextual information is key for performance problem determination. The users, the application, the operating system, the storage subsystem, and the network - all of these can provide valuable information about system performance. Including metrics from outside of the Db2 database software is an important part of producing a complete overall picture of system performance.
The trend in recent releases of the Db2 database product has been to make more and more monitoring data available through SQL interfaces. This makes management of monitoring data with Db2 very straightforward, because you can easily redirect the data from the administration views, for example, right back into Db2 tables.
For deeper dives, activity event monitor data can also be written to Db2 tables, providing similar benefits. With the vast majority of our monitoring data so easy to store in Db2, a small investment to store system metrics (such as CPU utilization from vmstat) in Db2 is manageable as well.
Types of data to collect for operational monitoring
- A basic set of Db2 system performance monitoring metrics.
Taking regular copies of database and database manager configuration, Db2 registry variables, and the schema definition helps provide a history of any changes that have been made, and can help to explain changes that arise in monitoring data.
- Overall system load
If CPU or I/O utilization is allowed to approach saturation, this can create a system bottleneck that might be difficult to detect using just Db2 snapshots. As a result, the best practice is to regularly monitor system load with vmstat and iostat (and possibly netstat for network issues) on Linux® and UNIX, and perfmon on Windows. You can also use the administrative views, such as ENV_GET_SYSTEM_RESOURCES, to retrieve operating system, CPU, memory, and other information related to the system. Typically you look for changes in what is normal for your system, rather than for specific one-size-fits-all values.
- Throughput and response time measured at the business logic level
An application view of performance, measured over Db2, at the business logic level, has the advantage of being most relevant to the end user, plus it typically includes everything that could create a bottleneck, such as presentation logic, application servers, web servers, multiple network layers, and so on. This data can be vital to the process of setting or verifying a service level agreement (SLA).