Introduction
In modern data analytics, particularly in social network analysis, queries often involve joining multiple large tables. The standard approach is a "cascade of binary joins": joining table A and B, then joining the result with table C. However, this method frequently leads to an "intermediate result explosion." In many cases, the join of A and B produces a massive intermediate dataset that is orders of magnitude larger than the final output. Moving this data in and out of DRAM creates a severe performance bottleneck. Multiway joins process all tables simultaneously to avoid this, but they are difficult to implement efficiently on general-purpose CPUs or standard FPGAs due to memory and communication constraints.
The Plasticine Architecture
This research targets a Coarse-Grained Reconfigurable Architecture (CGRA) called Plasticine. Unlike FPGAs, which configure at the bit-level, Plasticine uses a checkerboard of "Pattern Memory Units" (PMUs) and "Pattern Compute Units" (PCUs) connected by a high-bandwidth on-chip network.
Plasticine is uniquely suited for multiway joins because its high-bandwidth on-chip network makes data replication and broadcasting "cheap." On a CPU, the cost of moving data often outweighs the algorithmic benefits of a multiway join.
Algorithmic Innovations
The authors introduced several key strategies to optimize multiway joins on this hardware:
- Two-Level Partitioning: A hierarchical hashing strategy is used. The first level partitions data so that a single chunk fits into the accelerator's on-chip memory. The second level distributes these chunks across the grid of PMUs.
- Streaming vs. Batching: Unlike previous MapReduce-based algorithms, this approach streams at least one relation. This allows the hardware to overlap data loading with computation (pipelining) and reduces the total memory footprint.
- Broadcast Optimization: Plasticine’s static network is utilized to efficiently broadcast tuples to multiple compute units simultaneously, which is essential for replicating data in multiway joins.
Key Results
The evaluation compared a performance model of the Plasticine architecture against a real-world CPU baseline (Intel Xeon E5-2697 v2 running Postgres) using social network graphs and TPC-H benchmarks.
- Vs. CPU: Plasticine achieves a 200x to 600x speedup over the CPU for standard binary join sequences.
- Multiway vs. Binary: For specific social network queries (Linear 3-way joins), the 3-way algorithm on Plasticine is up to 45x faster than running a sequence of binary joins on the same hardware.
- Star Joins: For data warehouse-style star joins, the multiway approach provides an 11x improvement over cascaded binary joins.
- Bandwidth Efficiency: The multiway approach significantly reduces the amount of data that must be written back to DRAM, which is the primary bottleneck in large-scale database operations.
Limitations and Future Work
While highly efficient, the current implementation assumes a uniform distribution of join keys. In real-world datasets, "data skew" (e.g., celebrities with millions of followers) can lead to unbalanced workloads. The authors suggest using "overflow units" as a potential fix. Additionally, while Plasticine is efficient, extremely large graphs (like a full Facebook-scale graph) still push the limits of current on-chip memory capacities. Future directions include exploring "set value joins" and more advanced multi-level hashing to further increase performance on skewed datasets.
Summary updated