DB2 Version 9.7 for Linux, UNIX, and Windows

locks_held_top - Maximum number of locks held monitor element

The maximum number of locks held during this transaction.

Table 1. Event Monitoring Information
Event Type Logical Data Grouping Monitor Switch
Transactions event_xact -

Usage

You can use this element to determine if your application is approaching the maximum number of locks available to it, as defined by the maxlocks configuration parameter. This parameter indicates the percentage of the lock list that each application can use before lock escalations occur. Lock escalations can result in a decrease in concurrency between applications connected to a database.

Since the maxlocks parameter is specified as a percentage and this element is a counter, you can compare the count provided by this element against the total number of locks that can be held by an application, as calculated using one of the following formulae:
  • On 64-bit systems, (locklist * 4096 / 64 ) * (maxlocks / 100)
  • On 32-bit systems, (locklist * 4096 / 48 ) * (maxlocks / 100)

If you have a large number of locks, you may need to perform more commits within your application so that some of the locks can be released.