Skip to main content

spark-datafusion-comet-benchmark

Apache Spark with Apache DataFusion Comet Benchmarks​

Apache Spark powers large-scale analytics, but its JVM-based execution faces performance limitations. Apache DataFusion Comet attempts to address this by offloading compute operations to a native Rust execution engine built on Apache Arrow DataFusion.

This benchmark evaluates Comet's performance on Amazon EKS using the TPC-DS 3TB workload.

TL;DR

Latest (Iceberg): Apache DataFusion Comet v1.2.0 on Spark 4.1.3 and Iceberg 1.11.0 finished TPC-DS 3TB in 2,195 seconds. That is 18% less runtime than Comet v1.0.0 on Spark 3.5.8, a 1.22× speedup.

  • 101 of 103 queries were faster. The best query was 95% faster.
  • The only real regression, q17, is equally slow on Spark 4.1.3 without Comet.

Our previous TPC-DS 3TB benchmark, comparing Apache DataFusion Comet v1.0.0 with native Spark 3.5.8, delivered:

  • 36% less runtime on Parquet, with a 1.57× speedup. The best query was 69% faster. The largest regression was 36%.
  • 43% less runtime on Iceberg, with a 1.75× speedup. The best query was 68% faster. The largest regression was 142%.

Parquet has not been re-run with Comet v1.2.0 yet.

TPC-DS 3TB Benchmark Results​

Summary​

The TPC-DS 3TB benchmark ran on Amazon EKS. Apache DataFusion Comet v1.0.0 reduced total runtime compared with native Spark for both Parquet and Iceberg tables. Comet v1.2.0 reduced Iceberg runtime by a further 18% compared with Comet v1.0.0. Query results varied by plan, operator, and input shape.

NameCompletion Time (seconds)Speedup
Native Spark3,650.56Baseline
Comet v1.0.02,318.741.57× (36% less runtime)

Benchmark Infrastructure​

Benchmark Methodology

Benchmarks ran sequentially on the same cluster to ensure identical hardware and eliminate resource contention. Native Spark executed first, followed by Comet.

To ensure an apples-to-apples comparison, both native Spark and Comet jobs ran on identical hardware, storage, and data. Only the execution engine and related Spark settings differed.

Test Environment and Configuration​

The Native Spark and Comet v1.0.0 runs shared one environment. The Comet v1.2.0 Iceberg run used the same hardware, executor sizing, and queries on a newer software stack.

ComponentNative SparkComet v1.0.0Comet v1.2.0 (Iceberg)
EKS ClusterAmazon EKS 1.34Amazon EKS 1.34Amazon EKS 1.37
Node Instance Typer8gd.12xlarge (48 vCPUs, 384GB RAM, 3 × 950GB NVMe SSD)SameSame
Nodes4 dedicated benchmark nodesSame4 on-demand nodes in one AZ, dedicated tainted Karpenter static NodePool
Executor Configuration23 executors × 5 cores (requests) × 58GB RAM eachSameSame
Driver Configuration5 cores × 20GB RAMSameSame
Shuffle StorageLocal NVMe SSDLocal NVMe SSDLocal NVMe SSD (RAID0)
DatasetTPC-DS 3TB, Parquet and IcebergSameTPC-DS 3TB, Iceberg only (second copy with identical row and file counts)
StorageAmazon S3: S3A for Parquet, Iceberg S3FileIO with Glue catalogSameAmazon S3: Iceberg S3FileIO with Glue catalog
Iterations5 (median per query)5 (median per query)5 (median per query)
Spark Version3.5.8 (Scala 2.12)3.5.8 (Scala 2.12)4.1.3 (Scala 2.13)
Comet VersionN/A1.0.01.2.0
Iceberg Version1.10.11.10.11.11.0 (iceberg-spark-runtime-4.0_2.13)
Java RuntimeOpenJDK 17OpenJDK 17OpenJDK 17.0.19
Execution EngineJVM-based TungstenRust + JVM hybridRust + JVM hybrid
Key PluginsStandard SparkCometPlugin, CometShuffleManagerCometPlugin, CometShuffleManager
Iceberg ScanIceberg Java readerComet native Iceberg readerComet native Iceberg reader (CometIcebergNativeScan)
Off-heap Memory32GB enabled32GB enabled32GB enabled
Memory ManagementJVM GCUnified native + JVMUnified native + JVM
memoryThrottlingFactor0.70.70.7

