Lock-free Contention Adapting Search Trees

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.

[1]  Zhiyu Liu,et al.  Linearizable Iterators for Concurrent Sets , 2017 .

[2]  Nir Shavit,et al.  Leaplist: lessons learned in designing tm-supported range queries , 2013, PODC '13.

[3]  Konstantinos Sagonas,et al.  A contention adapting approach to concurrent ordered sets , 2017, J. Parallel Distributed Comput..

[4]  Ryan Newton,et al.  Adaptive lock-free data structures in Haskell: a general method for concurrent implementation swapping , 2017, Haskell.

[5]  Trevor Brown,et al.  Non-blocking k-ary Search Trees , 2011, OPODIS.

[6]  Erez Petrank,et al.  Lock-Free Data-Structure Iterators , 2013, DISC.

[7]  Chris Okasaki,et al.  Purely functional data structures , 1998 .

[8]  Maurice Herlihy,et al.  A methodology for implementing highly concurrent data structures , 1990, PPOPP '90.

[9]  Konstantinos Sagonas,et al.  Contention Adapting Search Trees , 2015, 2015 14th International Symposium on Parallel and Distributed Computing.

[10]  Trevor Brown,et al.  Harnessing epoch-based reclamation for efficient range queries , 2018, PPOPP.

[11]  Welf Löwe,et al.  Concurrent transformation components using contention context sensors , 2014, ASE.

[12]  Cecilia R. Aragon,et al.  Randomized search trees , 2005, Algorithmica.

[13]  Niloufar Shafiei Non-blocking Patricia Tries with Replace Operations , 2013, 2013 IEEE 33rd International Conference on Distributed Computing Systems.

[14]  Ryan Newton,et al.  Adaptive lock-free maps: purely-functional to scalable , 2015, ICFP.

[15]  Kunle Olukotun,et al.  A practical concurrent binary search tree , 2010, PPoPP '10.

[16]  Marina Papatriantafilou,et al.  Self-tuning reactive diffracting trees , 2007, J. Parallel Distributed Comput..

[17]  Panagiota Fatourou,et al.  Persistent Non-Blocking Binary Search Trees Supporting Wait-Free Range Queries , 2018, SPAA.

[18]  Idit Keidar,et al.  KiWi: A Key-Value Map for Scalable Real-Time Analytics , 2017, PPoPP.

[19]  Ian Rae,et al.  F1: A Distributed SQL Database That Scales , 2013, Proc. VLDB Endow..

[20]  Trevor Brown,et al.  Range Queries in Non-blocking k-ary Search Trees , 2012, OPODIS.

[21]  Faith Ellen,et al.  Non-blocking binary search trees , 2010, PODC.

[22]  Trevor Alexander Brown,et al.  Reclaiming Memory for Lock-Free Data Structures: There has to be a Better Way , 2015, PODC.

[23]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[24]  Bapi Chatterjee Lock-free Linearizable 1-Dimensional Range Queries , 2017, ICDCN.

[25]  Bengt Jonsson,et al.  Lock-free Contention Adapting Search Trees , 2018, SPAA.

[26]  Maurice Herlihy,et al.  Wait-free synchronization , 1991, TOPL.

[27]  Kjell Winblad Faster Concurrent Range Queries with Contention Adapting Search Trees Using Immutable Data , 2017, ICCSW.