Benchmarks#
PDS-H benchmarks#
We ran the PDS-H benchmark (a TPC-H variant) to compare cudf.pandas on GPU
with pandas on CPU. Here are the results at scale factor 50 (roughly 50 GB of
data):

The steps below reproduce these results.
Setup#
Install cudf following the
installation guide. For nightly wheels:
CUDA_MAJOR=$(nvidia-smi | grep -oP 'CUDA Version: \K[0-9]+')
pip install --extra-index-url https://pypi.anaconda.org/rapidsai-wheels-nightly/simple/ \
"cudf-cu${CUDA_MAJOR}>=0.0.0a0"
Then install tpcgen-cli, a Rust-based TPC-H and TPC-DS data generator used to produce the benchmark
dataset as Parquet files:
pip install tpcgen-cli
Generate data#
Set the scale factor once and reuse it across all steps. The following generates SF50 (scale factor 50, roughly 50GB of data):
export SCALE_FACTOR=50.0
export DATA_PATH="data/tables/scale-${SCALE_FACTOR}"
tpcgen-cli tpch parquet -o "${DATA_PATH}" -s ${SCALE_FACTOR}
Run#
CPU (--frontend pandas-cpu, pandas):
python -m cudf.pandas._benchmarks.pdsh all \
--frontend pandas-cpu \
--path "${DATA_PATH}"
GPU (--frontend in-memory, cudf.pandas):
python -m cudf.pandas._benchmarks.pdsh all \
--frontend in-memory \
--path "${DATA_PATH}"
Results#
Results are written to pdsh_results.jsonl in the current directory by default (override with -o).
Each run appends one JSON line containing metadata and a records field with per-query,
per-iteration timings:
{
"engine_name": "cudf-pandas",
"query_set": "pdsh",
"frontend": "in-memory",
"dataset_path": "data/tables/scale-50.0",
"scale_factor": 50,
"records": {
"1": [
{"query": 1, "iteration": 0, "duration": 0.79, "status": "success"},
{"query": 1, "iteration": 1, "duration": 0.55, "status": "success"}
]
}
}
duration is in seconds. Running multiple frontends with the same -o file appends each as a
separate line, making it easy to compare CPU and GPU results in one file.