Critical Comet-Specific Configurations​

Comet v1.2.0 (Iceberg run):

# Essential Comet Configuration
"spark.plugins": "org.apache.spark.CometPlugin"
"spark.shuffle.manager": "org.apache.spark.sql.comet.execution.shuffle.CometShuffleManager"
"spark.sql.extensions": "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions,org.apache.comet.CometSparkSessionExtensions"

# Memory Configuration
"spark.memory.offHeap.enabled": "true"
"spark.memory.offHeap.size": "32g"
"spark.comet.exec.memoryPool.fraction": "0.8"

# Comet Execution Settings
"spark.comet.exec.enabled": "true"
"spark.comet.shuffle.enabled": "true"
"spark.comet.explain.fallback.enabled": "true"
# Native Iceberg scan (iceberg-rust) is on by default: spark.comet.scan.icebergNative.enabled=true

# Iceberg catalog
"spark.sql.catalog.glue_catalog": "org.apache.iceberg.spark.SparkCatalog"
"spark.sql.catalog.glue_catalog.catalog-impl": "org.apache.iceberg.aws.glue.GlueCatalog"
"spark.sql.catalog.glue_catalog.io-impl": "org.apache.iceberg.aws.s3.S3FileIO"
Configuration changes since Comet v1.0.0
  • spark.comet.exec.shuffle.enabled is now spark.comet.shuffle.enabled.
  • spark.comet.explainFallback.enabled is now spark.comet.explain.fallback.enabled.
  • The default for spark.comet.scan.icebergNative.dataFileConcurrencyLimit (Iceberg data files read in parallel per task) changed from 1 in Comet 1.0 to 2 in Comet 1.2 (1.0 docs, 1.2 docs). Both runs used the default.
  • spark.comet.exec.shuffle.mode, spark.comet.cast.allowIncompatible, and spark.comet.dppFallback.enabled are not in the current Comet configuration reference, so they were not set for v1.2.0.
  • Keep the native Iceberg scan enabled. Setting spark.comet.scan.icebergNative.enabled=false makes Iceberg reads use the Java reader, and most operators above the scan then run in Spark's JVM instead of Comet. We tried this to enable the S3 Analytics Accelerator, which only works with the Java reader: total runtime was 1.53× longer (3,355 s vs 2,195 s), and only 42% of plan operators ran in Comet.

Comet v1.0.0:

# Essential Comet Configuration
"spark.plugins": "org.apache.spark.CometPlugin"
"spark.shuffle.manager": "org.apache.spark.sql.comet.execution.shuffle.CometShuffleManager"

# Memory Configuration - Critical for Comet
"spark.memory.offHeap.enabled": "true"
"spark.memory.offHeap.size": "32g" # Required: 16GB minimum, 32GB recommended

# Comet Execution Settings
"spark.comet.exec.enabled": "true"
"spark.comet.exec.shuffle.enabled": "true"
"spark.comet.exec.shuffle.mode": "auto"
"spark.comet.explainFallback.enabled": "true"
"spark.comet.cast.allowIncompatible": "true"
"spark.comet.dppFallback.enabled": "true"

# AWS-Specific: Required for S3 region detection
"spark.hadoop.fs.s3a.endpoint.region": "us-west-2"

Performance Results​

Overall Performance​

NameCompletion Time (seconds)Performance
Native Spark3,650.56Baseline
DataFusion Comet 1.0.02,318.741.57× (36% less runtime)

Performance Distribution​

Performance RangeQuery CountPercentage
20%+ improvement7169%
10-20% improvement1918%
±10%99%
10-20% degradation22%
20%+ degradation22%

Top 10 Query Improvements​

QueryNative Spark (s)DataFusion Comet 1.0.0 (s)Speedup
q56-v4.05.81.83.21× (+69%)
q58-v4.05.41.73.12× (+68%)
q67-v4.0141.247.03.01× (+67%)
q65-v4.043.616.42.66× (+62%)
q97-v4.043.316.42.64× (+62%)
q18-v4.022.08.82.50× (+60%)
q87-v4.027.711.22.47× (+60%)
q38-v4.027.611.22.45× (+59%)
q6-v4.09.33.92.38× (+58%)
q35-v4.020.08.72.31× (+57%)

Query Regressions​

QueryNative Spark (s)DataFusion Comet 1.0.0 (s)Degradation
q55-v4.01.41.836% slower (0.73×)
q50-v4.082.7104.126% slower (0.79×)
q85-v4.010.812.617% slower (0.86×)
q72-v4.040.445.011% slower (0.90×)
q84-v4.010.010.65% slower (0.95×)
q49-v4.020.220.52% slower (0.98×)
q91-v4.02.12.11% slower (0.99×)
q52-v4.01.51.61% slower (0.99×)
q90-v4.09.29.20% slower (1.00×)

Performance Analysis​

The query results show three main effects: plan changes, native operator performance, and task-tail latency.

QueryResultMain causeKey evidence
q563.21× fasterBroadcast substitutionComet removed 3 sort-merge joins and 6 sorts. Shuffle read decreased from 2.2 GB to 38.4 MB.
q583.12× fasterBroadcast substitutionComet removed 3 sort-merge joins and 6 sorts. Shuffle read decreased by 93%.
q673.01× fasterNative columnar operatorsThe two main stages were 2.90× and 4.49× faster. GC time decreased from 97.5 seconds to 1.0 second.
q5536% slowerShort-query overheadStage CPU time increased from 16.2 seconds to 51.0 seconds. One slow task controlled the result.
q5026% slowerNative sort and merge CPUThe final stage increased from 45.7 seconds to 81.5 seconds.
q8517% slowerScan tail latencyOne scan task increased the critical stage by 3.5 seconds.
DataFusion Comet v0.17.0 Results

Overall Performance​

NameCompletion Time (seconds)Performance
Default3,650.56Baseline
DataFusion Comet 0.17.02,416.711.51× (+34% time)

Performance Distribution​

Performance RangeQuery CountPercentage
20%+ improvement8179%
10-20% improvement1616%
±10%55%
10-20% degradation00%
20%+ degradation11%

Top 10 Query Improvements​

QueryDefault (s)DataFusion Comet 0.17.0 (s)Speedup
q56-v4.05.81.53.75× (+73%)
q58-v4.05.41.82.99× (+67%)
q67-v4.0141.250.52.80× (+64%)
q97-v4.043.317.12.54× (+61%)
q65-v4.043.617.72.47× (+59%)
q38-v4.027.612.02.30× (+57%)
q83-v4.02.81.22.29× (+56%)
q87-v4.027.712.22.27× (+56%)
q18-v4.022.09.82.25× (+56%)
q81-v4.018.08.22.19× (+54%)

Query Regressions​

Only one query regressed

Out of 103 TPC-DS query variants, q50 was the single regression under DataFusion Comet 0.17.0 — running 37% slower (82.7s → 113.2s, 0.73×). Every other query matched or outperformed native Spark.

QueryDefault (s)DataFusion Comet 0.17.0 (s)Degradation
q50-v4.082.7113.237% slower (0.73×)

Notes on Performance Differences​

Two systemic wins drive most of Comet's speedup at the app level: off-heap columnar execution nearly eliminates JVM garbage collection (app-wide GC time −95%, 10,053 s → 538 s) and native columnar shuffle slashes shuffle-read volume (−78%, 12.4 TB → 2.8 TB). Aggregate executor task-time dropped 33%, with disk spill at zero in both runs.

Comet Outperforms Most Queries:​

Example - Query 56 (+73%)

  • Plan went fully native: all 7 Parquet scans became CometNativeScan, and the broadcast exchanges, broadcast hash joins, hash aggregates, and sorts all converted to their Comet equivalents — all 7 ColumnarToRow bridges were removed (105 → 74 plan nodes).
  • Shuffle read collapsed 2,345 MB → 40 MB (−98%) and GC fell 1,921 ms → 0 ms, cutting stage-time from 16.8 s to 5.8 s.
  • Root cause: A small aggregation/broadcast-join query offloaded end-to-end to Comet, where columnar shuffle removes ~98% of shuffle bytes and the JVM row-conversion/GC overhead disappears.

