Compact Parallel Hash Tables on the GPU

Steef Hegeman,Daan Wöltgens,Anton Wijs,Alfons Laarman
2024-06-13
Abstract:On the GPU, hash table operation speed is determined in large part by cache line efficiency, and state-of-the-art hashing schemes thus divide tables into cache line-sized buckets. This raises the question whether performance can be further improved by increasing the number of entries that fit in such buckets. Known compact hashing techniques have not yet been adapted to the massively parallel setting, nor have they been evaluated on the GPU. We consider a compact version of bucketed cuckoo hashing, and a version of compact iceberg hashing suitable for the GPU. We discuss the tables from a theoretical perspective, and provide an open source implementation of both schemes in CUDA for comparative benchmarking. In terms of performance, the state-of-the-art cuckoo hashing benefits from compactness on lookups and insertions (most experiments show at least 10-20% increase in throughput), and the iceberg table benefits significantly, to the point of being comparable to compact cuckoo hashing--while supporting performant dynamic operation.
Data Structures and Algorithms
What problem does this paper attempt to address?
This paper attempts to address the problem of optimizing the performance of hash table operations on GPUs, particularly in terms of memory efficiency and parallel processing capabilities. Specifically, the authors explore how to improve the performance of hash tables on GPUs through compact hashing techniques. ### Main Issues 1. **Memory Efficiency**: GPU memory resources are relatively scarce, so it is necessary to design data structures that can efficiently utilize memory. Existing hash table solutions still have room for improvement in terms of memory usage. 2. **Parallel Processing**: GPUs have large-scale parallel processing capabilities, but existing hash table solutions have performance bottlenecks in parallel insertion and lookup operations, especially during concurrent write operations. 3. **Support for Dynamic Operations**: Many application scenarios require support for dynamic operations (such as concurrent lookups and insertions), and some existing hash table solutions perform poorly in this regard. ### Solutions The authors propose two compact hash table schemes: 1. **Compact Bucketed Cuckoo Hashing**: By storing key-value pairs in cache line-sized buckets and using compact techniques to reduce memory usage within each bucket, the performance of lookup and insertion operations is improved. 2. **Compact Iceberg Hashing**: Similarly adopts compact techniques and supports efficient concurrent lookup and insertion operations. ### Experimental Results - **Performance Improvement**: Experimental results show that compact hash tables achieve a 10-20% performance improvement in lookup and insertion operations compared to non-compact versions. - **Memory Savings**: Compact hash tables can reduce memory usage by half or nearly a quarter in many cases. - **Dynamic Operations**: The compact iceberg hash table performs comparably to the compact cuckoo hash table in static scenarios while supporting efficient dynamic operations. ### Conclusion The paper demonstrates that using compact hashing techniques on GPUs can achieve both memory savings and performance improvements, addressing the shortcomings of existing hash table solutions in terms of memory efficiency and parallel processing capabilities.