Calvin is the co-founder, CEO and CTO of WASAI Technology, which is specialized in FPGA-based datacenter accelerations for Apache Spark, Apache Hadoop and Genomics Analysis applications. He has more than 15 years of experience in software and hardware architecture co-design and performance optimization across a broad range of platforms, including distributed systems, embedded systems and enterprise datacenter applications.
In Big Data field, Spark SQL is important data processing module for Apache Spark to work with structured row-based data in a majority of operators. Field-programmable gate array(FPGA) with highly customized intellectual property(IP) can not only bring better performance but also lower power consumption to accelerate CPU-intensive segments for an application. Current Spark SQL also leverages WholeStageCodegen to improve performance by generating runtime Java functions to eliminate virtual function calls and CPU registers for intermediate data. In this session, we would like to describe how FPGA can help typical Spark SQL workloads to reduce high CPU utilization and release more CPU power by leveraging a new WholeStageCodegen to generate runtime function calls to process data with FPGA. We also use Apache Arrow to hold Columnar Batch data inside native memory and manage its memory reference inside Spark, as well leverage the Apache Arrow Gandiva for just-in-time (JIT) compiling and Columnar Batch data evaluation.
To enable FPGA support in Spark SQL, operators process multiple rows in one function call, and one batch process function can process more data with fewer time. Which is to say, leveraging FPGA accelerator, we can move the CPU-intensive functions such as data aggregation, sorting or data group-by and large data sets to use FPGA IPs and reserve CPU resource for some mission critical or complicate tasks and limit the data moving as less as possible, which can improve the performance dramatically and enable Spark SQL to drive its performance to a next level. Finally, we will use micro-benchmarks and a real-world workload as use cases to explain how and when to use these FPGA IPs to optimize your Big Data applications and identify a typical Spark SQL workload profiling, highlight the hotspots during data aggregation, sorting and group-by, and figure out which function costs higher CPU utilization.