Example - Query 58 (+67%)

  • Same full-native conversion pattern as q56 — scans, filters, broadcast joins, and hash aggregates all become Comet operators, with 7 ColumnarToRow bridges removed.
  • Shuffle read dropped 395 MB → 28 MB (−93%) and GC 714 ms → 12 ms, cutting stage-time from 11.7 s to 4.3 s.
  • Root cause: Identical mechanism to q56 — a broadcast-join + aggregation query fully accelerated by native columnar execution and near-zero-overhead shuffle.

Example - Query 67 (+64%)

  • A large rollup/window query (Expand + Sort + windowed ranking) that Comet runs natively as CometExpand + CometSort + CometSortMergeJoin.
  • GC dropped 97,470 ms → 2,030 ms (−98%) — vanilla Spark spent ~97 s of its 140 s in garbage collection; shuffle read also fell 59.5 GB → 31.2 GB (−48%).
  • Root cause: A memory-/GC-bound query. Moving the large intermediate data off-heap into Comet's columnar engine almost eliminates the GC pauses that dominated the vanilla-Spark run.

Comet Underperforms on One Query:​

Example - Query 50 (-37%)

  • Comet still won on the systemic metrics — GC 38,079 ms → 72 ms and its scan stages were faster (36.6 s → 23.6 s) — but the loss is isolated to a single stage: the large store_sales ⋈ store_returns sort-merge-join + sort reducer.
  • That stage ran ~2× slower under Comet (CometSortMergeJoin + CometSort, 90.0 s) than Spark's whole-stage-codegen SMJ + Sort (45.9 s). The +44 s from the slower native join/sort outweighs the −13 s saved on scans, netting +31 s.
  • Root cause: Comet's native sort-merge-join + sort path is currently ~2× slower than Spark's JIT-compiled codegen for this large fact-to-fact join, and that single stage dominates q50 — so its IO/GC savings cannot compensate.
DataFusion Comet v0.16.0 Results

Overall Performance​

NameCompletion Time (seconds)Performance
Default3,650.56Baseline
DataFusion Comet 0.16.02,467.491.48× (+32% time)

Performance Distribution​

Performance RangeQuery CountPercentage
20%+ improvement6866%
10-20% improvement2221%
±10%1010%
10-20% degradation00%
20%+ degradation33%

Top 10 Query Improvements​

QueryDefault (s)DataFusion Comet 0.16.0 (s)Speedup
q86-v4.012.83.73.47× (+71%)
q58-v4.05.41.82.98× (+66%)
q56-v4.05.82.02.96× (+66%)
q67-v4.0141.250.72.79× (+64%)
q65-v4.043.617.32.52× (+60%)
q97-v4.043.317.42.49× (+60%)
q83-v4.02.81.22.37× (+58%)
q87-v4.027.712.52.21× (+55%)
q38-v4.027.612.52.20× (+55%)
q18-v4.022.010.12.18× (+54%)

Top 3 Query Regressions​

Only three queries showed regressions.

QueryDefault (s)DataFusion Comet 0.16.0 (s)Degradation
q39a-v4.05.17.242% slower (0.70×)
q39b-v4.04.76.741% slower (0.71×)
q50-v4.082.7107.530% slower (0.77×)

Notes on Performance Differences​

Comet Underperforms on Some Queries:​

Example - Query 39a (-42%)

  • Plan is fully "Cometized" (no fallback, no row↔columnar transitions inside the pipeline). Wall regression is concentrated in two parallel "scan inventory + 3× BHJ + partial-agg" stages where DPP leaves a single ~20 MB matching Parquet file processed by one straggler task while every other task reads ~0 B.
  • DPP collapses inventory to a single 20 MB partition that becomes a stage straggler; native scan + native partial-agg are slower than default's whole-stage-codegen on that single skewed task, and the larger straggler propagates a +1.82s delta into a +2.32s end-to-end regression.

Example - Query 39b (-41%)

  • Plan is fully "Cometized"; the regression lives in two parallel inventory partial-aggregation stages (Comet 1444/1445 vs default 4051/4052) which contribute +1.541s of the +1.873s wall-clock delta. Heavy tasks process the same ~21 MB / 63 MB shuffle but Comet spends ~1.5s more wall and ~1.6s more CPU each.
  • Native CometNativeScan → CometProject → CometBroadcastHashJoin × 3 → CometHashAggregate(stddev_samp+avg, 4-key group-by) → CometExchange pipeline burns more CPU per heavy task than Spark's whole-stage-codegen equivalent on this small ~180 MB dataset.

