Skip to main contentIBM Db2 dsmtop Wiki

Top Consumers - Units of Work

Purpose

This view shows the user which units of work are consuming the most resources.  There are some important scenarios that can be difficult to detect unless you look at metrics on transactions.

Transaction left open

If an application starts a transaction, does some work, and then never commits or rolls back, it will pin the log file where it started.  Backup will be unable to free the log file, and depending on how the database is configured a number of bad things can happen, such as filling all available disk space with new log files.

Transaction holding excessive locks

Applications that acquire many locks in a single transaction and are slow to release them impact other work in the database.

TopConsumers-UOW.png

Histograms and Summaries

<link TBD>

Metrics Shown

Normally, every connection (application handle) has one unit of work associated with it.  So we show the associated application handle, rather than the actual identifier for the unit of work.

There is a grid with a row for each resource that is tracked.  Each row names the resource and shows

  • The application handle for the unit of work that has consumed the most of that resource
  • What percentage of that resource this particular unit of work has consumed, relative to consumption by other current units of work
  • How many locks held, how much log space consumed, etc.
  • Transaction start time (uow_start_time from mon_get_unit_of_work())
  • The name of the application that started this unit of work

The percentage shown in “Resource Usage” is found by adding up that resource across all current units of work and dividing the value for the top consuming unit of work into it.

If a resource is 0 for all units of work, then there is no top consumer and we show null (dash in the grid) for all the columns except Item No and Server Resource.

0  Log space used


1  CPU Time


2  Elapsed time

Subtract uow_start_time from current timestamp


3  Rows Read


4  Rows Returned


5  Rows Written


6  Logical Reads


7  IO r/w


8  Memory


9  FCM Traffic


10 Num locks held


11 Lock Escalations


12 Lock timeouts


13 Lock Waits


14 Lock Wait Time


15 Lock Wait Time (Global)


16 Lock waits (global)

17 CF Wait Time


18 CF Waits

Default Sort Column

Item No, ascending

Keyboard navigation: VBB

Dedicated shortcut key: alt-B

Author: KevinLBeck