Performance Analysis of Concurrency Control Using Locking with Conditional Blocking

There is growing evidence that for a wide variety of database workloads and system configurations the two-phase locking (2PL) outperforms other types of concurrency control schemes. However, in the presence of long-lived transactions (LLTs), 2PL surrenders to a problem of long delay suspension because LLTs are qualified to lock data until they commit. To alleviate this problem we propose an extension to 2PL, named conditional blocking (CBL), that reduces the waiting probability on the basis of cycle detection to determine if conflicting lock modes could be held on the same data. Unlike the traditional serialization graph testing (SGT) that is also on the basis of cycle detection, CBL could delay a conflicting lock request even though the resulting graph does not contain cycles and thus it can reduce the number of transaction aborts. By properly balancing the waiting effect and the abort effect, CBL can lead to better performance than 2PL and SGT. Using a centralized database simulation model, we demonstrate that CBL exhibits substantial performance improvement over 2PL and SGT when LLTs are present.