Comet Outperforms Most Queries:​

Example - Query 86 (+71%)

  • Default's dominant stage 5152 (Sort + SortMergeJoin + Expand + HashAggregate) ran 8.512s with 4.4 GB shuffle read, 320.3 MB peak on-heap memory, and 1.417s GC — Comet's equivalent stage 10295 finished in 914ms with stage shuffle read = 0 B and 0ms GC because AQE rewired the second join as a CometBroadcastHashJoin over a 6.1 MiB broadcast.
  • AQE-driven SortMergeJoin → CometBroadcastHashJoin flip on the item side, enabled by Comet's denser columnar shuffle; eliminates the 4.4 GB SMJ shuffle read and the 320 MB on-heap aggregation buffer.

Example - Query 58 (+66%)

  • All 3 SortMergeJoins (and 6 surrounding Sort nodes) in default's executed plan are absent in Comet's: the same 9 logical joins resolve as 8 CometBroadcastHashJoin + 1 BroadcastHashJoin after AQE.
  • AQE chose broadcast joins everywhere under Comet, eliminating the 3 SMJ + 6 Sort pipeline; native CometExchange produced 29% smaller shuffle bytes on identical record counts.
DataFusion Comet v0.15.0 Results

Overall Performance​

NameCompletion Time (seconds)Speedup
Native Spark3,650.56Baseline
Comet3,246.8711% faster

Performance Distribution​

Performance RangeQuery CountPercentage
20%+ improvement3231%
10-20% improvement1918%
±10%4443%
10-20% degradation44%
20%+ degradation44%

Top 10 Query Improvements​

QueryNative Spark (s)Comet (s)Improvement
q5-v4.040.820.051% faster
q56-v4.05.83.049% faster
q41-v4.00.80.447% faster
q45-v4.012.37.043% faster
q9-v4.083.849.042% faster
q80-v4.032.620.138% faster
q58-v4.05.43.338% faster
q86-v4.012.88.136% faster
q83-v4.02.81.836% faster
q73-v4.03.42.236% faster

Top 10 Query Regressions​

QueryNative Spark (s)Comet (s)Degradation
q32-v4.02.95.690% slower
q50-v4.082.7111.535% slower
q39a-v4.05.16.323% slower
q68-v4.05.97.121% slower
q20-v4.05.15.814% slower
q30-v4.015.917.711% slower
q67-v4.0141.2156.811% slower
q25-v4.08.99.910% slower
q29-v4.034.437.810% slower
q91-v4.02.12.310% slower

Notes on Performance Differences​

Why Comet Underperforms on Some Queries:

Example - Query 32 (-90.1%)

  • The regressing stages run identical Spark WholeStageCodegen in both apps -- no Comet operators are involved in the slow stages
  • Comet's best iteration (2,132ms) is faster than Default's best (2,338ms); the median regression is driven by single-task stragglers reaching 7.1s (10.5x p50) in Comet vs 1.8s max in Default
  • Measurement artifact from infrastructure-level straggler interference on a single task out of 118 in Comet's non-Comet scan stages, amplified by 6.6x wider iteration variance (range 8,856ms vs 1,351ms)

Example - Query 39a (-23.1%)

  • Inventory scan stage median task time 35-77% higher in Comet (234ms vs 173ms) due to columnar shuffle serialization overhead
  • CometColumnarExchange retained 200 partitions where Default used 7, inflating broadcast stage from 32ms to 358ms and producing 3.2x more shuffle data (23.3 MB vs 7.2 MB)
  • Two compounding factors: slower scan-stage serialization to Comet's columnar format (+330-538ms), and CometColumnarExchange overriding the natural partition count with 200 partitions for a broadcast exchange that only needed 7

Why Comet Outperforms Some Queries:

Comet's native Rust execution engine excels at CPU-intensive operations

Example - Query 5 (+50.9%)

  • Shuffle read on the SortMergeJoin stage dropped 92% (27.9 GB to 2.2 GB) due to Comet's native columnar shuffle for web_sales (2.16B rows)
  • GC time in the scan stage dropped from 7,236ms to 77ms; CometSort was 56% faster than Spark Sort (13.9 min vs 31.9 min total)
  • Comet's native scan-filter-exchange pipeline for web_sales produced compact Arrow columnar shuffle data, massively reducing downstream shuffle read and sort time in the join stage, with cascading contention reduction benefiting non-Comet stages

