Cost-Based Adaptive Concurrency Control in the Cloud

Authors
Ilir Fetai and Heiko Schuldt
Type
Technical Report
Date
2012/2
Appears in
Technical Report CS-2012-001, Department of Mathematics and Computer Science, University of Basel
Abstract
The recent advent of Cloud computing has strongly influenced the deployment of large-scale applications. Currently, Cloud environments mainly focus on high scalability and availability of these applications. Consistency, in contrast, is relaxed and weak consistency is commonly considered to be sufficient. However, an increasing number of applications are no longer satisfied with weak consistency. Strong consistency, in turn, decreases availability and is costly to enforce from both a performance and infrastructure point of view. On the other hand, weak consistency may lead to high costs due to the access to inconsistent data. In this technical report, we introduce a novel approach called cost-based concurrency control (C3). Essentially, C3 allows to dynamically and adaptively switch at runtime between different consistency levels of transactions in a Cloud environment based on the costs incurring during execution. These costs are determined by infrastructure costs for running a transaction in a certain consistency level (called consistency costs) and, optionally, by additional application-specific costs for compensating the effects of accessing inconsistent data (called inconsistency costs). C3 jointly supports transactions of different consistency levels and enforces the inherent consistency guarantees of each protocol.  We first analyze the consistency costs of concurrency control protocols; second, we specify a set of rules that allow to dynamically select the best consistency level with the goal of minimizing the overall costs; third, we provide a protocol that enforces the correct execution of all transactions in a transaction mix. We have evaluated C3 on top of amazon’s EC2. The results show that C3 leads to a reduction of the overall transaction costs compared to a fixed consistency level.