Toward Coordination-Free and Reconfigurable Mixed Concurrency Control Dixin Tang and Aaron J

Toward Coordination-Free and Reconfigurable Mixed Concurrency Control Dixin Tang and Aaron J

Toward Coordination-free and Reconfigurable Mixed Concurrency Control Dixin Tang and Aaron J. Elmore, University of Chicago https://www.usenix.org/conference/atc18/presentation/tang This paper is included in the Proceedings of the 2018 USENIX Annual Technical Conference (USENIX ATC ’18). July 11–13, 2018 • Boston, MA, USA ISBN 978-1-939133-02-1 Open access to the Proceedings of the 2018 USENIX Annual Technical Conference is sponsored by USENIX. Toward Coordination-free and Reconfigurable Mixed Concurrency Control Dixin Tang Aaron J. Elmore University of Chicago University of Chicago Abstract specific workloads, may only exhibit high performance under their optimized scenarios, and have poor perfor- Recent studies show that mixing concurrency control mance in others. Consider H-Store’s concurrency con- protocols within a single database can significantly out- trol protocol that uses coarse-grained exclusive partition perform a single protocol. However, prior projects to mix locks and a simple single-threaded executor per parti- concurrency control either are limited to specific pairs tion [10]. This approach is ideal for partitionable work- of protocols (e.g mixing two-phase locking (2PL) and loads that have tuples partitioned such that a transaction optimistic concurrency control (OCC)) or introduce ex- is highly likely to access only one partition. But this tra concurrency control overhead to guarantee their gen- approach suffers decreasing throughput with increasing eral applicability, which can be a performance bottle- cross-partition transactions [34, 27, 20]. Here, an opti- neck. In addition, due to unknown and shifting access mistic protocol may be preferred if the workload mainly patterns within a workload, candidate protocols should consists of read operations or a pessimistic protocol may be chosen dynamically in response to workload changes. be ideal if the workload exhibits high conflicts. An ap- This requires changing candidate protocols online with- pealing solution to this tension is to combine different out having to stop the whole system, which prior work protocols such that each protocol can be used to process does not fully address. To resolve these two issues, we a part of workload that they are optimized for, and avoid present CormCC, a general mixed concurrency control being brittle to scenarios where single protocols suffer. framework with no coordination overhead across candi- Efficiently mixing multiple concurrency control pro- date protocols while supporting the ability to change a tocols is challenging in several ways. First, it should not protocol online with minimal overhead. Based on this be limited to a specific set of protocols (e.g. OCC and framework, we build a prototype main-memory multi- 2PL [22, 28]), but be able to extend to new protocols core database to dynamically mix three popular proto- with reasonable assumptions. Second, the overhead of cols. Our experiments show CormCC has significantly mixing multiple protocols should be minimized such that higher throughput compared with single protocols and the overhead is not a performance bottleneck in any sce- state-of-the-art mixed concurrency control approaches. nario. A robust design should ensure that in any case the mixed execution does not perform worse than any single 1 Introduction candidate protocol involved. Finally, as many transac- tional databases back user-facing applications, dynami- With an increase in CPU core counts and main-memory cally switching protocols online in response to workload capacity, concurrency control has become a new bot- changes is necessary to maintain performance. tleneck in multicore main-memory databases due to the While several recent studies focus on mixed concur- elimination of disk stalls [8, 34]. New concurrency con- rency control, they only address a part of the above chal- trol protocols and architectures focus on enabling high lenges. For example, MOCC [28] and HSync [22] are de- throughput by fully leveraging available computation ca- signed to mix OCC and 2PL with minimal mixing over- pacity, while supporting ACID transactions. Some pro- head but fails to extend to other protocols; Callas [31] tocols try to minimize the overhead of concurrency con- and Tebaldi [23] provide a general framework that can trol [10], while other protocols strive to avoid single cover a large number of protocols, but their overhead of contention points across many cores [27, 35]. How- mixing candidate protocols is non-trivial in some scenar- ever, these single protocols are typically designed for ios and do not support online protocol switch thus failing USENIX Association 2018 USENIX Annual Technical Conference 809 to address the workload changes. Our prior work [25] 2 Related Work envisions an adaptive database that mixes concurrency control, but does not includes a general framework to ad- With the increase of main memory capacity and the num- dress these challenges. ber of cores for a single node, recent research focuses In this paper, we present a general mixed concur- on improving traditional concurrency control protocols rency control scheme CormCC (Coordination-free and on modern hardware. We classify these works into opti- Reconfigurable Mixed Concurrency Control) to sys- mizing single protocols, mixing multiple protocols, and tematically address all the aforementioned challenges. adaptable concurrency control. CormCC decomposes a database into partitions accord- Optimizing Single Protocols Many recent projects ing to workload access patterns and assigns a specific consider optimizing a single protocol, which we believe protocol to each partition, such that a protocol can be are orthogonal to this project. H-Store [8, 10] developed used to process the parts of a workload they are opti- a partitioned based concurrency control (PartCC) to min- mized for. We then develop several criteria to regulate imize concurrency control overhead. The basic idea is the mixed execution of multiple forms of concurrency to divide databases into disjoint partitions, where each control to maintain ACID properties. We show that un- partition is protected by a lock and managed by a sin- der reasonable assumptions, this method allows correct gle thread. A transaction can execute when it has ac- mixed execution without coordination across different quired the locks of all partitions it needs to access. Ex- protocols, which minimizes the mixing overhead. In ad- ploiting data partitioning and the single-threaded model dition, we develop a general protocol switching method is also adopted by several research systems [8, 10, 32, 18, (i.e. reconfiguration) to support changing protocols on- 19, 11]. Other projects propose new concurrency con- line with multiple protocols running together; the key trols optimized for multi-core main-memory databases idea is to compose a mediated protocol compatible with [6, 14, 27, 17, 35, 20, 13, 29, 30, 36, 12, 37, 16] or new both the old and new protocol such that switch process data structures to remove the bottlenecks of traditional does not have to stop all transaction workers while mini- concurrency control [34, 21, 15, 9]. mizing the impact on throughput and latency. To validate Mixing Multiple Protocols Callas [31] and its succes- the efficiency and effectiveness of CormCC, we develop sive work Tebaldi [23] provide a modular concurrency a prototype main-memory database on multi-core sys- control mechanism to group stored procedures and pro- tems that supports mixed execution and dynamic switch- vide an optimized concurrency control protocol for each ing of three widely-used protocols: a single-threaded group based on offline workload analysis; for transac- partition based concurrency control (PartCC) from H- tion conflicts across groups, Callas and Tebaldi intro- Store [10], an optimistic concurrency control (OCC) duce one or multiple protocols in addition to protocols based on Silo [27], and a two-phase locking based on for each group to resolve them. While stored proce- VLL (2PL) [21]. 1 dure oriented protocol assignment can process conflicts within the same group more efficiently, the additional The main contributions of this paper over our vision concurrency control overhead from executing both in- paper [25] are the following: group and cross-group protocols can become the per- • A detailed analysis of mixed concurrency control formance bottleneck for a main-memory database on a design space, a general framework that is not limited multi-core server. Section 3 shows a detailed discussion. to a specific set of protocols to mix multiple forms In addition, the grouping based on offline analysis as- of concurrency control without introducing extra over- sumes workload conflicts are known upfront, which may head of coordinating conflicts across protocols. not be true in real applications. Our work differs from Callas and Tebaldi in that our mixed concurrent control • A general protocol switching method to reconfigure execution does not introduce any extra concurrency con- a protocol for parts of a workload without stopping the trol overhead, which greatly reduces the mixing over- system or introducing significant overhead. head. Additionally, we do not assume a static work- load or require any knowledge about workload conflicts • A thorough evaluation of state-of-the-art mixed in advance, but allow protocols are chosen and reconfig- concurrency control approaches, CormCC’s end-to- ured online in response to dynamic workloads. Some end performance over varied workloads, and the per- other projects exploit the mixed

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    15 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us