Recalibrating Fine-Grained Locking in Parallel Bucket Hash Tables
Mutual exclusion protects data structures in parallel environments in order to preserve data integrity. A lock being held effectively blocks the execution of all other threads wanting to access the same shared resource until the lock is released. This blocking behavior reduces the level of parallelism causing performance loss. Fine grained locking reduces the contention for the locks resulting in better throughput, however, the granularity, i.e. how many locks to use, is not straightforward. In large bucket hash tables, the best approach is to divide the table into blocks, each containing one or more buckets, and locking these blocks independently. The size of the block, for optimal performance, depends on the time spent within the critical sections, which depends on the table’s internal properties, and the arrival intensity of the queries. A queuing model is presented capturing this behavior, and an adaptive algorithm is presented fine-tuning the granularity of locking (the block size) to adapt to the execution environment.
KeywordsQueue Length Hash Table Critical Section Mutual Exclusion Arrival Intensity
Unable to display preview. Download preview PDF.
- 2.Brandenburg, B., Calandrino, J.M., Block, A., Leontyev, H., Anderson, J.H.: Real-Time Synchronization on Multiprocessors: To Block or Not to Block, to Suspend or Spin? In: 2008 IEEE Real-Time and Embedded Technology and Applications Symposium, pp. 342–353. IEEE Computer Society Press, St. Louis (2008)CrossRefGoogle Scholar
- 5.Harrison, P., Patel, N.M.: Performance Modelling of Communication Networks and Computer Architectures. Addison-Wesley (1992)Google Scholar
- 7.Juhász, S., Dudás, A.: Adapting hash table design to real-life datasets. In: Proc. of the IADIS European Conference on Informatics 2009, Part of the IADIS Multiconference of Computer Science and Information Systems 2009, Algarve, Portugal, pp. 3–10 (June 2009)Google Scholar
- 9.Klots, B., Bamford, R.J.: Method and apparatus for dynamic lock granularity escalation and de-escalation in a computer system (1998)Google Scholar
- 10.Knuth, D.E.: The art of computer programming, vol 3. Addison-Wesley (November 1973)Google Scholar
- 11.Laarman, A., van de Pol, J., Weber, M.: Boosting Multi-Core Reachability Performance with Shared Hash Tables. In: 10th International Conference on Formal Methods in Computer-Aided Design (April 2010)Google Scholar
- 12.Larson, P.A., Krishnan, M.R., Reilly, G.V.: Scaleable hash table for shared-memory multiprocessor system (April 2003)Google Scholar
- 13.Lea, D.: Hash table util.concurrent.ConcurrentHashMap, revision 1.3, in JSR-166, the proposed Java Concurrency Package (2003)Google Scholar
- 16.Michael, M.M.: High performance dynamic lock-free hash tables and list-based sets. In: ACM Symposium on Parallel Algorithms and Architectures, pp. 73–82 (2002)Google Scholar
- 19.Stewart, W.J.: Probability, Markov chains, queues, and simulation: the mathematical basis of performance modeling. Princeton University Press (2009)Google Scholar
- 20.Treiber, R.K.: Systems Programming: Coping with Parallelism (Research Report RJ 5118). Tech. rep., IBM Almaden Research Center (1986)Google Scholar