Example - Query 56 (+49.0%)

  • AQE converted all three SortMergeJoins to BroadcastHashJoins because CometExchange reported customer_address shuffle size as 2.7 MiB (vs 10.7 MiB in Default), falling below the 10 MB broadcast threshold
  • Combined join stage time dropped from 8.6s to 1.4s; GC dropped from 2.8s to 206ms
  • Comet's Arrow columnar shuffle encoding produced a more compact representation that caused AQE to select broadcast joins, eliminating sort buffers, shuffle overhead, and GC pressure from sort buffer allocation

Resource Usage Analysis​

These resource metrics were captured during the Comet v0.15.0 Parquet run. Both benchmarks ran sequentially on identical hardware to enable direct comparison.

CPU Utilization​

CPU utilization showed similar patterns between Native Spark and Comet, with both sustaining comparable peak and average usage throughout the benchmark.

Native Spark (Default)CPU utilization - Native Spark
CometCPU utilization - Comet

Memory Utilization​

Comet consumed more memory than Native Spark, peaking around ~52GB compared to ~48GB for Native Spark. Native Spark's memory usage returned to a baseline of ~20GB between queries, while Comet remained elevated. This is expected — Comet offloads most compute operations to its native Rust engine using off-heap memory, so the JVM heap sees less activity while native allocations persist between queries. This suggests that on-heap JVM memory per executor could potentially be reduced when running Comet, shifting the memory budget toward off-heap allocation.

Native Spark (Default)Memory utilization - Native Spark
CometMemory utilization - Comet

Network Bandwidth​

Network bandwidth was comparable between Native Spark and Comet, with both showing similar transmit and receive throughput.

Native Spark (Default)Network bandwidth - Native Spark
CometNetwork bandwidth - Comet

Storage I/O​

Storage utilization (IOPS and throughput) showed Comet with higher peak IOPS than Native Spark.

Native Spark (Default)Storage IOPS - Native Spark
CometStorage IOPS - Comet
Full Grafana Dashboard — Native Spark (Default)
Full Grafana dashboard - Native Spark
Full Grafana Dashboard — Comet
Full Grafana dashboard - Comet

Summary: Comet uses slightly more memory than Native Spark (higher peak and elevated baseline between queries), while CPU, network, and storage utilization remain comparable. The 11% overall speedup in that run came without a significant increase in resource consumption. Since Comet performs most compute off-heap in its native Rust engine, operators may be able to reduce on-heap JVM memory per executor and allocate more toward off-heap, potentially improving cost efficiency.

When to Consider Comet​

Comet may be beneficial for:

  • Broadcast-join workloads - Queries such as q56 and q58 gained when Comet removed sort-merge joins and sorts.
  • Native columnar workloads - q67 gained from the native sort, merge, and aggregate operators.
  • Iceberg workloads with the native scan - Comet v1.2.0 ran about 100% of Iceberg plan operators natively when spark.comet.scan.icebergNative.enabled stayed at its default (true).
  • Tested query sets - Test your full query set before deployment.

Running Benchmarks​

The steps below reproduce the Comet v1.2.0 Iceberg run. All files are in data-stacks/spark-on-eks/benchmarks/datafusion-comet-benchmarks/.

Prerequisites​

  • The Spark on EKS data stack deployed, with Spark Operator and Karpenter
  • TPC-DS 3TB data as Iceberg tables in an S3 bucket (under TPCDS-TEST-3TB-ICEBERG/), registered in an AWS Glue database
  • Read access to the data bucket and write access to a results bucket for the spark-team-a service account
  • A container registry (Amazon ECR or another registry)

Step 1: Build the Docker Image​

cd data-stacks/spark-on-eks/benchmarks/datafusion-comet-benchmarks

# Spark 4.1.3 + Iceberg 1.11.0 + Comet 1.2.0, linux/arm64 (Graviton)
docker build --platform linux/arm64 --build-arg INCLUDE_COMET=true \
-t <your-registry>/spark-comet:4.1.3-iceberg-1.11.0-comet-1.2.0 -f Dockerfile-comet .
docker push <your-registry>/spark-comet:4.1.3-iceberg-1.11.0-comet-1.2.0

