SQL2FPGA: Automated Acceleration of SQL Query Processing on Modern CPU-FPGA Platforms

Alec Lu, Jahanvi Narendra Agrawal, Zhenman Fang
{"title":"SQL2FPGA: Automated Acceleration of SQL Query Processing on Modern CPU-FPGA Platforms","authors":"Alec Lu, Jahanvi Narendra Agrawal, Zhenman Fang","doi":"10.1145/3674843","DOIUrl":null,"url":null,"abstract":"Today’s big data query engines are constantly under pressure to keep up with the rapidly increasing demand for faster processing of more complex workloads. In the past few years, FPGA-based database acceleration efforts have demonstrated promising performance improvement with good energy efficiency. However, few studies target the programming and design automation support to leverage the FPGA accelerator benefits in query processing. Most of them rely on the SQL query plan generated by CPU query engines and manually map the query plan onto the FPGA accelerators, which is tedious and error-prone. Moreover, such CPU-oriented query plans do not consider the utilization of FPGA accelerators and could lose more optimization opportunities. In this paper, we present SQL2FPGA, an FPGA accelerator-aware compiler to automatically map SQL queries onto the heterogeneous CPU-FPGA platforms. Our SQL2FPGA front-end takes an optimized logical plan of a SQL query from a database query engine and transforms it into a unified operator-level intermediate representation. To generate an optimized FPGAaware physical plan, SQL2FPGA implements a set of compiler optimization passes to 1) improve operator acceleration coverage by the FPGA, 2) eliminate redundant computation during physical execution, and 3) minimize data transfer overhead between operators on the CPU and FPGA. Furthermore, it also leverages machine learning techniques to predict and identify the optimal platform, either CPU or FPGA, for the physical execution of individual query operations. Finally, SQL2FPGA generates the associated query acceleration code for heterogeneous CPU-FPGA system deployment. Compared to the widely used Apache Spark SQL framework running on the CPU, SQL2FPGA—using two AMD/Xilinx HBM-based Alveo U280 FPGA boards and Ver.2020 AMD/Xilinx FPGA overlay designs—achieves an average performance speedup of 10.1x and 13.9x across all 22 TPC-H benchmark queries in a scale factor of 1GB (SF1) and 30GB (SF30), respectively. While evaluated on AMD/Xilinx Alveo U50 FPGA boards, SQL2FPGA using Ver. 2022 AMD/Xilinx FPGA overlay designs also achieve an average speedup of 9.6x at SF1 scale factor.","PeriodicalId":505501,"journal":{"name":"ACM Transactions on Reconfigurable Technology and Systems","volume":"24 2","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-07-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Transactions on Reconfigurable Technology and Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3674843","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Today’s big data query engines are constantly under pressure to keep up with the rapidly increasing demand for faster processing of more complex workloads. In the past few years, FPGA-based database acceleration efforts have demonstrated promising performance improvement with good energy efficiency. However, few studies target the programming and design automation support to leverage the FPGA accelerator benefits in query processing. Most of them rely on the SQL query plan generated by CPU query engines and manually map the query plan onto the FPGA accelerators, which is tedious and error-prone. Moreover, such CPU-oriented query plans do not consider the utilization of FPGA accelerators and could lose more optimization opportunities. In this paper, we present SQL2FPGA, an FPGA accelerator-aware compiler to automatically map SQL queries onto the heterogeneous CPU-FPGA platforms. Our SQL2FPGA front-end takes an optimized logical plan of a SQL query from a database query engine and transforms it into a unified operator-level intermediate representation. To generate an optimized FPGAaware physical plan, SQL2FPGA implements a set of compiler optimization passes to 1) improve operator acceleration coverage by the FPGA, 2) eliminate redundant computation during physical execution, and 3) minimize data transfer overhead between operators on the CPU and FPGA. Furthermore, it also leverages machine learning techniques to predict and identify the optimal platform, either CPU or FPGA, for the physical execution of individual query operations. Finally, SQL2FPGA generates the associated query acceleration code for heterogeneous CPU-FPGA system deployment. Compared to the widely used Apache Spark SQL framework running on the CPU, SQL2FPGA—using two AMD/Xilinx HBM-based Alveo U280 FPGA boards and Ver.2020 AMD/Xilinx FPGA overlay designs—achieves an average performance speedup of 10.1x and 13.9x across all 22 TPC-H benchmark queries in a scale factor of 1GB (SF1) and 30GB (SF30), respectively. While evaluated on AMD/Xilinx Alveo U50 FPGA boards, SQL2FPGA using Ver. 2022 AMD/Xilinx FPGA overlay designs also achieve an average speedup of 9.6x at SF1 scale factor.
SQL2FPGA:在现代 CPU-FPGA 平台上自动加速 SQL 查询处理
当今的大数据查询引擎面临着持续的压力,必须跟上快速增长的需求,更快地处理更复杂的工作负载。在过去几年中,基于 FPGA 的数据库加速技术在提高性能的同时,还实现了良好的能效。然而,很少有研究针对编程和设计自动化支持,以充分利用 FPGA 加速器在查询处理方面的优势。大多数研究依赖于 CPU 查询引擎生成的 SQL 查询计划,并将查询计划手动映射到 FPGA 加速器上,这既繁琐又容易出错。此外,这种面向 CPU 的查询计划没有考虑到 FPGA 加速器的利用率,可能会失去更多优化机会。在本文中,我们介绍了 SQL2FPGA,这是一种 FPGA 加速器感知编译器,可自动将 SQL 查询映射到异构 CPU-FPGA 平台上。我们的 SQL2FPGA 前端从数据库查询引擎获取经过优化的 SQL 查询逻辑计划,并将其转换为统一的算子级中间表示。为了生成优化的 FPGA 感知物理计划,SQL2FPGA 实施了一系列编译器优化程序,以便:1)提高 FPGA 的运算符加速覆盖率;2)消除物理执行过程中的冗余计算;3)最大限度地减少 CPU 和 FPGA 上运算符之间的数据传输开销。此外,它还利用机器学习技术来预测和确定物理执行单个查询操作的最佳平台(CPU 或 FPGA)。最后,SQL2FPGA 会生成相关的查询加速代码,用于异构 CPU-FPGA 系统的部署。与在 CPU 上运行的广泛使用的 Apache Spark SQL 框架相比,SQL2FPGA(使用两块基于 AMD/Xilinx HBM 的 Alveo U280 FPGA 板和 Ver.2020 AMD/Xilinx FPGA 叠加设计)在 1GB (SF1) 和 30GB (SF30) 规模因子的所有 22 个 TPC-H 基准查询中分别实现了 10.1 倍和 13.9 倍的平均性能加速。在 AMD/Xilinx Alveo U50 FPGA 板上进行评估时,使用 2022 版 AMD/Xilinx FPGA 叠加设计的 SQL2FPGA 在 SF1 扩展因子下的平均速度也提高了 9.6 倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信