Package Locking Activity - Class 10

This topic shows detailed information about "Accounting - Package Locking Activity - Class 10".

This block shows locking information at package level. It is repeated for each package present in the requested report. The block is headed by the package name.

The following example shows both layouts, the report on the left, and the trace layout on the right.

Accounting - Package Locking Activity - Class 10

The field labels shown in the following sample layout of "Accounting - Package Locking Activity - Class 10" are described in the following section.

Report:                                       Trace:

NSQLDLV                 AVERAGE     TOTAL     package                   TOTAL
---------------------  --------  --------     ---------------------  --------
TIMEOUTS                   0.00         0     TIMEOUTS                 330301
DEADLOCKS                  0.00         0     DEADLOCKS                     0
ESCAL.(SHARED)             0.00         0     ESCAL.(SHARED)                0
ESCAL.(EXCLUS)             0.00         0     ESCAL.(EXCLUS)                0
MAX PG/ROW LOCKS HELD      0.00         0     MAX PG/ROW LOCKS HELD         0
LOCK REQUEST               0.00         0     LOCK REQUEST                  0
UNLOCK REQUEST             0.00         0     UNLOCK REQUEST                0
QUERY REQUEST              0.00         0     QUERY REQUEST                 0
CHANGE REQUEST             0.00         0     CHANGE REQUEST                0
OTHER REQUEST              0.00         0     OTHER REQUEST                 0
TOTAL SUSPENSIONS          0.00         0     TOTAL SUSPENSIONS             0
 LOCK SUSPENSIONS          0.00         0      LOCK SUSPENS                 0
 IRLM LATCH SUSPENS.       0.00         0      IRLM LATCH SUSPENS.          0
 OTHER SUSPENS.            0.00         0      OTHER SUSPENS.               0
TIMEOUTS

The number of times a unit of work was suspended for a time exceeding the timeout value. This number should be low, ideally 0.

Field Name: QTXATIM

DEADLOCKS

The number of times deadlocks were detected. This number should be low, ideally 0.

Background and Tuning Information

Deadlocks occur when two or more application processes each hold locks on resources that the others need, without which they cannot proceed. Ensure that all applications accessing the same tables access them in the same order.

Start of changeTo improve concurrency:
  • Use row level locking instead of page level locking to minimize deadlocks.
  • For small tables use page level locking with MAXROWS 1.
To minimize deadlocks:
  • Delay updates to just before commit.
  • Use SELECT with the FOR UPDATE clause to use U lock.
  • Adjust the deadlock detection cycle parameter DEADLOK in the IRLM procedure.
End of change

This field is incremented once for each deadlock encountered. There is no correlation between this field and the deadlock events reported in the Locking report set or the number of IFCID 172 records written. This field reports all deadlocks, regardless of how they were resolved. The locking report and record trace IFCID 172 show only those deadlocks that were resolved by DB2.

Field Name: QTXADEA

This is an exception field.

ESCAL.(SHARED)

The number of times the maximum page locks per table space are exceeded, and the table space lock escalates from a page lock (IS) to a table space lock (S) for this thread. You can specify the number of locks allowed per table space with the LOCKS PER TABLE(SPACE) parameter on the DB2 install panel DSNTIPJ.

Background and Tuning Information

Escalations can cause unpredictable response times. Lock escalations should only happen when an application process updates or references (if repeatable read is used) more pages than normal.

Field Name: QTXALES

This is an exception field.

ESCAL.(EXCLUS)

The number of times the maximum page locks per table space are exceeded and the table space lock escalates from a page lock (IX) to a table space lock (X).

Background and Tuning Information

Escalations can cause unpredictable response times. Lock escalations should only happen when an application process updates or references (if repeatable read is used) more pages than it normally does.

A useful rule of thumb is to compare the number of escalations (shared and exclusive) to the successful escalations (those that did not cause deadlocks and timeouts). If this value, or the number Lock escalations - shared and if the number of timeouts or deadlocks is also not 0, the timeout or deadlock is probably caused by the escalation.

If many escalations cause deadlocks and timeouts, the recommendation is to change the escalation threshold value. Use of ANY is extremely useful to prevent unnecessary and expensive page locks, for example locking all pages in a tablespace.

Lock escalations, shared or exclusive, should not be expected in a transaction environment.

Field Name: QTXALEX

This is an exception field.

MAX PG/ROW LOCKS HELD

The maximum number of page or row locks concurrently held against all table spaces by a single application during its execution. This count is a high-water mark. It cannot exceed the LOCKS PER USER parameter on panel DSNTIPJ.

Field Name: QTXANPL

This is an exception field.

LOCK REQUEST

The number of requests to lock a resource.

Field Name: QTXALOCK

This is an exception field.

UNLOCK REQUEST

The number of requests to unlock a resource.

This value can be less than the number of lock requests because DB2 can release several locks with a single unlock request.

Field Name: QTXAUNLK

QUERY REQUEST

The number of query requests.

Field Name: QTXAQRY

CHANGE REQUEST

The number of change requests.

Field Name: QTXACHG

OTHER REQUEST

The number of requests to IRLM to perform a function other than LOCK, UNLOCK, QUERY, or CHANGE.

Field Name: QTXAIRLM

LOCK SUSPENSIONS

The number of times a lock could not be obtained and the unit of work was suspended.

Background and Tuning Information

This number should be low, ideally 0.

The number of lock suspensions is a function of the lock requests. Lock suspensions (or conflicts) can happen on either LOCK REQUEST or CHANGE REQUEST.

Suspensions are highly dependent on the application and table space locking protocols.

Field Name: QTXASLOC

This is an exception field.

IRLM LOCK SUSPENS.

The number of latch suspensions.

Field Name: QTXASLAT

This is an exception field.

OTHER SUSPENS.

The number of suspensions caused by something other than lock or latch.

Field Name: QTXASOTH

This is an exception field.



Feedback