DB2 Version 9.7 for Linux, UNIX, and Windows

deadlocks - Deadlocks detected monitor element

The total number of deadlocks that have occurred.

Table 2. Snapshot Monitoring Information
Snapshot Level Logical Data Grouping Monitor Switch
Database dbase Basic
Application appl Lock
For snapshot monitoring, this counter can be reset.
Table 3. Event Monitoring Information
Event Type Logical Data Grouping Monitor Switch
Activities event_activity (reported in the details_xml document) ACTIVITY METRICS BASE
Activities event_activitymetrics ACTIVITY METRICS BASE
Statistics event_scstats (reported in the metrics document) REQUEST METRICS BASE
Statistics event_wlstats (reported in the metrics document) REQUEST METRICS BASE
Unit of work Reported in the system_metrics document. REQUEST METRICS BASE
Database event_db -
Connection event_conn -
Package cache Reported in the activity_metrics document. ACTIVITY METRICS BASE
Statistics event_scmetrics* REQUEST METRICS BASE
Statistics event_wlmetrics* REQUEST METRICS BASE
* When returned as part of this logical data group, this element reflects the change in value of this metric since the last statistics collection or database activation, whichever was more recent.

Usage

This element can indicate that applications are experiencing contention problems. These problems could be caused by the following situations:
  • Lock escalations are occurring for the database
  • An application may be locking tables explicitly when system-generated row locks may be sufficient
  • An application may be using an inappropriate isolation level when binding
  • Catalog tables are locked for repeatable read
  • Applications are getting the same locks in different orders, resulting in deadlock.

You may be able to resolve the problem by determining in which applications (or application processes) the deadlocks are occurring. You may then be able to modify the application to better enable it to run concurrently. Some applications, however, may not be capable of running concurrently.

You can use the connection timestamp monitor elements (last_reset, db_conn_time, and appl_con_time) to determine the severity of the deadlocks. For example, 10 deadlocks in 5 minutes is much more severe than 10 deadlocks in 5 hours.

The descriptions for the related elements listed above may also provide additional tuning suggestions.