Skip to main content

Efficient Support for Range Queries and Range Updates Using Contention Adapting Search Trees

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9519))

Abstract

We extend contention adapting trees (CA trees), a family of concurrent data structures for ordered sets, to support linearizable range queries, range updates, and operations that atomically operate on multiple keys such as bulk insertions and deletions. CA trees differ from related concurrent data structures by adapting themselves according to the contention level and the access patterns to scale well in a multitude of scenarios. Variants of CA trees with different performance characteristics can be derived by changing their sequential component. We experimentally compare CA trees to state-of-the-art concurrent data structures and show that CA trees beat the best data structures we compare against with up to 57 % in scenarios that contain basic set operations and range queries, and outperform them by more than 1200 % in scenarios that also contain range updates.

Research supported in part by the European Union grant IST-2011-287510 “RELEASE: A High-Level Paradigm for Reliable Large-scale Server Software” and the Linnaeus centre of excellence UPMARC (Uppsala Programming for Multicore Architectures Research Center).

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    We perform the change to the contention statistics counter non-atomically. Thus, it is possible for a concurrent read operation to overwrite the change. Note that this does not effect the correctness of the data structure as it only affects the frequency of its adaptations.

  2. 2.

    The efficient skip list split operation splits the data structure so that on average half the keys will be in each resulting split.

  3. 3.

    We do not compare experimentally against the Leaplist [1] whose main implementation is in C. Prototype implementations of the Liplist in Java were sent to us by its authors, but they ended up in deadlocks when running our benchmarks which prevented us from obtaining reliable measurements. Instead, we refer to Sect. 2 for an analytic comparison to the Leaplist.

  4. 4.

    We use the write-preference algorithm [5] for coordination between readers and writers and the StampedLock from the Java library for mutual exclusion.

  5. 5.

    We also ran experiments on a machine with four Intel(R) Xeon(R) E5-4650 CPUs (2.70GHz each with eight cores and hyperthreading) both on a NUMA setting and on a single chip, showing similar performance patterns as on the AMD machine. Results are available online [6].

References

  1. Avni, H., Shavit, N., Suissa, A.: Leaplist: Lessons learned in designing TM-supported range queries. In: Proceedings of the ACM Symposium on Principles of Distributed Computing, PODC 2013, pp. 299–308. ACM, New York, NY, USA (2013)

    Google Scholar 

  2. Bronson, N.G., Casper, J., Chafi, H., Olukotun, K.: A practical concurrent binary search tree. In: Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPOPP, pp. 257–268. ACM (2010)

    Google Scholar 

  3. Brown, T., Avni, H.: Range queries in Non-blocking k-ary search trees. In: Flocchini, P., Binoy, R., Baldoni, R. (eds.) OPODIS 2012. LNCS, vol. 7702, pp. 31–45. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  4. Brown, T., Helga, J.: Non-blocking k-ary search trees. In: Fernàndez Anta, A., Lipari, G., Roy, M. (eds.) OPODIS 2011. LNCS, vol. 7109, pp. 207–221. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  5. Calciu, I., Dice, D., Lev, Y., Luchangco, V., Marathe, V.J., Shavit, N.: NUMA-aware reader-writer locks. In: Proceedings of the 18th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPOPP, pp. 157–166. ACM, New York, NY, USA (2013)

    Google Scholar 

  6. CA Trees. http://www.it.uu.se/research/group/languages/software/ca_tree

  7. Crain, T., Gramoli, V., Raynal, M.: A speculation-friendly binary search tree. In: Proceedings of the 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPOPP 2012, pp. 161–170. ACM, New York, NY, USA (2012)

    Google Scholar 

  8. Fraser, K.: Practical lock-freedom. Ph.D. thesis, University of Cambridge Computer Laboratory (2004)

    Google Scholar 

  9. Knuth, D.E.: The Art of Computer Programming: Sorting and Searching, 2nd edn. Addison-Wesley, Reading (1998)

    Google Scholar 

  10. Lameter, C.: Effective synchronization on Linux/NUMA systems. In: Proceedings of the Gelato Federation Meeting (2005)

    Google Scholar 

  11. Natarajan, A., Mittal, N.: Fast concurrent lock-free binary search trees. In: Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPOPP 2014, pp. 317–328. ACM, New York, NY, USA (2014)

    Google Scholar 

  12. Österlund, E., Löwe, W.: Concurrent transformation components using contention context sensors. In: Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering, ASE 2014, pp. 223–234. ACM, New York, NY, USA (2014)

    Google Scholar 

  13. Prokopec, A., Bronson, N.G., Bagwell, P., Odersky, M.: Concurrent tries with efficient non-blocking snapshots. In: Proceedings of the 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPopp 2012, pp. 151–160. ACM, NY, USA (2012)

    Google Scholar 

  14. Pugh, W.: A skip list cookbook. Technical report, College Park, MD, USA (1990)

    Google Scholar 

  15. Robertson, C.: Implementing contention-friendly range queries in non-blocking key-value stores. Bachelor thesis, The University of Sydney, November 2014

    Google Scholar 

  16. Sagonas, K., Winblad, K.: Contention adapting trees. Technical Report, available in[6] (2014)

    Google Scholar 

  17. Sagonas, K., Winblad, K.: More scalable ordered set for ETS using adaptation. In: ACM Erlang Workshop, pp. 3–11. ACM, September 2014

    Google Scholar 

  18. Sagonas, K., Winblad, K.: Contention adapting trees. In: 14th International Symposium on Parallel and Distributed Computing, pp. 215–224. IEEE, June 2015

    Google Scholar 

  19. Tarjan, R.E.: Data Structures and Network Algorithms, vol. 14. SIAM (1983)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kjell Winblad .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Sagonas, K., Winblad, K. (2016). Efficient Support for Range Queries and Range Updates Using Contention Adapting Search Trees. In: Shen, X., Mueller, F., Tuck, J. (eds) Languages and Compilers for Parallel Computing. LCPC 2015. Lecture Notes in Computer Science(), vol 9519. Springer, Cham. https://doi.org/10.1007/978-3-319-29778-1_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-29778-1_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-29777-4

  • Online ISBN: 978-3-319-29778-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics