DB2 Version 10.1 for Linux, UNIX, and Windows

Statistics collection and monitoring with remapped activities

How you collect statistics and how you monitor are both affected by the dynamic remapping of activities between service subclasses.

Remapping occurs when an activity that is executing in one service class is moved to another service class to continue execution. This remapping can be done using thresholds, such as CPUTIMEINSC, and can be an integral part of your workload management configuration, as is the case with the priority aging approach.

Statistics affected by remapped activities

As one exception to the rule, the activity interarrival time, estimated cost, and queue time are all associated with the subclass in which an activity starts running, rather than with the subclass in which the activity finishes running. Because a remapped activity affects the statistics collection of both subclasses, a different number of activities can be counted in an interarrival time, an estimated cost, or a queue-time histogram than in a lifetime or execution-time histogram.

For example, consider an activity that starts running in service subclass A and later is remapped to service subclass B, in which it finishes running. The estimated cost of this activity is associated with service subclass A, but its lifetime is associated with service subclass B. As a result, for subclass A, the estimated cost histogram has one more element counted in it than the lifetime histogram has counted in it, and for service subclass B, the lifetime histogram has one more element counted in it than the estimated cost histogram has counted in it.

As a second exception to the rule, the monitor element concurrent_act_top can be updated in and attributed to any subclass that an activity passes through. In addition to being incremented when an activity begins and decremented when an activity ends, the monitor element is incremented when an activity is mapped to the subclass and is decremented when an activity is mapped out of the subclass (mapped to a different subclass).

Statistics about activity remapping

You can use two monitor elements to count the number of activities entering or leaving a service subclass because of a remapping action: act_remapped_in and act_remapped_out. The act_remapped_in and act_remapped_out monitor elements count the number of activities for any given subclass at any partition that were mapped into or out of the subclass since the last reset. You can use these monitor elements to validate that the remapping of activities between service subclasses is occurring as expected.

To determine the source and destination service subclasses targeted by a remapping action, you can refer to the threshold violation event monitor record, which includes a destination service class ID (destination_service_class_id). You can also determine the source service class by using the threshold violation record.

Monitoring with activity remapping

Remapping activities to different subclasses affects how you monitor these activities. To ensure that all statistics are collected for an activity that starts in one service class and finishes in another because of remapping, turn on aggregate activity data collection for both the service subclass in which the activity starts running and the service subclass in which the activity finishes running when you create or alter the service classes. If you turn on aggregate activity data collection for only the service subclass in which the activity started, the activity contributes only to queue time statistics and, in the case of extended statistics, to the estimated cost and interarrival time statistics. If you turn on aggregate activity data collection for only the service subclass in which the activity finishes running, the activity contributes only to lifetime and execution time statistics, regardless of whether the option is COLLECT AGGREGATE DATA BASE or COLLECT AGGREGATE DATA EXTENDED when you issue the CREATE SERVICE CLASS or ALTER SERVICE CLASS statement.

The following tables summarize how statistics collection is affected by remapping and collection settings.

Table 1. Effect of the COLLECT AGGREGATE DATA BASE option on aggregate statistics collection for subclasses involved in remapping
Statistics Starting subclass collection setting and ending subclass collection setting
  NONE and NONE BASE and NONE NONE and BASE BASE and BASE
Lifetime Not collected Not collected Collected Collected
Queue time Not collected Collected Not collected Collected
Execution time Not collected Not collected Collected Collected
Table 2. Effect of the COLLECT AGGREGATE DATA EXTENDED option on aggregate statistics collection for subclasses involved in remapping
Statistics Starting subclass collection setting and ending subclass collection setting
  NONE and NONE EXTENDED and NONE NONE and EXTENDED EXTENDED and EXTENDED
Lifetime Not collected Not collected Collected Collected
Queue time Not collected Collected Not collected Collected
Execution time Not collected Not collected Collected Collected
Inter-arrival time Not collected Collected Not collected Collected
Estimated cost Not collected Collected Not collected Collected
Table 3. Effect of mixing the COLLECT AGGREGATE DATA BASE and the COLLECT AGGREGATE DATA EXTENDED options on aggregate statistics collection for subclasses involved in remapping
Statistics Starting subclass collection setting and ending subclass collection setting
  BASE and EXTENDED EXTENDED and BASE
Lifetime Collected Collected
Queue time Collected Collected
Execution time Collected Collected
Inter-arrival time Not collected Collected
Estimated cost Not collected Collected