Browse Prior Art Database

Method for Dynamic Variation of Concurrency Control

IP.com Disclosure Number: IPCOM000120217D
Original Publication Date: 1991-Apr-01
Included in the Prior Art Database: 2005-Apr-02
Document File: 3 page(s) / 121K

Publishing Venue

IBM

Related People

Dias, DM: AUTHOR [+2]

Abstract

A Concurrency Control (CC) method is proposed in (1) that is a combination of Optimistic CC (OCC) and Pessimistic CC (locking) that, in general, results in better performance than either locking or OCC. Essentially, this scheme uses OCC if the number of granules accessed by a transaction is less than a control variable K, and uses locking subsequently. A value of K = 0 results in pure locking and K / N, where N is the maximum number of granules accessed by a transaction, results in OCC. An intermediate value of K resulting in significantly better performance either for high contention levels or at high utilization levels was shown in [1]. Performance can be further improved by combining the method of (1) with that of (2) (optimistic concurrency control with waiting).

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Method for Dynamic Variation of Concurrency Control

      A Concurrency Control (CC) method is proposed in (1) that
is a combination of Optimistic CC (OCC) and Pessimistic CC (locking)
that, in general, results in better performance than either locking
or OCC.  Essentially, this scheme uses OCC if the number of granules
accessed by a transaction is less than a control variable K, and uses
locking subsequently.  A value of K = 0 results in pure locking and K
/ N, where N is the maximum number of granules accessed by a
transaction, results in OCC.  An intermediate value of K resulting in
significantly better performance either for high contention levels or
at high utilization levels was shown in [1].  Performance can be
further improved by combining the method of (1) with that of (2)
(optimistic concurrency control with waiting).  This article
describes a method for controlling K dynamically without any a-priori
knowledge of N, the database size, transaction rates or service
demand of a transaction.

      The control method is based on the following two observations.
First, the waiting time for locks grows without bound when the
average number of lock waits per transaction reaches a certain
critical level NCRITCONT .  This level depends on the manner in which
locks are acquired, but is independent of the resource utilization
level, the service demand and the number of locks per transaction as
discussed in (3,4).  If all locks are acquired at the beginning of
the transaction, then NCRITCONT = 0.5.  If locks are acquired
uniformly over the length of the transaction, then NCRITCONT = 0.75.
For the scheme we consider, NCRITCONT depends on the value of K.  For
K = 0, NCRITCONT = 0.75, assuming that locks are acquired uniformly
over the life of the transaction.  For larger K, NCRITCONT gets
closer to 0.5, because K locks are acquired simultaneously.
The second observation is that the response time grows without bound
for OCC when the resource utilization level gets close to unity.

      Based on these observations, the method disclosed here is based
on measurements of the number of lock waits per transaction NCONT and
on the CPU utilization level p.  First assume that estimates of NCONT
and p are available.  The method is described for two threshold
levels for lock wait NCONT1    < NCONT2   , and two thresholds for
utilization p1 < p2 .
Dynamic adjustment of K is done at intervals of a few seconds.  Note
that decrementing (respectively incrementing) the value of K
increases (respectively decreases) the number of lock waits per
transaction and decreases (respectively increases) the utilization
level.  At each adjustment interval, the following is done.
   .  If NCONT < NCONT1    and p < p1 (low lock wait and
utilization), then the choice of K is not critical and K is left
unchanged.
   .  Else If p / p1 and NCONT < NCONT1    (medium utilization, low
lock wait), then K is decremented by 1, with minimum...