skip to main content
research-article

Lock-free Contention Adapting Search Trees

Published: 22 July 2021 Publication History

Abstract

Concurrent key-value stores with range query support are crucial for the scalability and performance of many applications. Existing lock-free data structures of this kind use a fixed synchronization granularity. Using a fixed synchronization granularity in a concurrent key-value store with range query support is problematic as the best performing synchronization granularity depends on a number of factors that are difficult to predict, such as the level of contention and the number of items that are accessed by range queries. We present the first linearizable lock-free key-value store with range query support that dynamically adapts its synchronization granularity. This data structure is called the lock-free contention adapting search tree (LFCA tree). An LFCA tree automatically performs local adaptations of its synchronization granularity based on heuristics that take contention and the performance of range queries into account. We show that the operations of LFCA trees are linearizable, that the lookup operation is wait-free, and that the remaining operations (insert, remove and range query) are lock-free. Our experimental evaluation shows that LFCA trees achieve more than twice the throughput of related lock-free data structures in many scenarios. Furthermore, LFCA trees are able to perform substantially better than data structures with a fixed synchronization granularity over a wide range of scenarios due to their ability to adapt to the scenario at hand.

References

[1]
Archita Agarwal, Zhiyu Liu, Eli Rosenthal, and Vikram Saraph. 2017. Linearizable Iterators for Concurrent Sets. arXiv:1705.08885. Retrieved from https://arxiv.org/abs/1705.088
[2]
Maya Arbel-Raviv and Trevor Brown. 2018. Harnessing epoch-based reclamation for efficient range queries. In Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’18). ACM, New York, NY, 14–27.
[3]
Hillel Avni, Nir Shavit, and Adi Suissa. 2013. Leaplist: Lessons learned in designing TM-supported range queries. In Proceedings of the 2013 ACM Symposium on Principles of Distributed Computing (PODC’13). ACM, New York, NY, 299–308.
[4]
Dmitry Basin, Edward Bortnikov, Anastasia Braginsky, Guy Golan-Gueta, Eshcar Hillel, Idit Keidar, and Moshe Sulamy. 2017. KiWi: A key-value map for scalable real-time analytics. In Proceedings of the 22nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’17). ACM, New York, NY, 357–369.
[5]
Nathan G. Bronson, Jared Casper, Hassan Chafi, and Kunle Olukotun. 2010. A practical concurrent binary search tree. In Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’10). ACM, New York, NY, 257–268.
[6]
Trevor Brown and Hillel Avni. 2012. Range queries in non-blocking k-ary search trees. In Proceedings of the 16th International Conference on Principles of Distributed Systems (OPODIS’12). Roberto Baldoni, Paola Flocchini, and Ravindran Binoy (Eds.). Springer, Berlin, 31–45.
[7]
Trevor Brown and Joanna Helga. 2011. Non-blocking k-ary search trees. In Proceedings of the 15th International Conference on Principles of Distributed Systems (OPODIS 2011), Antonio Fernàndez Anta, Giuseppe Lipari, and Matthieu Roy (Eds.). Springer, Berlin, 207–221.
[8]
Trevor Alexander Brown. 2015. Reclaiming memory for lock-free data structures: There has to be a better way. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing (PODC’15). ACM, New York, NY, 261–270.
[9]
Bapi Chatterjee. 2017. Lock-free linearizable 1-dimensional range queries. In Proceedings of the 18th International Conference on Distributed Computing and Networking (ICDCN’17). ACM, New York, NY, Article 9, 10 pages.
[10]
Chao-Hong Chen, Vikraman Choudhury, and Ryan R. Newton. 2017. Adaptive lock-free data structures in haskell: A general method for concurrent implementation swapping. In Proceedings of the 10th ACM SIGPLAN International Symposium on Haskell (Haskell’17). ACM, New York, NY, 197–211.
[11]
Faith Ellen, Panagiota Fatourou, Eric Ruppert, and Franck van Breugel. 2010. Non-blocking binary search trees. In Proceedings of the 29th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (PODC’10). ACM, New York, NY, 131–140.
[12]
Panagiota Fatourou, Elias Papavasileiou, and Eric Ruppert. 2019. Persistent non-blocking binary search trees supporting wait-free range queries. In Proceedings of the 31st ACM Symposium on Parallelism in Algorithms and Architectures (SPAA’19). ACM, New York, NY, 275–286.
[13]
Phuong Hoai Ha, Marina Papatriantafilou, and Philippas Tsigas. 2007. Self-tuning reactive diffracting trees. J. Parallel Distrib. Comput. 67, 6 (2007), 674–694.
[14]
Maurice Herlihy. 1990. A methodology for implementing highly concurrent data structures. In Proceedings of the Second ACM SIGPLAN Symposium on Principles & Practice of Parallel Programming (PPoPP’90). ACM, New York, NY, 197–206.
[15]
Maurice Herlihy. 1991. Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13, 1 (Jan. 1991), 124–149.
[16]
Maurice P. Herlihy and Jeannette M. Wing. 1990. Linearizability: A correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12, 3 (Jul. 1990), 463–492.
[17]
Ryan R. Newton, Peter P. Fogg, and Ali Varamesh. 2015. Adaptive lock-free maps: Purely-functional to scalable. In Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming (ICFP’15). ACM, New York, NY, 218–229.
[18]
Chris Okasaki. 1999. Purely Functional Data Structures. Cambridge University Press, Cambridge, UK.
[19]
Erik Österlund and Welf Löwe. 2014. Concurrent transformation components using contention context sensors. In Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering (ASE’14). ACM, New York, NY, 223–234.
[20]
Erez Petrank and Shahar Timnat. 2013. Lock-free data-structure iterators. In Proceedings of the 27th International Symposium on Distributed Computing (DISC’13), Vol. 8205. Springer-Verlag, New York, NY, 224–238.
[21]
Callum Robertson. 2014. Implementing Contention-Friendly Range Queries in Non-Blocking Key-Value Stores. Bachelor Thesis. The University of Sydney.
[22]
Konstantinos Sagonas and Kjell Winblad. 2017. A contention adapting approach to concurrent ordered sets. J. Parallel Distrib. Comput. 115 (May 2017), 1–19.
[23]
Konstantinos Sagonas and Kjell Winblad. 2018. Contention Adapting Search Trees. Retrieved from http://www.it.uu.se/research/group/languages/software/ca_tree.
[24]
Raimund Seidel and Cecilia R. Aragon. 1996. Randomized search trees. Algorithmica 16, 4/5 (01 Oct. 1996), 464–497.
[25]
Nilufar Shafiei. 2013. Non-blocking patricia tries with replace operations. In Proceedings of the IEEE 33rd International Conference on Distributed Computing Systems (ICDCS’13). IEEE Computer Society, Los Alamitos, CA, 216–225.
[26]
Jeff Shute, Radek Vingralek, Bart Samwel, Ben Handy, Chad Whipkey, Eric Rollins, Mircea Oancea, Kyle Littlefield, David Menestrina, Stephan Ellner, John Cieslewicz, Ian Rae, Traian Stancescu, and Himani Apte. 2013. F1: A distributed SQL database that scales. Proc. VLDB Endow. 6, 11 (Aug. 2013), 1068–1079.
[27]
Kjell Winblad. 2018. Faster concurrent range queries with contention adapting search trees using immutable data. In Proceedings of the 2017 Imperial College Computing Student Workshop (ICCSW’17), OpenAccess Series in Informatics (OASIcs). Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 7:1–7:13.
[28]
Kjell Winblad, Konstantinos Sagonas, and Bengt Jonsson. 2018. Lock-free contention adapting search trees. In Proceedings of the 30th on Symposium on Parallelism in Algorithms and Architectures (SPAA’18). ACM, New York, NY, 121–132.
[29]
Yahoo! Developer Network. 2017. Flurry Analytics. Retrieved July 26, 2017 from https://developer.yahoo.com/flurry/docs/analytics/.

Cited By

View all
  • (2024)VERLIB: Concurrent Versioned PointersProceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3627535.3638501(200-214)Online publication date: 2-Mar-2024

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Parallel Computing
ACM Transactions on Parallel Computing  Volume 8, Issue 2
Special Issue on Invited Papers from SPAA 2018: Part 2 and Regular Papers
June 2021
126 pages
ISSN:2329-4949
EISSN:2329-4957
DOI:10.1145/3476110
Issue’s Table of Contents
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 ACM 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: 22 July 2021
Accepted: 01 March 2021
Revised: 01 December 2020
Received: 01 April 2019
Published in TOPC Volume 8, Issue 2

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Concurrent data structure
  2. adaptivity
  3. linearizability
  4. lock-freedom
  5. range query
  6. wait-freedom

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)23
  • Downloads (Last 6 weeks)1
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)VERLIB: Concurrent Versioned PointersProceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3627535.3638501(200-214)Online publication date: 2-Mar-2024

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media