ReSQM: Accelerating Database Operations Using ReRAM-Based Content Addressable Memory

Huize Li, Hai Jin, Long Zheng, Xiaofei LiaoIEEE TCAD 2020

Abstract

The "memory wall" remains a significant bottleneck in big data processing, where the energy and time costs of moving data between memory and CPU often exceed the costs of computation itself. This paper presents ReSQM, a Processing-in-Memory (PIM) accelerator leveraging ReRAM-based Content Addressable Memory (ReCAM). ReSQM enables the execution of complex database queries—including selection, sorting, and joins—entirely within the memory array. By integrating autonomous control units and specialized bit-cell designs, ReSQM achieves up to 611× speedup and 193× energy savings compared to traditional high-end processors.

Introduction

Traditional von Neumann architectures struggle with the massive data movement required for modern database operations. While PIM solutions have been proposed, many are limited to simple selection queries or still rely heavily on the CPU for intermediate result management. ReSQM addresses these limitations by providing a self-contained, autonomous query engine within the memory hierarchy.

ReSQM Architecture

The core of ReSQM is the DSQ Unit, which integrates a ReCAM array with specialized logic to minimize off-chip communication.

The ReSQM system architecture hierarchy from chip level to processing element.

As shown in the architecture diagram, each DSQ Unit contains ALUs and a stack register to parse complex query expressions locally. Look-up tables (LUTs) store truth tables for arithmetic operations, enabling in-situ mathematical processing. A dedicated "R" region within the memory array stores intermediate results, effectively breaking the CPU tether and keeping data movement on-chip.

Hardware-Algorithm Co-Design

To support inequality joins (e.g., finding records where A > B), ReSQM utilizes a modified ReCAM bit-cell and a specialized TAG unit. This design turns physical leakage current into a computational feature, allowing the hardware to determine relational comparisons in a single cycle.

Detailed circuit diagram of the ReCAM bitcell and the TAG unit used for match detection.

The TAG unit includes a sense amplifier (SA) and latch to detect match results along the Match/Word Line. Furthermore, ReSQM implements a count-based sorting algorithm. Instead of physically swapping rows—a costly operation in ReRAM—the system searches for values in order and records their frequency in the "R" region, maintaining high throughput without data relocation.

Performance Evaluation

ReSQM was evaluated against a 10-core Intel Xeon E5-2630v4 processor using synthetic datasets ranging from 4 million to 64 million tuples. The results demonstrate massive performance gains:

  • Selection Queries: 611× speedup.
  • Sorting: 19× speedup.
  • Inequality Joins: 307× speedup.
  • Energy Efficiency: Reductions ranging from 17× to 193× across different operations.

Compared to other state-of-the-art PIM accelerators like NVQuery, ReSQM showed a 30× improvement, primarily due to its superior handling of intermediate data within the DSQ Unit.

Conclusion

ReSQM demonstrates that by combining physical memristor properties with autonomous logic, PIM can evolve from a simple co-processor into a powerful, independent engine for big data analytics. While challenges remain in handling variable-length strings and supporting concurrent multi-user queries, ReSQM provides a viable path toward overcoming the memory wall in database management systems.

Summary updated

BibTeX
@article{li2020resqm,
  author = {Huize Li and Hai Jin and Long Zheng and Xiaofei Liao},
  title = {{ReSQM: Accelerating Database Operations Using ReRAM-Based Content Addressable Memory}},
  journal = {IEEE Trans. Comput. Aided Des. Integr. Circuits Syst.},
  year = {2020},
  doi = {10.1109/tcad.2020.3012860},
}
Figure