RTCUDB: Building Databases with RT Processors
Xuri Shi, Kai Zhang, X. Sean Wang, Xiaodong Zhang, Rubao Lee
TL;DR
RTCUDB addresses the memory bandwidth bottleneck in GPU-based databases by reconceptualizing query execution as a single ray-tracing job on RT cores. It encodes multiple data attributes into $3D$ coordinates and uses a $BVH$ to prune data access, enabling core operators to run together with minimal random memory accesses. The authors propose encoding schemes for Scan, GroupBy, and Aggregation, plus offline BVH building and selective downstream processing, and demonstrate up to a 18.3-fold speedup over the state-of-the-art CUDA-based engine with markedly reduced memory bandwidth usage. This work shows that RT cores can be effectively harnessed in database engines, offering substantial practical impact for high-performance analytics on GPUs.
Abstract
A spectrum of new hardware has been studied to accelerate database systems in the past decade. Specifically, CUDA cores are known to benefit from the fast development of GPUs and make notable performance improvements. The state-of-the-art GPU-based implementation, i.e., Crystal, can achieve up to 61 times higher performance than CPU-based implementations. However, experiments show that the approach has already saturated almost all GPU memory bandwidth, which means there is little room left for further performance improvements. We introduce RTCUDB, the first query engine that leverages ray tracing (RT) cores in GPUs to accelerate database query processing. RTCUDB efficiently transforms the evaluation of a query into a ray-tracing job in a three-dimensional space. By dramatically reducing the amount of accessed data and optimizing the data access pattern with the ray tracing mechanism, the performance of RTCUDB is no longer limited by the memory bandwidth as in CUDA-based implementations. Experimental results show that RTCUDB outperforms the state-of-the-art GPU-based query engine by up to 18.3 times while the memory bandwidth usage drops to only 36.7% on average.
