Abstract
GPUs can accelerate hash tables for fast storage and look-ups utilizing their massive parallelism. State-of-the-art GPU hash tables use keys with fixed length like integers for optimal performance. Because strings are often used for structures like dictionaries, it is useful to support keys with variable length as well. Modern GPUs enable the combination of CPU and GPU compute power and we propose a hybrid approach, where keys on the GPU have a maximum length and longer keys are processed on the CPU. Therefore we develop a GPU accelerated approach of robin-map and libcuckoo based on string keys. We use OpenCL for GPU acceleration and threads for the CPU. Furthermore, we integrate the GPU approach into our benchmark framework \(H^2\) and evaluate it against the CPU variants and the GPU approach adapted for the CPU. We evaluated our approach in the hybrid context by using longer keys on CPU and shorter keys on GPU. In comparison to the original libcuckoo algorithm our GPU approach achieves a speed-up of 2.1 and in comparison to the robin-map a speed-up of 1.5. For hybrid workloads our approach is efficient if long keys are processed on the CPU and short keys are processed on the GPU. By processing a mixture of 20% long keys on CPU and 80% short keys on GPU our hybrid approach has a 40% higher throughput than the CPU only approach.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
https://www.khronos.org/opencl/, accessed on 2022-03-08.
- 2.
https://github.com/rapidsai/cudf, accessed on 2022-03-13.
- 3.
https://www.openmp.org/, accessed on 2022-03-08.
- 4.
https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html, accessed on 2022-03-08.
- 5.
https://developer.nvidia.com/cuda-toolkit, accessed on 2022-03-08.
- 6.
https://www.vulkan.org/, accessed on 2022-03-08.
- 7.
https://rocmdocs.amd.com/en/latest/#, accessed on 2022-03-08.
- 8.
https://github.com/Tessil/robin-map, accessed on 2022-03-08.
- 9.
https://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.html, accessed on 2022-03-08.
- 10.
https://nodejs.org/en/, accessed on 2022-03-13.
- 11.
- 12.
https://zenodo.org/record/2634588, accessed on 2022-03-13.
References
Ashkiani, S., Farach-Colton, M., Owens, J.D.: A dynamic hash table for the GPU. In: 2018 IEEE International Parallel and Distributed Processing Symposium (IPDPS), pp. 419–429 (2018). https://doi.org/10.1109/IPDPS.2018.00052
Behrens, T., Rosenfeld, V., Traub, J., Breß, S., Markl, V.: Efficient SIMD vectorization for hashing in OpenCL. In: EDBT, pp. 489–492 (2018)
Celis, P., Larson, P.A., Munro, J.I.: Robin hood hashing. In: 26th Annual Symposium on Foundations of Computer Science (SFCS 1985), pp. 281–288 (1985). https://doi.org/10.1109/SFCS.1985.48
Dayarathne, N., Ragel, R.: Accelerating rabin karp on a graphics processing unit (GPU) using compute unified device architecture (CUDA). In: 7th International Conference on Information and Automation for Sustainability, pp. 1–6 (2014). https://doi.org/10.1109/ICIAFS.2014.7069589
Fan, B., Andersen, D.G., Kaminsky, M.: Memc3: Compact and concurrent memcache with dumber caching and smarter hashing. In: 10th USENIX Symposium on Networked Systems Design and Implementation (NSDI 2013), pp. 371–384. USENIX Association, Lombard, IL, April 2013. https://www.usenix.org/conference/nsdi13/technical-sessions/presentation/fan
Green, O.: Hashgraph-scalable hash tables using a sparse graph data structure. ACM Trans. Parallel Comput. 8(2) (2021). https://doi.org/10.1145/3460872
Guibas, L.J., Szemeredi, E.: The analysis of double hashing. J. Comput. Syst. Sci. 16(2), 226–274 (1978). https://doi.org/10.1016/0022-0000(78)90046-6, https://www.sciencedirect.com/science/article/pii/0022000078900466
Jünger, D., et al.: Warpcore: a library for fast hash tables on gpus. In: 2020 IEEE 27th International Conference on High Performance Computing, Data, and Analytics (HiPC), pp. 11–20 (2020). https://doi.org/10.1109/HiPC50609.2020.00015
Karp, R.M., Rabin, M.O.: Efficient randomized pattern-matching algorithms. IBM J. Res. Dev. 31(2), 249–260 (1987). https://doi.org/10.1147/rd.312.0249
Knuth, D.E.: The Art of Computer Programming, Volume. 3: Sorting and Searching. Addison Wesley Longman Publishing, Redwood City (1974)
Lessley, B., Childs, H.: Data-parallel hashing techniques for GPU architectures. IEEE Trans. Parallel Distrib. Syst. 31(1), 237–250 (2020). https://doi.org/10.1109/TPDS.2019.2929768
Li, X., Andersen, D.G., Kaminsky, M., Freedman, M.J.: Algorithmic improvements for fast concurrent cuckoo hashing. In: Proceedings of the Ninth European Conference on Computer Systems. EuroSys 2014, Association for Computing Machinery, New York, NY, USA (2014). https://doi.org/10.1145/2592798.2592820
Li, Y., Zhu, Q., Lyu, Z., Huang, Z., Sun, J.: Dycuckoo: dynamic hash tables on GPUs. In: 2021 IEEE 37th International Conference on Data Engineering (ICDE), pp. 744–755 (2021). https://doi.org/10.1109/ICDE51399.2021.00070
Lupescu, G., Ţăpuş, N.: Design of hashtable for heterogeneous architectures. In: 2021 23rd International Conference on Control Systems and Computer Science (CSCS), pp. 172–177 (2021). https://doi.org/10.1109/CSCS52396.2021.00035
Merrill, D.G., Grimshaw, A.S.: Revisiting sorting for GPGPU stream architectures. In: Proceedings of the 19th International Conference on Parallel Architectures and Compilation Techniques, PACT 2010, pp. 545–546. Association for Computing Machinery, New York, NY, USA (2010). https://doi.org/10.1145/1854273.1854344
Pagh, R., Rodler, F.F.: Cuckoo Hashing. In: auf der Heide, F.M. (ed.) ESA 2001. LNCS, vol. 2161, pp. 121–133. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-44676-1_10
Acknowledgments
This work is funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 422742661.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Groth, T., Groppe, S., Pionteck, T., Valdiek, F., Koppehel, M. (2022). Accelerated Parallel Hybrid GPU/CPU Hash Table Queries with String Keys. In: Strauss, C., Cuzzocrea, A., Kotsis, G., Tjoa, A.M., Khalil, I. (eds) Database and Expert Systems Applications. DEXA 2022. Lecture Notes in Computer Science, vol 13427. Springer, Cham. https://doi.org/10.1007/978-3-031-12426-6_15
Download citation
DOI: https://doi.org/10.1007/978-3-031-12426-6_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-12425-9
Online ISBN: 978-3-031-12426-6
eBook Packages: Computer ScienceComputer Science (R0)