Distributed (Radix) Hash Join presentation

JasonHu80 15 views 8 slides Jun 18, 2024
Slide 1
Slide 1 of 8
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8

About This Presentation

distributed radix hash join


Slide Content

Distributed (Radix) Hash Join

Distributed Join - partition among nodes E.g. 4 nodes Every node Keeps full S, only some part of R Every node keeps some part of S and R Splitting/partitioning the data by hashing the join key Later on each node can perform a local join Will already have all candidate tuples!

Radix (Hash) Join Core idea: partition the input tuples further, so that hash tables for these partitions fit inside CPU cache and fewer TLB misses Uses a radix tree, 2+ passes for each table (1st: histogram, 2nd: actually filling in the tuples, repeat) Does this for each table

Distributed Radix Hash Join Partitioning Phase Network Partitioning Pass data needs be transmitted over the network in parallel with the computation Local Partitioning Passes: further partitioning, optimizing for cache/TLB

Interleave sending with compute Still, first pass is needed (get the histogram) (first pass can be distributed, scatter gather to master?) Second pass: read base data & compute its partition, write/send out to partitions (Interleave reading and sending) Easier to do in RDMA, still possible with TCP socket?

What I have been doing (Naive) Hash partition among nodes on master shuffle both tables’ tuples to worker nodes Integrate with a reference radix hash join algorithm do the rest

What I should do (I think) First off, send the base tables’ tuples to other nodes (range partition instead of hash?) Distribute the radix partition Scatter gather broadcast histogram Write out partitions - interleaving: compute some send some, repeat With global histogram/pointers, no synchronization needed
Tags