
Sailfish: Exploring Heterogeneous Query
Acceleration on Discrete CPU-FPGA Architecture
Xing Wei
1,2
, Yaofeng Tu
1,2
, Yinjun Han
1,2
, Zhenghua Chen
2
, Xuecheng Qi
2
, Daojun Hua
2
{wei.xing6, tu.yaofeng, han.yinjun, chen.zhenghua, qi.xuecheng, hua.daojun}@zte.com.cn
1
State Key Laboratory of Mobile Network and Mobile Multimedia Technology, China
2
ZTE Corporation, China
Abstract—The hardware of modern server is being increasingly
heterogeneous as advanced accelerators, such as FPGAs, are used
together with multicore CPUs to meet the computing requirement
of analytical query workloads. Unfortunately, the earlier database
engines are designed for homogeneous servers, where query
execution is only parallelized across CPUs, but ignores the
prized FPGA resources. To exploit the available heterogeneous
resources, emerging work try to construct the cross-device query
pipeline, wherein a part of the operators run on the FPGA-
end and the rest run on the CPU-end respectively. However,
when running such a pipeline, the CPU-end and FPGA-end
operators could obtain mismatched computing resources, which
easily cause uneven processing performance between two ends,
thereby limiting whole pipeline performance or wasting comput-
ing resources. Of note, it is nearly impossible for query optimizers
to assign the matched computing resources to make CPU-end and
FPGA-end have the similar processing performance, as several
factors (e.g., operator selectivity) affect processing performance.
To tackle this problem, we propose the heterogeneous motion
operator, which can adjust the runtime computing resources (e.g.,
parallelism) of CPU-end, so as to match FPGA-end processing
performance. In addition, we further implement an FPGA
accelerator that supports parallel processing of hash join. By
integrating our motion operator into PostgreSQL with the above
FPGA accelerator, we build a prototype called Sailfish, whose
experimental performance exceeds the native acceleration scheme
by a huge margin.
Index Terms—Database, Heterogeneous System, FPGA
I. INTRODUCTION
The past few years have witnessed the rapid transformation
of Field Programmable Gate Array (FPGA) from the specific
processor to the advanced multi-function accelerator adopted
by various analytical, data-intensive applications. Comparing
to CPU and GPU, FPGA can organize its processing units into
the specific hardware circuit for target acceleration scenarios,
thereby omitting the costs of loading and parsing instructions.
Hence, FPGAs are being used in many deployment scenarios,
ranging from the supercomputing used for HPC applications to
platform-as-a-service that provides FPGA-accelerated virtual
machines. Until now, the widely-used CPU-FPGA platform is
still discrete, in which the FPGA board with many computing
and private memory resources is attached via PCIe bus as the
peripheral of CPU.
Unfortunately, traditional analytical DBMSs solely operate
on CPUs. In the past decades, to meet the strict performance
requirement of big data analysis, database engines attempt to
exploit the CPU parallelism (e.g., multi-thread and SIMD)
and node parallelism (e.g., massively parallel processing) to
speed up the query execution, yet FPGA has not attracted
attentions. Recently, a part of emerging database engines
[1]–[3] are being increasingly deployed on a heterogeneous
platform with discrete CPU and FPGA, which aim at uti-
lizing FPGA-end computing resources to facilitate the query
execution. To achieve the heterogeneous query acceleration,
earlier works [4]–[6] try to offload those CPU-heavy operators
(e.g., HashJoin) into FPGA-end, which can undertake a part
of CPU-end computing burden. Instead of speeding up an
independent operator, later works [2], [7]–[9] aggressively
hand over the contiguous operators within a pipeline to FPGA-
end with the help of reconfigurable capacity in advanced
FPGA (e.g., Xilinx FPGA Virtex-II). It is worth noting that
deploying a group of contiguous operators on FPGA-end can
not only offload more computing tasks from CPU-end, but also
amortize the overheads of cross-device data transfer and/or
synchronization into more operators, especially on discrete
CPU-FPGA architecture.
Despite the progresses made in leveraging FPGA to speedup
database, there still exists a critical issue about the mismatched
computing resources between CPU and FPGA during runtime.
More precisely, for a pipeline that leaves a part of contiguous
operators to FPGA-end, the rest of pipeline running on CPU-
end could take too many or too few computing resources (i.e.,
worker thread or process) to make its processing performance
go beyond or lag behind FPGA-end. If CPU-end provides the
higher performance, the whole pipeline will be limited by the
FPGA-end and waste the extra CPU-end computing resources.
Otherwise, the whole pipeline will be restricted to CPU-end.
Consider the processing performance of CPU-end and FPGA-
end are affected by several factors (e.g., operator selectivity),
it is very difficult for query optimizer to allocate the properly
computing resources that match the FPGA-end.
In this paper, we propose the heterogeneous motion operator
to address the above issues. Such an operator is in charge of
adjusting the runtime parallelism of CPU-end operators within
the same pipeline, so as to match the processing performance
of FPGA-end. In addition, the motion operator also plays as
the coordinator to manage the cross-device data flow so that
the pipeline across CPU-end and FPGA-end can run on the
iterator model. Based on above efforts, we further implement a
prototype called as Sailfish that integrates the motion operator
into PostgreSQL, and take only about 30% onboard resources
198
2023 IEEE 39th International Conference on Data Engineering Workshops (ICDEW)
2473-3490/23/$31.00 ©2023 IEEE
DOI 10.1109/ICDEW58674.2023.00036
2023 IEEE 39th International Conference on Data Engineering Workshops (ICDEW) | 979-8-3503-2244-6/23/$31.00 ©2023 IEEE | DOI: 10.1109/ICDEW58674.2023.00036
Authorized licensed use limited to: ZTE CORPORATION. Downloaded on August 29,2023 at 02:13:41 UTC from IEEE Xplore. Restrictions apply.
评论