skip to main content
research-article

Polaris: Enabling Transaction Priority in Optimistic Concurrency Control

Published:30 May 2023Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

PACMMOD-V1mod044.mp4

mp4

111.1 MB

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle Scholar
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. CockroachDB. n.d.. Transaction | CockroachDB Docs. https://www.cockroachlabs.com/docs/v21.2/transactions#transaction-prioritiesGoogle ScholarGoogle Scholar
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. Transaction Processing Performance Council. 1992. TPC-C: an On-Line Transaction Processing Benchmark. http://www.tpc.org/tpcc/Google ScholarGoogle Scholar
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle Scholar
  10. Zhihan Guo, Kan Wu, Cong Yan, and Xiangyao Yu. 2021a. Bamboo codebase. https://github.com/ScarletGuo/Bamboo-PublicGoogle ScholarGoogle Scholar
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle Scholar
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle Scholar
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. Oracle. 2019. Berkeley DB C API Reference. https://docs.oracle.com/database/bdb181/html/api_reference/CXX/txnset_priority.htmlGoogle ScholarGoogle Scholar
  24. FoundationDB project authors. 2022. Python API - FoundationDB 7.1. https://apple.github.io/foundationdb/api-python.html#transaction-optionsGoogle ScholarGoogle Scholar
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle Scholar
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle Scholar
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. Chenhao Ye, Wuh-Chwen Hwang, Keren Chen, and Xiangyao Yu. 2022. Polaris codebase. https://github.com/chenhao-ye/polarisGoogle ScholarGoogle Scholar
  32. Xiangyao Yu, George Bezerra, Andrew Pavlo, Srinivas Devadas, and Michael Stonebraker. 2014a. DBx1000 codebase. https://github.com/yxymit/DBx1000Google ScholarGoogle Scholar
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Polaris: Enabling Transaction Priority in Optimistic Concurrency Control

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image Proceedings of the ACM on Management of Data
      Proceedings of the ACM on Management of Data  Volume 1, Issue 1
      PACMMOD
      May 2023
      2807 pages
      EISSN:2836-6573
      DOI:10.1145/3603164
      Issue’s Table of Contents

      Copyright © 2023 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 30 May 2023
      Published in pacmmod Volume 1, Issue 1

      Permissions

      Request permissions about this article.

      Request Permissions

      Qualifiers

      • research-article
    • Article Metrics

      • Downloads (Last 12 months)378
      • Downloads (Last 6 weeks)34

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader