Skip to main content

Accelerated Parallel Hybrid GPU/CPU Hash Table Queries with String Keys

  • Conference paper
  • First Online:
Book cover Database and Expert Systems Applications (DEXA 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13427))

Included in the following conference series:

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.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.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

Institutional subscriptions

Notes

  1. 1.

    https://www.khronos.org/opencl/, accessed on 2022-03-08.

  2. 2.

    https://github.com/rapidsai/cudf, accessed on 2022-03-13.

  3. 3.

    https://www.openmp.org/, accessed on 2022-03-08.

  4. 4.

    https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html, accessed on 2022-03-08.

  5. 5.

    https://developer.nvidia.com/cuda-toolkit, accessed on 2022-03-08.

  6. 6.

    https://www.vulkan.org/, accessed on 2022-03-08.

  7. 7.

    https://rocmdocs.amd.com/en/latest/#, accessed on 2022-03-08.

  8. 8.

    https://github.com/Tessil/robin-map, accessed on 2022-03-08.

  9. 9.

    https://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.html, accessed on 2022-03-08.

  10. 10.

    https://nodejs.org/en/, accessed on 2022-03-13.

  11. 11.

    https://www.typescriptlang.org/.

  12. 12.

    https://zenodo.org/record/2634588, accessed on 2022-03-13.

References

  1. 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

  2. Behrens, T., Rosenfeld, V., Traub, J., Breß, S., Markl, V.: Efficient SIMD vectorization for hashing in OpenCL. In: EDBT, pp. 489–492 (2018)

    Google Scholar 

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

    Article  MathSciNet  MATH  Google Scholar 

  10. Knuth, D.E.: The Art of Computer Programming, Volume. 3: Sorting and Searching. Addison Wesley Longman Publishing, Redwood City (1974)

    Google Scholar 

  11. 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

    Article  Google Scholar 

  12. 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

  13. 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

  14. 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

  15. 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

  16. 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

    Chapter  Google Scholar 

Download references

Acknowledgments

This work is funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 422742661.

figure a

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tobias Groth .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics