Overview#

The cuDF plugin for Apache Spark leverages GPUs to accelerate processing via the libcudf library.

As data workloads continued to grow to support traditional analytics as well as large-scale ML pipelines, traditional CPU-based processing can no longer keep up without compromising either speed or cost. The growing adoption of AI in analytics has created the need for a new framework to process data quickly and cost-efficiently with GPUs.

The cuDF plugin for Apache Spark combines the power of the libcudf library and the scale of the Apache Spark distributed computing framework. The cuDF plugin library also has a built-in accelerated shuffle based on UCX that can be configured to leverage GPU-to-GPU communication and RDMA capabilities.

Performance & Cost Benefits#

The cuDF plugin can reduce Spark job runtime and cost by accelerating SQL operations on GPUs. In the AWS benchmark of GPU-accelerated Apache Spark on Amazon EC2 G7 instances with NVIDIA RTX PRO 4500 Blackwell GPUs, at 3 TB scale, AWS reports up to 3.7x faster execution and up to 31% lower cost than its CPU baselines on Amazon EMR on EKS. See the blog for configurations, methodology, and pricing details.

AWS TPC-DS 3 TB runtime comparison on Amazon EMR on EKS: g7.4xlarge GPU nodes finish in 4.7 minutes versus 16.8 to 17.4 minutes for CPU nodes.

Published AWS runtime comparison for 103 TPC-DS queries at 3 TB scale on eight-node EMR clusters. Source: AWS Big Data Blog.#

Comparison with open-source Spark on EC2#

The NDS benchmark is derived from the TPC-DS benchmark and as such is not comparable to published TPC-DS results, as the NDS results do not comply with the TPC-DS Specification. TPC-DS is a decision support benchmark often used to evaluate performance of OLAP Databases and Big Data systems. NDS includes a set of tools to run the benchmark.

The following comparison combines the published GPU result with separate NDS benchmark results at 3 TB for the same 103-query workload, using open-source Apache Spark 3.5.6 on EC2.

Runtime and reported cost for eight-node clusters: g7.4xlarge GPU, 4.68 minutes and $2.06; m7gd.8xlarge CPU, 39.20 minutes and $8.93; m9gd.4xlarge CPU, 51.58 minutes and $7.38. GPU speedups are 8.4x and 11.0x; reported cost savings are 77% and 72%, respectively. Lower is better.

NDS SF3K runtime and reported cost per run. GPU: published AWS EMR result; CPU: separate open-source Spark results on EC2.#

Using the reported values, the GPU run is 8.4x faster than m7gd.8xlarge and 11.0x faster than m9gd.4xlarge, with 77% and 72% lower reported cost per run, respectively.

These separate runs use different hardware and software stacks. GPU cost includes EC2 and EMR on EKS; CPU costs include EC2 only.

Ease of Use#

Run your existing Apache Spark applications with no code change. Launch Spark with the cuDF plugin and enable a configuration setting:

spark.conf.set('spark.rapids.sql.enabled','true')

The following is an example of a physical plan with operators running on the GPU:

1== Physical Plan ==
2GpuColumnarToRow false
3+- GpuProject [cast(c_customer_sk#0 as string) AS c_customer_sk#40]
4   +- GpuFileGpuScan parquet [c_customer_sk#0] Batched: true, DataFilters: [], Format: Parquet, Location: InMemoryFileIndex[file:/tmp/customer], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<c_customer_sk:int>

Learn more on how to get started.

A Unified AI framework for ETL + ML/DL#

A single pipeline, from ingest to data preparation to model training spark3cluster

_images/spark3cluster.png