Title
Create new category
Edit page index title
Edit category
Edit link
Run Spark Rapids
This page helps you run Spark jobs on GPUs using the NVIDIA RAPIDS Accelerator by outlining setup steps, configuration, and verification procedures.
Prerequisites
Ensure you have access to a cluster with GPU nodes and required permissions.
Java, Hadoop, Spark, and Hive are already installed and accessible in your environment.
CUDA libraries compatible with your RAPIDS version are installed.
Steps to Run Spark Rapids
Download the required JAR files.
Set environment variables.
Make sure the variables above reflect your cluster's directory structure.
Validate the CUDA validation.
Before running your Spark job, check CUDA availability:
This command shows the available GPUs and the current CUDA version.
Launch Spark-Shell with rapids.
Adjust the script paths and versions based on your actual deployment.
Run a sample job.
In the Spark shell, try running a basic DataFrame operation to test GPU acceleration:
or
Monitor the Spark UI (typically at port 4040) to verify that GPU resources are being allocated and used for the tasks.
Validation the job execution.
Check Spark logs in the Resource Manager for any RAPIDS library loading or GPU assignment errors.
Confirm RAPIDS acceleration is being used with log entries about
com.nvidia.spark.rapids.You can also set additional debug logs for more visibility:
Optional Steps
Tuning: Adjust
spark.executor.memory,spark.executor.cores, andspark.executor.instancesfor optimal performance.Library Version Check: Make sure Spark, CUDA, and CUDF versions are compatible.
Python Jobs: If running with PySpark, update the above procedure accordingly (e.g., use
pysparkinstead ofspark-shell).