在GPU上高效处理连接与分组聚合
Efficiently Processing Joins and Grouped Aggregations on GPUs
AI总结:
针对GPU数据库算子受随机访问影响、分组算子加速不足及评估工作负载有限等问题,提出GFTR技术减少随机访问,优化分组实现并提出新分组算法,实现显著加速并提供查询优化启发式方法。
摘要:
利用GPU处理机器学习以外的任务(尤其是数据库系统中的任务)正受到越来越多的关注。尽管已有大量关于基于GPU的数据库算子的研究,但仍存在若干未解决的问题。例如,几乎所有算子的性能都受随机访问影响,其占比最高可达运行时间的75%。此外,与连接广泛结合使用的分组算子尚未得到GPU加速的充分探索。而且,现有研究常使用有限且不具代表性的工作负载进行评估,未探索查询优化方面(即如何根据工作负载选择最高效的实现)。本文重新审视最先进的基于GPU的连接与分组实现,识别其低效性并提出若干优化。引入GFTR(一种减少随机访问的新技术),实现最高2.3倍的加速;进一步优化现有基于哈希和基于排序的分组实现,分别获得19.4倍和1.7倍的显著加速;还提出一种适用于高分组基数的新型基于分区的分组算法。通过成本模型分析优化,以预测加速效果;最后进行性能评估分析各实现,并提供实用启发式方法,指导查询优化器为给定工作负载选择最高效的实现。
英文摘要:
There is a growing interest in leveraging GPUs for tasks beyond ML, especially in database systems. Despite the existing extensive work on GPU-based database operators, several questions are still open. For instance, the performance of almost all operators suffers from random accesses, which can account for up to 75% of the runtime. In addition, the group-by operator which is widely used in combination with joins, has not been fully explored for GPU acceleration. Furthermore, existing work often uses limited and unrepresentative workloads for evaluation and does not explore the query optimization aspect, i.e., how to choose the most efficient implementation based on the workload. In this paper, we revisit the state-of-the-art GPU-based join and group-by implementations. We identify their inefficiencies and propose several optimizations. We introduce GFTR, a novel technique to reduce random accesses, leading to speedups of up to 2.3x. We further optimize existing hash-based and sort-based group-by implementations, achieving significant speedups (19.4x and 1.7x, respectively). We also present a new partition-based group-by algorithm ideal for high group cardinalities. We analyze the optimizations with cost models, allowing us to predict the speedup. Finally, we conduct a performance evaluation to analyze each implementation. We conclude by providing practical heuristics to guide query optimizers in selecting the most efficient implementation for a given workload.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。