Abstract
Transaction priority is a critical feature for real-world database systems. Under high contention, certain classes of transactions should be given a higher chance to commit than others. Such a prioritization mechanism is commonly implemented in locking-based concurrency control protocols as some lock scheduling mechanisms, but it is rarely supported in the world of optimistic concurrency control.
We present Polaris, an optimistic concurrency control protocol that supports multiple priority levels. To enforce priority, Polaris introduces a minimal amount of pessimism through a lightweight reservation mechanism. The protocol is fully optimistic among transactions within the same priority level and preserves the high throughput advantage of optimistic protocols. Our evaluation with YCSB workload shows that Polaris can make the p999 tail latency of high-priority transactions 13x lower than that of low-priority ones. With an abort-aware priority assignment policy, Polaris can deliver 1.9x higher throughput and 17x lower tail latency compared to Silo for high-contention workloads.
Supplemental Material
- Robert K. Abbott and Hector Garcia-Molina. 1992. Scheduling Real-Time Transactions: A Performance Evaluation. ACM Trans. Database Syst., Vol. 17, 3 (sep 1992), 513--560. https://doi.org/10.1145/132271.132276Google ScholarDigital Library
- William Assaf. n.d.. SET DEADLOCK_PRIORITY (Transact-SQL) - SQL Server. https://docs.microsoft.com/en-us/sql/t-sql/statements/set-deadlock-priority-transact-sql?view=sql-server-ver15Google Scholar
- Youmin Chen, Xiangyao Yu, Paraschos Koutris, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau, and Jiwu Shu. 2022. Plor: General Transactions with Predictable, Low Tail Latency. In Proceedings of the 2022 International Conference on Management of Data (Philadelphia, PA, USA) (SIGMOD '22). Association for Computing Machinery, New York, NY, USA, 19--33. https://doi.org/10.1145/3514221.3517879Google ScholarDigital Library
- CockroachDB. n.d.. Transaction | CockroachDB Docs. https://www.cockroachlabs.com/docs/v21.2/transactions#transaction-prioritiesGoogle Scholar
- Brian F. Cooper, Adam Silberstein, Erwin Tam, Raghu Ramakrishnan, and Russell Sears. 2010. Benchmarking Cloud Serving Systems with YCSB. In Proceedings of the 1st ACM Symposium on Cloud Computing (Indianapolis, Indiana, USA) (SoCC '10). Association for Computing Machinery, New York, NY, USA, 143--154. https://doi.org/10.1145/1807128.1807152Google ScholarDigital Library
- Transaction Processing Performance Council. 1992. TPC-C: an On-Line Transaction Processing Benchmark. http://www.tpc.org/tpcc/Google Scholar
- Jeffrey Dean and Luiz André Barroso. 2013. The Tail at Scale. Commun. ACM, Vol. 56 (2013), 74--80. http://cacm.acm.org/magazines/2013/2/160173-the-tail-at-scale/fulltextGoogle ScholarDigital Library
- Bailu Ding, Lucja Kot, and Johannes Gehrke. 2018. Improving Optimistic Concurrency Control through Transaction Batching and Operation Reordering. Proc. VLDB Endow., Vol. 12, 2 (oct 2018), 169--182. https://doi.org/10.14778/3282495.3282502Google ScholarDigital Library
- Dmitry Duplyakin, Robert Ricci, Aleksander Maricq, Gary Wong, Jonathon Duerig, Eric Eide, Leigh Stoller, Mike Hibler, David Johnson, Kirk Webb, Aditya Akella, Kuangching Wang, Glenn Ricart, Larry Landweber, Chip Elliott, Michael Zink, Emmanuel Cecchet, Snigdhaswin Kar, and Prabodh Mishra. 2019. The Design and Operation of CloudLab. In 2019 USENIX Annual Technical Conference (USENIX ATC 19). USENIX Association, Renton, WA, 1--14. https://www.usenix.org/conference/atc19/presentation/duplyakinGoogle Scholar
- Zhihan Guo, Kan Wu, Cong Yan, and Xiangyao Yu. 2021a. Bamboo codebase. https://github.com/ScarletGuo/Bamboo-PublicGoogle Scholar
- Zhihan Guo, Kan Wu, Cong Yan, and Xiangyao Yu. 2021b. Releasing Locks As Early As You Can: Reducing Contention of Hotspots by Violating Two-Phase Locking. Association for Computing Machinery, New York, NY, USA, 658--670. https://doi.org/10.1145/3448016.3457294Google ScholarDigital Library
- J.R. Haritsa, M.J. Carey, and M. Livny. 1990 a. Dynamic real-time optimistic concurrency control. In [1990] Proceedings 11th Real-Time Systems Symposium. 94--103. https://doi.org/10.1109/REAL.1990.128734Google Scholar
- Jayant R. Haritsa, Michael J. Carey, and Miron Livny. 1990 b. On Being Optimistic about Real-Time Constraints. In Proceedings of the Ninth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (Nashville, Tennessee, USA) (PODS '90). Association for Computing Machinery, New York, NY, USA, 331--343. https://doi.org/10.1145/298514.298585Google ScholarDigital Library
- Dongxu Huang, Qi Liu, Qiu Cui, Zhuhe Fang, Xiaoyu Ma, Fei Xu, Li Shen, Liu Tang, Yuxing Zhou, Menglong Huang, Wan Wei, Cong Liu, Jian Zhang, Jianjun Li, Xuelian Wu, Lingyu Song, Ruoxi Sun, Shuaipeng Yu, Lei Zhao, Nicholas Cameron, Liquan Pei, and Xin Tang. 2020. TiDB: A Raft-Based HTAP Database. Proc. VLDB Endow., Vol. 13, 12 (aug 2020), 3072--3084. https://doi.org/10.14778/3415478.3415535Google ScholarDigital Library
- S. L. Hung and K. Y. Lam. 1992. Locking Protocols for Concurrency Control in Real-Time Database Systems. SIGMOD Rec., Vol. 21, 4 (dec 1992), 22--27. https://doi.org/10.1145/141818.141822Google ScholarDigital Library
- Jongbin Kim, Jaeseon Yu, Jaechan Ahn, Sooyong Kang, and Hyungsoo Jung. 2022. Diva: Making MVCC Systems HTAP-Friendly. In Proceedings of the 2022 International Conference on Management of Data (Philadelphia, PA, USA) (SIGMOD '22). Association for Computing Machinery, New York, NY, USA, 49--64. https://doi.org/10.1145/3514221.3526135Google ScholarDigital Library
- Hideaki Kimura. 2015. FOEDUS: OLTP Engine for a Thousand Cores and NVRAM. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data (Melbourne, Victoria, Australia) (SIGMOD '15). Association for Computing Machinery, New York, NY, USA, 691--706. https://doi.org/10.1145/2723372.2746480Google ScholarDigital Library
- H. T. Kung and John T. Robinson. 1981. On Optimistic Methods for Concurrency Control. ACM Trans. Database Syst., Vol. 6, 2 (jun 1981), 213--226. https://doi.org/10.1145/319566.319567Google ScholarDigital Library
- Juchang Lee, Michael Muehle, Norman May, Franz Faerber, Vishal Sikka, Hasso Plattner, Jens Krueger, and Martin Grund. 2013. High-Performance Transaction Processing in SAP HANA. IEEE Data Eng. Bull., Vol. 36, 2 (2013), 28--33.Google Scholar
- Hyeontaek Lim, Michael Kaminsky, and David G. Andersen. 2017. Cicada: Dependably Fast Multi-Core In-Memory Transactions. In Proceedings of the 2017 ACM International Conference on Management of Data (Chicago, Illinois, USA) (SIGMOD '17). Association for Computing Machinery, New York, NY, USA, 21--35. https://doi.org/10.1145/3035918.3064015Google ScholarDigital Library
- Yi Lu, Xiangyao Yu, Lei Cao, and Samuel Madden. 2020. Aria: A Fast and Practical Deterministic OLTP Database. Proc. VLDB Endow., Vol. 13, 12 (jul 2020), 2047--2060. https://doi.org/10.14778/3407790.3407808Google ScholarDigital Library
- Thomas Neumann, Tobias Mühlbauer, and Alfons Kemper. 2015. Fast Serializable Multi-Version Concurrency Control for Main-Memory Database Systems. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data (Melbourne, Victoria, Australia) (SIGMOD '15). Association for Computing Machinery, New York, NY, USA, 677--689. https://doi.org/10.1145/2723372.2749436Google ScholarDigital Library
- Oracle. 2019. Berkeley DB C API Reference. https://docs.oracle.com/database/bdb181/html/api_reference/CXX/txnset_priority.htmlGoogle Scholar
- FoundationDB project authors. 2022. Python API - FoundationDB 7.1. https://apple.github.io/foundationdb/api-python.html#transaction-optionsGoogle Scholar
- Rebecca Taft, Irfan Sharif, Andrei Matei, Nathan VanBenschoten, Jordan Lewis, Tobias Grieger, Kai Niemi, Andy Woods, Anne Birzin, Raphael Poss, Paul Bardea, Amruta Ranade, Ben Darnell, Bram Gruneir, Justin Jaffray, Lucy Zhang, and Peter Mattis. 2020. CockroachDB: The Resilient Geo-Distributed SQL Database. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data (Portland, OR, USA) (SIGMOD '20). Association for Computing Machinery, New York, NY, USA, 1493--1509. https://doi.org/10.1145/3318464.3386134Google ScholarDigital Library
- Dixin Tang and Aaron J. Elmore. 2018. Toward Coordination-free and Reconfigurable Mixed Concurrency Control. In 2018 USENIX Annual Technical Conference (USENIX ATC 18). USENIX Association, Boston, MA, 809--822. https://www.usenix.org/conference/atc18/presentation/tangGoogle Scholar
- Stephen Tu, Wenting Zheng, Eddie Kohler, Barbara Liskov, and Samuel Madden. 2013. Speedy Transactions in Multicore In-Memory Databases. In Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles (Farminton, Pennsylvania) (SOSP '13). Association for Computing Machinery, New York, NY, USA, 18--32. https://doi.org/10.1145/2517349.2522713Google ScholarDigital Library
- Jiachen Wang, Ding Ding, Huan Wang, Conrad Christensen, Zhaoguo Wang, Haibo Chen, and Jinyang Li. 2021. Polyjuice: High-Performance Transactions via Learned Concurrency Control. In 15th USENIX Symposium on Operating Systems Design and Implementation (OSDI 21). USENIX Association, 198--216. https://www.usenix.org/conference/osdi21/presentation/wang-jiachenGoogle Scholar
- Tianzheng Wang and Hideaki Kimura. 2016. Mostly-Optimistic Concurrency Control for Highly Contended Dynamic Workloads on a Thousand Cores. Proc. VLDB Endow., Vol. 10, 2 (oct 2016), 49--60. https://doi.org/10.14778/3015274.3015276Google ScholarDigital Library
- Chao Xie, Chunzhi Su, Cody Littley, Lorenzo Alvisi, Manos Kapritsos, and Yang Wang. 2015. High-Performance ACID via Modular Concurrency Control. In Proceedings of the 25th Symposium on Operating Systems Principles (Monterey, California) (SOSP '15). Association for Computing Machinery, New York, NY, USA, 279--294. https://doi.org/10.1145/2815400.2815430Google ScholarDigital Library
- Chenhao Ye, Wuh-Chwen Hwang, Keren Chen, and Xiangyao Yu. 2022. Polaris codebase. https://github.com/chenhao-ye/polarisGoogle Scholar
- Xiangyao Yu, George Bezerra, Andrew Pavlo, Srinivas Devadas, and Michael Stonebraker. 2014a. DBx1000 codebase. https://github.com/yxymit/DBx1000Google Scholar
- Xiangyao Yu, George Bezerra, Andrew Pavlo, Srinivas Devadas, and Michael Stonebraker. 2014b. Staring into the Abyss: An Evaluation of Concurrency Control with One Thousand Cores. Proc. VLDB Endow., Vol. 8, 3 (nov 2014), 209--220. https://doi.org/10.14778/2735508.2735511Google ScholarDigital Library
- Xiangyao Yu, Andrew Pavlo, Daniel Sanchez, and Srinivas Devadas. 2016. TicToc: Time Traveling Optimistic Concurrency Control. In Proceedings of the 2016 International Conference on Management of Data (San Francisco, California, USA) (SIGMOD '16). Association for Computing Machinery, New York, NY, USA, 1629--1642. https://doi.org/10.1145/2882903.2882935Google ScholarDigital Library
- Xiangyao Yu, Yu Xia, Andrew Pavlo, Daniel Sanchez, Larry Rudolph, and Srinivas Devadas. 2018. Sundial: Harmonizing Concurrency Control and Caching in a Distributed OLTP Database Management System. Proc. VLDB Endow., Vol. 11, 10 (jun 2018), 1289--1302. https://doi.org/10.14778/3231751.3231763Google ScholarDigital Library
- Jingyu Zhou, Meng Xu, Alexander Shraer, Bala Namasivayam, Alex Miller, Evan Tschannen, Steve Atherton, Andrew J. Beamon, Rusty Sears, John Leach, Dave Rosenthal, Xin Dong, Will Wilson, Ben Collins, David Scherer, Alec Grieser, Young Liu, Alvin Moore, Bhaskar Muppana, Xiaoge Su, and Vishesh Yadav. 2021. FoundationDB: A Distributed Unbundled Transactional Key Value Store. Association for Computing Machinery, New York, NY, USA, 2653--2666. https://doi.org/10.1145/3448016.3457559Google ScholarDigital Library
Index Terms
- Polaris: Enabling Transaction Priority in Optimistic Concurrency Control
Recommendations
Infinite Resources for Optimistic Concurrency Control
NetCompute '18: Proceedings of the 2018 Morning Workshop on In-Network ComputingOptimistic concurrency control (OCC) is inefficient for high-contention workloads. When concurrent transactions conflict, an OCC system wastes CPU resources verifying transactions, only to abort them. This paper presents a new system, called Network ...
Distributed Optimistic Concurrency Control Methods for High-Performance Transaction Processing
There is an ever-increasing demand for more complex transactions and higher throughputs in transaction processing systems leading to higher degrees of transaction concurrency and, hence, higher data contention. The conventional two-phase locking (2PL) ...
A hybrid distributed optimistic concurrency control method for high-performance real-time transaction processing
AbstractThe conventional lock scheme tends to suffer from a cascade of blockings, while the optimistic concurrency control (OCC) scheme may suffer from wasting resources. To overcome these problems, some researchers have proposed a combination of OCC and ...
Comments