Build with --build-arg INCLUDE_COMET=false for the native Spark image.

Step 2: Create Dedicated Benchmark Nodes​

The benchmark runs on a fixed set of 4 × r8gd.12xlarge nodes from a Karpenter static NodePool (spec.replicas). The nodes carry the taint benchmark=tpcds:NoSchedule, so only the benchmark pods run on them, and Karpenter doesn't consolidate or replace them during a run.

Static NodePools require Karpenter's StaticCapacity feature gate (alpha). Enable it in data-stacks/spark-on-eks/terraform/data-stack.tfvars and redeploy:

enable_karpenter_static_capacity = true
cd data-stacks/spark-on-eks && ./deploy.sh

Set the availability zone in nodepool-tpcds-benchmark.yaml (default us-west-2a), then create the NodePool and wait for the 4 nodes:

cd benchmarks/datafusion-comet-benchmarks
kubectl apply -f nodepool-tpcds-benchmark.yaml
kubectl get nodes -l karpenter.sh/nodepool=tpcds-benchmark -w

Each node fits 6 Spark pods (58GB each), so 4 nodes hold the driver and all 23 executors.

Step 3: Install NodeLocal DNS Cache (Optional)​

To reduce DNS query volume to the Route 53 Resolver, install NodeLocal DNS Cache:

kubectl apply -f node-local-cache.yaml

The Comet v1.2.0 run was done without it.

Step 4: Run the Benchmark​

Create the Log4j ConfigMap used by the manifests:

kubectl apply -f ../../spark-log4j2-configmap.yaml

Set the variables and submit the Comet Iceberg benchmark. BENCH_ZONE must match the zone in the NodePool.

export RUN_ID=$(date -u +%Y%m%d%H%M)
export DATA_BUCKET=<bucket-with-TPCDS-TEST-3TB-ICEBERG>
export LOGS_BUCKET=<bucket-for-results-and-event-logs>
export ICEBERG_DB=<glue-database-with-tpcds-tables>
export IMAGE_COMET=<your-registry>/spark-comet:4.1.3-iceberg-1.11.0-comet-1.2.0
export ITERATIONS=5 EXECUTOR_INSTANCES=23 QUERY_FILTER="" BENCH_ZONE=us-west-2a

envsubst < tpcds-benchmark-spark41-comet-iceberg.yaml | kubectl apply -f -

tpcds-benchmark-spark41-comet-iceberg-s3-aal.yaml runs Comet with the S3 Analytics Accelerator. It turns off Comet's native Iceberg scan, which made the run about 1.5× slower in our tests.

Run benchmarks one at a time so they don't compete for nodes. The Parquet benchmarks use tpcds-benchmark-comet-parquet.yaml and tpcds-benchmark-parquet.yaml with S3_BUCKET instead.

Step 5: Monitor Benchmark Progress​

# Check job status
kubectl get sparkapplications -n spark-team-a -l benchmark=tpcds-3tb-iceberg

# View driver logs
kubectl logs -f -n spark-team-a -l spark-role=driver,benchmark=tpcds-3tb-iceberg

A full run (103 queries × 5 iterations) takes about 3.5 hours with Comet v1.2.0.

Step 6: Analyze Results​

Each run writes per-query results to s3://$LOGS_BUCKET/TPCDS-3TB-ICEBERG-RESULTS/. The summary.csv file has one row per query: the median, minimum, and maximum time across iterations. Compare two runs with analyze-results.py:

aws s3 cp --recursive s3://$LOGS_BUCKET/TPCDS-3TB-ICEBERG-RESULTS/test1-comet/$RUN_ID/ ./results/ \
--exclude "*" --include "*summary.csv/*.csv"
cat results/*/summary.csv/*.csv > comet-iceberg-candidate.csv

python3 ../analyze-results.py \
--baseline comet-iceberg-v1.2.0.csv --candidate comet-iceberg-candidate.csv \
--baseline-name "Comet 1.2.0" --candidate-name "My run" \
-o report.json --markdown report.md

Step 7: Clean Up​

Release the benchmark nodes when you are done:

kubectl scale nodepool tpcds-benchmark --replicas=0
# or remove the NodePool entirely
kubectl delete -f nodepool-tpcds-benchmark.yaml