Skip to content

DataFusion 1TB single machine benchmark #19815

Closed
Closed

Description

@comphead

Is your feature request related to a problem or challenge?

There was a challenge recently https://www.confessionsofadataguy.com/duckdb-beats-polars-for-1tb-of-data/ and I think it would be beneficial also to run the same for DataFusion

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. added theissue type on Jan 14, 2026
  2. GaneshPatil7517 commented on Jan 14, 2026

    @GaneshPatil7517
    Contributor

    take

  3. comphead commented on Jan 16, 2026

    @comphead
    ContributorAuthor
  4. GaneshPatil7517 commented on Jan 17, 2026

    @GaneshPatil7517
    Contributor

    great @comphead ....

  5. comphead commented on Nov 6, 2026

    @comphead
    ContributorAuthor

    DataFusion TPC-H SF1000 on main (a616831)

    Setup

    • DataFusion 57.0.0-dev, main at a616831 (2026-11-06)
    • Hardware: k8s pod, amd64, 32 cores
    • Data: TPC-H SF1000 Parquet, zstd, 512 MB blocks, partitioned, read from S3
    • target_partitions = 32
    • datafusion.runtime.memory_limit = 105G (greedy pool)
    • datafusion.runtime.temp_directory = /data, max_temp_directory_size = 900G
    • datafusion.runtime.metadata_cache_limit = 2G, list_files_cache_limit = 256M, file_statistics_cache_limit = 256M
    • 3 iterations per query. The times below are in seconds.

    This commit already includes the revert of #25790 (#27145), so the Q18 failure below is not the #27108 regression.

    Results

    Query Mean Min Max Status
    Q01 46.17 45.86 46.38 ok
    Q02 37.71 35.83 41.20 ok
    Q03 31.25 29.53 34.22 ok
    Q04 22.92 22.58 23.18 ok
    Q05 53.85 47.61 64.85 ok
    Q06 4.76 4.63 4.84 ok
    Q07 61.13 59.27 62.28 ok
    Q08 54.80 53.02 56.15 ok
    Q09 failed (OOM)
    Q10 37.20 36.27 38.02 ok
    Q11 13.44 12.13 14.64 ok
    Q12 14.86 13.94 15.80 ok
    Q13 29.77 29.43 30.32 ok
    Q14 4.01 3.50 4.57 ok
    Q15 16.55 10.93 22.36 ok
    Q16 11.52 10.22 13.70 ok
    Q17 75.21 74.55 76.05 ok
    Q18 failed (OOM)
    Q19 31.41 30.92 31.77 ok
    Q20 24.35 23.23 25.99 ok
    Q21 failed (OOM)
    Q22 22.63 20.17 24.50 ok

    19 of 22 queries passed. The sum of their means is 593.6 s and the geometric mean is 24.4 s.

    Failures

    Q09, Q18 and Q21 failed on all 3 iterations with Resources exhausted while building hash join input. HashJoinInput reports can spill: false, so the 105G pool fills up with build-side reservations of similar size, one per partition.

    • Q09: Failed to allocate additional 763.0 MB for HashJoinInput[24] with 763.0 MB already allocated for this reservation - 361.1 MB remain available for the total memory pool: greedy(used: 104.6 GB, pool_size: 105.0 GB). The top consumers are HashJoinInput partitions at 2.1 GB each.
    • Q18: Failed to allocate additional 1440.0 KB for HashJoinInput[4] with 2.5 GB already allocated for this reservation - 247.2 KB remain available for the total memory pool: greedy(used: 105.0 GB, pool_size: 105.0 GB). The top consumers are HashJoinInput partitions at 2.5 GB each.
    • Q21: Failed to allocate additional 4.7 GB for HashJoinInput[24] with 0.0 B already allocated for this reservation - 1591.6 MB remain available for the total memory pool: greedy(used: 103.4 GB, pool_size: 105.0 GB). The top consumers are HashJoinInput partitions at 6.5 GB each.
  6. comphead commented on Nov 9, 2026

    @comphead
    ContributorAuthor

    DataFusion vs Polars, TPC-H SF1000

    This follows up on the DataFusion SF1000 numbers above. Polars ran on the same hardware against the same data.

    Setup

    • DataFusion 57.0.0-dev, main at a616831, target_partitions = 32, memory_limit = 105G (greedy pool)
    • Polars 2.1.0 at 7f902bd, streaming engine, POLARS_TEMP_DIR=/data, no explicit memory limit
    • Hardware: k8s pod, amd64, 32 cores
    • Data: TPC-H SF1000 Parquet, zstd, 512 MB blocks, partitioned, read from S3
    • 3 iterations per query. The times below are mean seconds.

    Results

    Query DataFusion Polars DF / Polars
    Q01 46.17 26.53 1.74x
    Q02 37.71 6.96 5.42x
    Q03 31.25 23.54 1.33x
    Q04 22.92 41.69 0.55x
    Q05 53.85 34.42 1.56x
    Q06 4.76 4.71 1.01x
    Q07 61.13 38.12 1.60x
    Q08 54.80 40.72 1.35x
    Q09 OOM 73.52
    Q10 37.20 deadlock
    Q11 13.44 9.21 1.46x
    Q12 14.86 24.57 0.60x
    Q13 29.77 39.82 0.75x
    Q14 4.01 3.23 1.24x
    Q15 16.55 3.05 5.43x
    Q16 11.52 9.18 1.25x
    Q17 75.21 59.78 1.26x
    Q18 OOM deadlock
    Q19 31.41 28.47 1.10x
    Q20 24.35 10.06 2.42x
    Q21 OOM deadlock
    Q22 22.63 18.68 1.21x

    Both engines finished 18 queries. Over those 18, DataFusion took 556.4 s and Polars took 422.7 s (1.32x). The geometric means are 23.9 s and 16.8 s (1.42x).

    %%{init: {"themeVariables": {"xyChart": {"plotColorPalette": "#2a78d6, #8a8984"}}}}%%
    xychart-beta
        title "DataFusion time / Polars time, SF1000 (above 1 = Polars faster)"
        x-axis ["Q01", "Q02", "Q03", "Q04", "Q05", "Q06", "Q07", "Q08", "Q11", "Q12", "Q13", "Q14", "Q15", "Q16", "Q17", "Q19", "Q20", "Q22"]
        y-axis "DF / Polars" 0 --> 6
        bar [1.74, 5.42, 1.33, 0.55, 1.56, 1.01, 1.60, 1.35, 1.46, 0.60, 0.75, 1.24, 5.43, 1.25, 1.26, 1.10, 2.42, 1.21]
        line [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
    
    Loading

    Observations:

    • DataFusion is faster on Q04, Q12 and Q13. It is about even on Q06.
    • The largest gaps are Q02 and Q15 (about 5.4x) and Q20 (2.4x).
    • DataFusion failed Q09, Q18 and Q21 with hash join build OOMs at 105G, as described above. Polars completed Q09 in 73.5 s.
    • Polars deadlocked on Q10, Q18 and Q21 and reported no result for them.
  7. comphead commented on Nov 11, 2026

    @comphead
    ContributorAuthor

    superseded by #26169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions