A High Throughput Parallel Hash Table on FPGA using XOR-based Memory

Ruizhi Zhang, Sasindu Wijeratne, Yang Yang, Sanmukh R. Kuppannagari, Viktor K. Prasanna

TL;DR

Researchers from USC have developed a high-throughput, parallel hash table for FPGAs that supports all standard operations—search, insert, update, and delete—with "data-agnostic" performance. By leveraging novel XOR-based multi-ported memory, the design achieves a massive throughput of nearly 6 billion operations per second (5926 MOPS), representing a 12.3x speedup over previous state-of-the-art designs that support the same full suite of operations.

What Problem Does This Paper Address?

Hash tables are the bread and butter of data-intensive applications like graph analytics and AI. However, implementing them on FPGAs (Field Programmable Gate Arrays) is notoriously difficult when you want high parallelism.

Standard FPGA memory blocks (BRAM/URAM) typically only have two ports. If you want to perform 16 operations in a single clock cycle, you run into "port contention"—multiple processing engines trying to talk to the same memory at once. Previous solutions either limited the types of operations (e.g., only allowing searches) or used designs where performance crashed if multiple queries hit the same memory partition (data-dependent performance). This paper aims to provide a "guaranteed" $p$ queries per cycle, regardless of the data pattern.

Methods

The core innovation is the use of XOR-based multi-ported block memories.

  • XOR-based Storage: Instead of traditional replication or complex banking, the system stores data across $k$ "Partial XOR Stores." To read a value, the system reads from all stores and XORs the results together. To write, it XORs the new data with the old to update the distributed state.
  • Parallel Processing Engines (PEs): The architecture consists of $p$ parallel PEs. Each PE holds a replica of the hash table.
  • NSQ Ratio Optimization: The authors recognize that not every application needs a high volume of "Non-Search Queries" (NSQ) like inserts or deletes. They introduce a "NSQ ratio" ($k/p$) that allows designers to trade off memory resources. If an application is search-heavy, the design can be stripped down to save on-chip SRAM.
  • Conflict-Free Synchronization: They use a specialized "Partial XOR Store (M)" component that acts as the initiation point for mutations, ensuring that updates from one PE propagate to others via a pipeline without causing hardware stalls.

Datasets

The authors evaluated their design using uniformly distributed access patterns generated as stimulus. These patterns included a mix of all four operation types (search, insert, update, delete) and various hash keys to test the limits of the throughput and collision handling.

Key Insights and Ideas

  • Data Agnosticism: Unlike previous "partition-based" parallel hash tables where performance drops if all queries hit the same bucket, this design's throughput is constant. Because every PE has access to the "whole" table (via XOR encoding), there are no hot-spot stalls.
  • Memory Efficiency via XOR: True multi-ported memory on FPGAs is incredibly expensive in terms of logic. XOR-based memory provides the illusion of many ports using significantly fewer resources than traditional register-based multi-porting.
  • Relaxed Consistency: To maintain such high speeds, the authors use a relaxed consistency model. An update in one PE takes $p$ cycles to fully propagate to all other PEs. They provide a mathematical theorem (Theorem 1) to bound the number of potentially "incorrect" queries during this tiny window of eventual consistency.

Key Results

  • Peak Throughput: On a Xilinx Alveo U250, the design reached 5926 MOPS at a clock frequency of 370 MHz with 16 PEs.
  • Speedup: Compared to the best existing FPGA design that supports search, insert, update, and delete, this work achieved a 12.3x speedup.
  • Parity with Specialized Designs: It matched the performance of FASTHash, a well-known high-speed design that is limited because it only supports search and insert.
  • Latency: The search operation completes in just 14 ns, while the more complex insert operation takes 54 ns (on a 16-PE configuration).

Limitations and Future Work

  • Memory Overhead: While XOR-based memory is more efficient than some alternatives, it still requires replicating the data across multiple stores. For very large hash tables that exceed on-chip SRAM (roughly 50-100MB on modern FPGAs), this design would need to be adapted for off-chip RAM (like HBM), which introduces significantly higher latency.
  • Consistency Trade-offs: The relaxed consistency model is perfect for many AI and graph applications but might not be suitable for systems requiring strict ACID-compliant transactions.
  • Future Direction: The authors suggest that further optimization of the "NSQ ratio" for specific real-world workloads could lead to even more resource-efficient hardware implementations.

Summary updated

BibTeX
@inproceedings{zhang2020high,
  author = {Ruizhi Zhang and Sasindu Wijeratne and Yang Yang and Sanmukh R. Kuppannagari and Viktor K. Prasanna},
  title = {{A High Throughput Parallel Hash Table on FPGA using XOR-based Memory}},
  booktitle = {HPEC},
  year = {2020},
  url = {https://openreview.net/forum?id=JSVWMilexJ},
}

Loading related content...

Figure