Locality-Adaptive Parallel Hash Joins Using Hardware Transactional Memory

Conference paper

DOI: 10.1007/978-3-319-56111-0_7

Part of the Lecture Notes in Computer Science book series (LNCS, volume 10195)
Cite this paper as:
Shanbhag A., Pirk H., Madden S. (2017) Locality-Adaptive Parallel Hash Joins Using Hardware Transactional Memory. In: Blanas S., Bordawekar R., Lahiri T., Levandoski J., Pavlo A. (eds) Data Management on New Hardware. IMDM 2016, ADMS 2016. Lecture Notes in Computer Science, vol 10195. Springer, Cham

Abstract

Previous work [1] has claimed that the best performing implementation of in-memory hash joins is based on (radix-)partitioning of the build-side input. Indeed, despite the overhead of partitioning, the benefits from increased cache-locality and synchronization free parallelism in the build-phase outweigh the costs when the input data is randomly ordered. However, many datasets already exhibit significant spatial locality (i.e., non-randomness) due to the way data items enter the database: through periodic ETL or trickle loaded in the form of transactions. In such cases, the first benefit of partitioning — increased locality — is largely irrelevant. In this paper, we demonstrate how hardware transactional memory (HTM) can render the other benefit, freedom from synchronization, irrelevant as well.

Specifically, using careful analysis and engineering, we develop an adaptive hash join implementation that outperforms parallel radix-partitioned hash joins as well as sort-merge joins on data with high spatial locality. In addition, we show how, through lightweight (less than 1% overhead) runtime monitoring of the transaction abort rate, our implementation can detect inputs with low spatial locality and dynamically fall back to radix-partitioning of the build-side input. The result is a hash join implementation that is more than 3 times faster than the state-of-the-art on high-locality data and never more than 1% slower.

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.MIT CSAILCambridgeUSA

Personalised recommendations