eG Monitoring
 

Measures reported by MsSqlLockTest

This test monitors the locking activity of various transactions supported by a Microsoft SQL server. The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
Avg_wait_time Indicates the average amount of wait time for each lock request that resulted in a wait. Secs A high value may indicate that there is contention for locks in the system. When the average wait time for locks is high, users may have to wait for their transactions to complete. This metrics reports the average wait time for a variety of locks, including database, extent, key, page, RID, and table. When the average wait time is high, use the SQL profiler to identify which lock(s) is causing transaction delays.

The detailed diagnosis capability, if enabled, provides the average wait time for each lock type.

Lock_requests Indicates the total number of new locks and lock conversions requested from the lock manager per second.  Reqs/Sec A high value indicates that there is high locking activity in the system and may need close scrutiny for the type of locks being requested.

The detailed diagnosis capability, if enabled, provides the rate of locks for each lock type.

Lock_waits Indicates the number of lock requests per second that could not be satisfied immediately and required the caller to wait before being granted the lock. Waits/Sec A high value of waits can have an adverse impact on application performance. Possible reasons for this behavior could be:
  1. inadequate number of locks available in the database,
  2. unusually high locking behavior of applications accessing the database,
  3. improper database application design, etc.

The detailed diagnosis capability, if enabled, displays the rate of lock waits for each lock type.

Deadlocks Indicates the number of lock requests/sec that resulted in a deadlock. Deadlocks/Sec A deadlock may arise due to various situations including bad design of queries and deficient coding practices. A deadlock is a situation where both/all the lock requestors are in a mutual or a multi-way tie.
Any deadlocks are detrimental to database application performance.

The detailed diagnosis capability, if enabled, provides the rate of dead locks for each lock type.

Lock_timeouts Indicates the number of lock requests per second that timed out, including requests for NOWAIT locks. Timeouts/Sec The LOCK_TIMEOUT setting allows an application to set a maximum time that a statement waits on a blocked resource. When a statement has waited longer than the LOCK_TIMEOUT setting, the blocked statement is canceled automatically, and error message 1222 (Lock request time-out period exceeded) is returned to the application. Any transaction containing the statement, however, is not rolled back.

A high value for this measure indicates that many statements were cancelled, as they could not acquire a lock on a resource for a long time. This may be due to another extent lock holding the resource (An extent lock is the one which locks multiple resources). In such a situation, use the detailed diagnosis of the SQL Blocker Processes test to know which statements have been blocked for a long time, and which statements are blocking them.