Skip to content

perf(aggregate): emit Partial batches at batch_size * target_partitions#21732

Closed
Dandandan wants to merge 1 commit intoapache:mainfrom
Dandandan:emit-at-batch-size-times-partitions
Closed

perf(aggregate): emit Partial batches at batch_size * target_partitions#21732
Dandandan wants to merge 1 commit intoapache:mainfrom
Dandandan:emit-at-batch-size-times-partitions

Conversation

@Dandandan
Copy link
Copy Markdown
Contributor

@Dandandan Dandandan commented Apr 19, 2026

Summary

Scale AggregateExec's per-batch emission size for Partial / PartialReduce modes to batch_size * target_partitions instead of batch_size.

Motivation

A typical multi-phase aggregation plan looks like:

PartialAgg → RepartitionExec(Hash, P) → CoalesceBatchesExec → FinalAgg

RepartitionExec hash-partitions each input batch into P output sub-batches, so with PartialAgg emitting at batch_size, each sub-batch lands at ~batch_size / P. CoalesceBatchesExec is inserted specifically to re-accumulate these tiny sub-batches back to batch_size before FinalAgg consumes them.

This PR flips the approach: emit bigger upstream so the repartition naturally produces right-sized sub-batches on its own.

  • RepartitionExec still does exactly one hash + mask + take pass per output partition per input batch — same total work, amortized over a larger batch (fewer outer-loop iterations, fewer mpsc sends).
  • CoalesceBatchesExec effectively becomes a pass-through when its inputs are already sized correctly — no concat_batches copies on the hot path.
  • FinalAgg sees batches at the conventional batch_size as expected.

Other aggregate modes (Final, FinalPartitioned, Single, SinglePartitioned) are unchanged since their output goes to the final consumer which expects conventional batch sizing.

Tradeoffs

Test plan

  • cargo check -p datafusion-physical-plan
  • cargo clippy -p datafusion-physical-plan --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • cargo test -p datafusion-physical-plan --lib aggregates:: (86 passed)
  • ClickBench / TPC-H wall-clock numbers (happy to post when the benchmark runner picks this up)

🤖 Generated with Claude Code

PartialAgg's output is about to be hash-repartitioned into P output
partitions, which slices each input batch into sub-batches of
~size/P rows. With the current emission size of `batch_size`,
downstream operators see sub-batches of `batch_size / P` — small
enough that a CoalesceBatchesExec is inserted to re-accumulate them
back to `batch_size`.

Scale the Partial/PartialReduce emission size to
`batch_size * target_partitions` so the post-repartition sub-batches
land at ~`batch_size` directly. CoalesceBatchesExec then has
nothing to do; RepartitionExec does one hash + take pass over a
larger batch instead of many passes over small ones.

Other modes (Final / FinalPartitioned / Single / SinglePartitioned)
keep `batch_size` since their output goes to the final consumer
which expects conventional batch sizing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Apr 19, 2026
@Dandandan
Copy link
Copy Markdown
Contributor Author

run benchmarks

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4276053678-1545-r6sqj 6.12.55+ #1 SMP Sun Feb 1 08:59:41 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing emit-at-batch-size-times-partitions (4e722b0) to 3b5008a (merge-base) diff using: clickbench_partitioned
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4276053678-1546-l9hzw 6.12.55+ #1 SMP Sun Feb 1 08:59:41 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing emit-at-batch-size-times-partitions (4e722b0) to 3b5008a (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4276053678-1547-tdl42 6.12.55+ #1 SMP Sun Feb 1 08:59:41 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing emit-at-batch-size-times-partitions (4e722b0) to 3b5008a (merge-base) diff using: tpch
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and emit-at-batch-size-times-partitions
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃      emit-at-batch-size-times-partitions ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │              6.54 / 7.02 ±0.73 / 8.46 ms │              6.52 / 7.05 ±0.86 / 8.76 ms │     no change │
│ QQuery 2  │        147.96 / 148.49 ±0.37 / 148.97 ms │        146.95 / 147.53 ±0.33 / 147.84 ms │     no change │
│ QQuery 3  │        114.30 / 115.12 ±0.89 / 116.77 ms │        114.00 / 114.81 ±0.48 / 115.45 ms │     no change │
│ QQuery 4  │    1279.49 / 1317.76 ±20.01 / 1335.26 ms │    1295.81 / 1318.15 ±17.84 / 1336.92 ms │     no change │
│ QQuery 5  │        172.26 / 174.72 ±1.98 / 177.34 ms │        173.63 / 174.31 ±0.70 / 175.22 ms │     no change │
│ QQuery 6  │       850.75 / 882.77 ±30.33 / 935.98 ms │       824.00 / 877.71 ±37.50 / 940.85 ms │     no change │
│ QQuery 7  │        341.66 / 345.61 ±2.56 / 349.15 ms │        342.56 / 346.33 ±4.14 / 353.95 ms │     no change │
│ QQuery 8  │        117.71 / 118.39 ±0.66 / 119.21 ms │        115.23 / 118.04 ±1.73 / 119.89 ms │     no change │
│ QQuery 9  │        103.53 / 106.63 ±1.76 / 108.45 ms │        102.13 / 112.46 ±8.98 / 128.49 ms │  1.05x slower │
│ QQuery 10 │        107.06 / 107.71 ±0.62 / 108.45 ms │        106.61 / 108.02 ±1.10 / 109.74 ms │     no change │
│ QQuery 11 │        926.87 / 938.53 ±8.58 / 950.83 ms │        926.33 / 933.04 ±7.01 / 941.96 ms │     no change │
│ QQuery 12 │           45.30 / 46.47 ±0.80 / 47.81 ms │           44.99 / 45.66 ±0.79 / 47.12 ms │     no change │
│ QQuery 13 │        399.05 / 402.71 ±3.38 / 408.28 ms │        400.36 / 405.13 ±3.46 / 408.71 ms │     no change │
│ QQuery 14 │     1001.58 / 1014.66 ±7.31 / 1021.41 ms │      999.01 / 1005.15 ±4.84 / 1013.06 ms │     no change │
│ QQuery 15 │           15.99 / 17.65 ±1.62 / 19.70 ms │           15.07 / 16.25 ±1.18 / 18.50 ms │ +1.09x faster │
│ QQuery 16 │              6.98 / 7.45 ±0.54 / 8.47 ms │              7.14 / 7.78 ±0.65 / 8.58 ms │     no change │
│ QQuery 17 │        230.88 / 232.92 ±1.44 / 234.51 ms │        230.19 / 231.82 ±1.22 / 233.79 ms │     no change │
│ QQuery 18 │        128.08 / 129.76 ±1.56 / 131.76 ms │        127.98 / 130.32 ±1.76 / 133.23 ms │     no change │
│ QQuery 19 │        157.10 / 158.11 ±1.00 / 159.97 ms │        155.77 / 157.58 ±1.39 / 159.36 ms │     no change │
│ QQuery 20 │           13.77 / 14.27 ±0.72 / 15.69 ms │           13.28 / 14.06 ±0.49 / 14.54 ms │     no change │
│ QQuery 21 │           19.98 / 20.25 ±0.26 / 20.75 ms │           18.99 / 19.88 ±0.78 / 21.09 ms │     no change │
│ QQuery 22 │        473.81 / 476.52 ±2.35 / 480.64 ms │        474.52 / 481.18 ±3.70 / 485.52 ms │     no change │
│ QQuery 23 │       867.85 / 880.40 ±10.04 / 895.02 ms │       874.73 / 883.43 ±11.33 / 904.57 ms │     no change │
│ QQuery 24 │        384.68 / 386.76 ±1.48 / 388.76 ms │        382.05 / 385.86 ±3.41 / 391.72 ms │     no change │
│ QQuery 25 │        341.52 / 343.82 ±2.18 / 347.33 ms │        342.17 / 343.40 ±1.08 / 344.91 ms │     no change │
│ QQuery 26 │           79.80 / 84.51 ±2.78 / 87.58 ms │           81.91 / 83.94 ±1.31 / 85.80 ms │     no change │
│ QQuery 27 │              6.93 / 7.08 ±0.18 / 7.42 ms │              7.25 / 7.86 ±0.66 / 8.83 ms │  1.11x slower │
│ QQuery 28 │        150.22 / 151.21 ±0.90 / 152.40 ms │        149.26 / 151.89 ±2.23 / 155.56 ms │     no change │
│ QQuery 29 │        283.30 / 285.17 ±1.17 / 286.92 ms │        282.37 / 283.79 ±0.96 / 284.73 ms │     no change │
│ QQuery 30 │           42.38 / 44.00 ±1.10 / 45.81 ms │           42.92 / 45.69 ±1.82 / 48.11 ms │     no change │
│ QQuery 31 │        172.06 / 174.96 ±1.92 / 178.08 ms │        171.82 / 173.91 ±1.64 / 176.28 ms │     no change │
│ QQuery 32 │           57.66 / 58.60 ±0.61 / 59.57 ms │           58.13 / 58.32 ±0.16 / 58.56 ms │     no change │
│ QQuery 33 │        142.42 / 144.73 ±1.69 / 147.51 ms │        141.61 / 143.88 ±2.30 / 148.21 ms │     no change │
│ QQuery 34 │              6.87 / 7.14 ±0.25 / 7.58 ms │              6.90 / 7.10 ±0.27 / 7.61 ms │     no change │
│ QQuery 35 │        109.01 / 109.98 ±0.64 / 110.85 ms │        108.60 / 109.88 ±1.34 / 112.28 ms │     no change │
│ QQuery 36 │              6.66 / 6.94 ±0.36 / 7.63 ms │              6.39 / 6.68 ±0.22 / 6.98 ms │     no change │
│ QQuery 37 │              8.62 / 8.90 ±0.24 / 9.24 ms │             8.07 / 9.01 ±0.76 / 10.26 ms │     no change │
│ QQuery 38 │           84.10 / 87.73 ±3.16 / 92.18 ms │           85.23 / 88.85 ±3.94 / 96.13 ms │     no change │
│ QQuery 39 │        125.59 / 128.46 ±2.20 / 131.99 ms │        124.21 / 125.73 ±1.40 / 128.14 ms │     no change │
│ QQuery 40 │        110.17 / 115.55 ±7.06 / 128.70 ms │        108.83 / 114.68 ±7.21 / 128.72 ms │     no change │
│ QQuery 41 │           14.35 / 15.01 ±0.87 / 16.63 ms │           14.51 / 15.82 ±1.12 / 17.58 ms │  1.05x slower │
│ QQuery 42 │        108.99 / 111.45 ±1.44 / 113.39 ms │        107.19 / 109.81 ±2.20 / 112.18 ms │     no change │
│ QQuery 43 │              5.99 / 6.19 ±0.17 / 6.50 ms │              6.03 / 6.46 ±0.47 / 7.36 ms │     no change │
│ QQuery 44 │           11.68 / 12.42 ±1.08 / 14.54 ms │           11.88 / 12.09 ±0.14 / 12.30 ms │     no change │
│ QQuery 45 │           50.92 / 52.25 ±0.90 / 53.15 ms │           50.91 / 52.08 ±0.86 / 53.50 ms │     no change │
│ QQuery 46 │              8.71 / 8.95 ±0.18 / 9.27 ms │             8.58 / 9.03 ±0.53 / 10.04 ms │     no change │
│ QQuery 47 │        710.28 / 713.73 ±5.32 / 724.27 ms │        710.95 / 713.33 ±1.43 / 714.98 ms │     no change │
│ QQuery 48 │        275.34 / 288.51 ±7.45 / 294.55 ms │        293.11 / 298.45 ±3.84 / 302.88 ms │     no change │
│ QQuery 49 │        250.37 / 252.79 ±1.45 / 254.56 ms │        250.16 / 254.02 ±2.99 / 257.97 ms │     no change │
│ QQuery 50 │        221.94 / 225.41 ±3.20 / 229.97 ms │        222.55 / 226.30 ±2.28 / 229.73 ms │     no change │
│ QQuery 51 │        180.42 / 184.11 ±2.41 / 187.21 ms │        179.44 / 184.84 ±4.19 / 190.38 ms │     no change │
│ QQuery 52 │        108.85 / 110.32 ±0.98 / 111.60 ms │        106.54 / 108.20 ±1.07 / 109.43 ms │     no change │
│ QQuery 53 │        102.99 / 104.14 ±1.08 / 106.14 ms │        103.17 / 104.10 ±0.77 / 105.29 ms │     no change │
│ QQuery 54 │        146.56 / 147.45 ±0.64 / 148.33 ms │        146.38 / 147.98 ±1.57 / 150.73 ms │     no change │
│ QQuery 55 │        108.67 / 110.17 ±1.32 / 112.07 ms │        106.44 / 108.97 ±1.85 / 111.75 ms │     no change │
│ QQuery 56 │        140.34 / 142.33 ±1.28 / 143.92 ms │        140.91 / 142.09 ±1.10 / 143.41 ms │     no change │
│ QQuery 57 │        172.04 / 175.82 ±2.57 / 179.92 ms │        174.77 / 176.12 ±0.87 / 176.87 ms │     no change │
│ QQuery 58 │        292.74 / 298.69 ±5.53 / 305.68 ms │        295.99 / 303.13 ±4.28 / 308.63 ms │     no change │
│ QQuery 59 │        199.51 / 200.88 ±1.31 / 203.07 ms │        197.81 / 200.57 ±1.61 / 202.68 ms │     no change │
│ QQuery 60 │        145.29 / 146.77 ±1.01 / 147.84 ms │        144.37 / 147.30 ±2.64 / 152.05 ms │     no change │
│ QQuery 61 │           12.95 / 13.29 ±0.37 / 13.93 ms │           13.15 / 13.34 ±0.23 / 13.75 ms │     no change │
│ QQuery 62 │       880.99 / 897.66 ±16.88 / 929.73 ms │       905.40 / 932.21 ±29.94 / 971.73 ms │     no change │
│ QQuery 63 │        103.72 / 106.93 ±2.36 / 110.07 ms │        105.18 / 107.51 ±2.55 / 112.39 ms │     no change │
│ QQuery 64 │        682.22 / 688.70 ±5.25 / 697.84 ms │        692.23 / 695.05 ±2.65 / 699.40 ms │     no change │
│ QQuery 65 │        252.00 / 256.47 ±3.96 / 261.20 ms │        247.74 / 252.00 ±3.15 / 257.33 ms │     no change │
│ QQuery 66 │       252.59 / 261.80 ±10.21 / 280.30 ms │       243.60 / 264.48 ±14.08 / 283.72 ms │     no change │
│ QQuery 67 │       310.01 / 321.08 ±12.06 / 343.13 ms │        310.77 / 316.96 ±7.23 / 330.32 ms │     no change │
│ QQuery 68 │            9.09 / 10.67 ±1.61 / 13.00 ms │            8.57 / 10.19 ±0.90 / 11.34 ms │     no change │
│ QQuery 69 │        103.38 / 105.36 ±1.43 / 107.34 ms │        104.54 / 105.54 ±0.72 / 106.78 ms │     no change │
│ QQuery 70 │       340.64 / 354.70 ±10.68 / 369.34 ms │       334.61 / 351.81 ±12.95 / 369.19 ms │     no change │
│ QQuery 71 │        136.26 / 138.09 ±1.59 / 140.81 ms │        133.19 / 136.19 ±2.23 / 138.88 ms │     no change │
│ QQuery 72 │       606.50 / 627.42 ±11.27 / 640.52 ms │       601.50 / 623.42 ±15.58 / 641.49 ms │     no change │
│ QQuery 73 │              7.18 / 8.83 ±1.06 / 9.74 ms │             6.88 / 8.64 ±1.65 / 11.77 ms │     no change │
│ QQuery 74 │        585.00 / 588.57 ±3.99 / 596.32 ms │       577.49 / 592.79 ±12.19 / 610.70 ms │     no change │
│ QQuery 75 │        275.16 / 279.12 ±3.10 / 283.84 ms │        273.58 / 275.84 ±1.94 / 278.18 ms │     no change │
│ QQuery 76 │        132.73 / 134.12 ±1.20 / 135.50 ms │        133.44 / 134.82 ±1.55 / 137.75 ms │     no change │
│ QQuery 77 │        188.98 / 191.36 ±2.16 / 194.60 ms │        187.75 / 190.05 ±1.59 / 192.72 ms │     no change │
│ QQuery 78 │        340.18 / 346.16 ±4.28 / 351.24 ms │       343.26 / 369.38 ±30.11 / 423.67 ms │  1.07x slower │
│ QQuery 79 │        231.97 / 235.26 ±2.32 / 238.39 ms │        230.36 / 233.96 ±2.58 / 237.44 ms │     no change │
│ QQuery 80 │        322.40 / 323.51 ±1.03 / 324.88 ms │        323.53 / 327.93 ±2.68 / 331.61 ms │     no change │
│ QQuery 81 │           26.51 / 28.54 ±1.60 / 31.25 ms │           26.51 / 27.47 ±0.85 / 28.50 ms │     no change │
│ QQuery 82 │        203.36 / 206.43 ±2.07 / 209.44 ms │        198.65 / 207.14 ±5.77 / 215.22 ms │     no change │
│ QQuery 83 │           39.14 / 39.68 ±0.43 / 40.29 ms │           38.65 / 39.57 ±0.72 / 40.80 ms │     no change │
│ QQuery 84 │           49.27 / 50.04 ±0.79 / 51.55 ms │           48.11 / 49.71 ±1.75 / 53.00 ms │     no change │
│ QQuery 85 │        147.28 / 150.58 ±1.90 / 152.94 ms │        151.35 / 153.62 ±2.50 / 157.97 ms │     no change │
│ QQuery 86 │           39.86 / 41.18 ±0.85 / 42.47 ms │           38.92 / 39.79 ±0.76 / 40.73 ms │     no change │
│ QQuery 87 │           85.74 / 89.47 ±2.95 / 93.67 ms │           86.01 / 89.80 ±2.85 / 93.88 ms │     no change │
│ QQuery 88 │        100.22 / 101.83 ±1.09 / 103.63 ms │        101.74 / 107.13 ±3.96 / 113.62 ms │  1.05x slower │
│ QQuery 89 │        118.92 / 120.93 ±1.32 / 122.55 ms │        119.55 / 120.46 ±0.91 / 121.89 ms │     no change │
│ QQuery 90 │           23.63 / 24.48 ±0.52 / 25.20 ms │           22.55 / 23.83 ±0.75 / 24.66 ms │     no change │
│ QQuery 91 │           62.48 / 63.68 ±1.13 / 65.07 ms │           62.10 / 63.82 ±1.39 / 65.73 ms │     no change │
│ QQuery 92 │           57.36 / 58.33 ±0.82 / 59.63 ms │           58.14 / 58.82 ±0.71 / 60.02 ms │     no change │
│ QQuery 93 │        186.29 / 188.54 ±1.18 / 189.64 ms │        188.50 / 189.97 ±1.00 / 191.30 ms │     no change │
│ QQuery 94 │           62.41 / 63.28 ±0.88 / 64.85 ms │           63.33 / 63.88 ±0.46 / 64.65 ms │     no change │
│ QQuery 95 │        128.42 / 129.75 ±1.18 / 131.34 ms │        130.77 / 131.50 ±0.75 / 132.95 ms │     no change │
│ QQuery 96 │           71.63 / 74.32 ±1.75 / 76.66 ms │           73.93 / 75.31 ±0.88 / 76.29 ms │     no change │
│ QQuery 97 │        126.62 / 129.57 ±1.95 / 131.63 ms │        125.30 / 127.13 ±1.73 / 130.27 ms │     no change │
│ QQuery 98 │        155.88 / 157.25 ±1.13 / 158.95 ms │        153.72 / 155.26 ±1.74 / 158.61 ms │     no change │
│ QQuery 99 │ 10764.75 / 10791.42 ±24.99 / 10836.91 ms │ 10792.05 / 10844.06 ±44.12 / 10916.56 ms │     no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                  ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                  │ 31515.27ms │
│ Total Time (emit-at-batch-size-times-partitions)   │ 31627.33ms │
│ Average Time (HEAD)                                │   318.34ms │
│ Average Time (emit-at-batch-size-times-partitions) │   319.47ms │
│ Queries Faster                                     │          1 │
│ Queries Slower                                     │          5 │
│ Queries with No Change                             │         93 │
│ Queries with Failure                               │          0 │
└────────────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 157.9s
Peak memory 4.8 GiB
Avg memory 4.1 GiB
CPU user 261.0s
CPU sys 17.0s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 158.4s
Peak memory 4.9 GiB
Avg memory 4.0 GiB
CPU user 261.2s
CPU sys 17.2s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and emit-at-batch-size-times-partitions
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃   emit-at-batch-size-times-partitions ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.18 / 4.36 ±6.27 / 16.91 ms │          1.20 / 4.40 ±6.31 / 17.01 ms │     no change │
│ QQuery 1  │        14.41 / 14.66 ±0.15 / 14.84 ms │        14.08 / 14.48 ±0.22 / 14.70 ms │     no change │
│ QQuery 2  │        45.29 / 45.55 ±0.23 / 45.91 ms │        43.50 / 43.90 ±0.24 / 44.18 ms │     no change │
│ QQuery 3  │        39.92 / 40.60 ±0.76 / 42.01 ms │        39.91 / 40.50 ±0.42 / 41.14 ms │     no change │
│ QQuery 4  │     280.01 / 284.80 ±3.78 / 289.40 ms │     272.08 / 275.71 ±3.54 / 282.21 ms │     no change │
│ QQuery 5  │     330.73 / 334.40 ±3.29 / 340.03 ms │     332.93 / 335.56 ±1.60 / 337.67 ms │     no change │
│ QQuery 6  │           5.24 / 5.86 ±0.49 / 6.74 ms │           5.55 / 6.42 ±0.62 / 7.16 ms │  1.09x slower │
│ QQuery 7  │        17.14 / 17.65 ±0.44 / 18.24 ms │        16.36 / 16.84 ±0.27 / 17.18 ms │     no change │
│ QQuery 8  │     404.47 / 414.79 ±6.28 / 421.86 ms │     389.63 / 395.04 ±5.02 / 403.97 ms │     no change │
│ QQuery 9  │     640.44 / 644.80 ±3.19 / 649.14 ms │    624.65 / 641.81 ±11.18 / 657.09 ms │     no change │
│ QQuery 10 │        91.15 / 92.16 ±0.88 / 93.56 ms │        91.65 / 93.80 ±2.57 / 98.70 ms │     no change │
│ QQuery 11 │     102.36 / 104.70 ±2.42 / 108.98 ms │     103.09 / 104.68 ±1.49 / 107.13 ms │     no change │
│ QQuery 12 │     328.11 / 332.34 ±3.02 / 337.09 ms │     333.51 / 335.44 ±1.59 / 338.01 ms │     no change │
│ QQuery 13 │    448.12 / 480.54 ±19.60 / 500.47 ms │     472.92 / 477.00 ±3.16 / 480.85 ms │     no change │
│ QQuery 14 │     336.58 / 342.23 ±3.87 / 348.06 ms │     337.68 / 344.07 ±3.60 / 347.67 ms │     no change │
│ QQuery 15 │     349.38 / 360.35 ±6.08 / 367.30 ms │    343.97 / 362.81 ±15.67 / 388.57 ms │     no change │
│ QQuery 16 │    702.88 / 733.01 ±27.62 / 778.86 ms │     705.95 / 717.20 ±8.99 / 733.41 ms │     no change │
│ QQuery 17 │     707.11 / 713.02 ±3.78 / 717.82 ms │    696.17 / 743.02 ±26.77 / 769.38 ms │     no change │
│ QQuery 18 │ 1402.32 / 1453.73 ±25.77 / 1469.66 ms │ 1547.18 / 1574.82 ±21.84 / 1605.76 ms │  1.08x slower │
│ QQuery 19 │      36.41 / 59.08 ±31.70 / 119.89 ms │       38.98 / 53.33 ±13.30 / 75.71 ms │ +1.11x faster │
│ QQuery 20 │    712.94 / 738.20 ±24.37 / 774.96 ms │    713.67 / 731.48 ±23.06 / 776.99 ms │     no change │
│ QQuery 21 │     754.42 / 761.10 ±7.40 / 770.19 ms │     760.12 / 762.54 ±2.46 / 767.20 ms │     no change │
│ QQuery 22 │  1129.77 / 1138.59 ±8.84 / 1154.99 ms │  1137.05 / 1139.96 ±2.60 / 1144.25 ms │     no change │
│ QQuery 23 │ 3078.94 / 3087.98 ±11.27 / 3109.81 ms │ 3134.66 / 3145.92 ±12.93 / 3171.25 ms │     no change │
│ QQuery 24 │     103.69 / 105.13 ±1.41 / 107.54 ms │     102.76 / 105.11 ±1.68 / 107.54 ms │     no change │
│ QQuery 25 │     136.90 / 140.09 ±2.79 / 144.76 ms │     139.05 / 142.09 ±2.17 / 145.81 ms │     no change │
│ QQuery 26 │     103.11 / 104.28 ±0.97 / 105.91 ms │     102.34 / 103.41 ±1.00 / 105.03 ms │     no change │
│ QQuery 27 │     843.35 / 850.98 ±9.14 / 867.98 ms │     846.39 / 849.66 ±3.43 / 855.81 ms │     no change │
│ QQuery 28 │ 3239.63 / 3274.39 ±22.69 / 3311.21 ms │ 3243.44 / 3282.19 ±20.23 / 3300.05 ms │     no change │
│ QQuery 29 │        52.55 / 57.78 ±5.47 / 66.90 ms │        51.24 / 56.41 ±6.11 / 67.93 ms │     no change │
│ QQuery 30 │     382.39 / 387.26 ±3.70 / 391.97 ms │     351.98 / 361.18 ±5.03 / 365.92 ms │ +1.07x faster │
│ QQuery 31 │    397.44 / 408.82 ±10.45 / 426.93 ms │    380.88 / 398.94 ±14.42 / 418.85 ms │     no change │
│ QQuery 32 │ 1240.62 / 1290.04 ±83.90 / 1457.36 ms │ 1024.30 / 1044.09 ±15.22 / 1068.24 ms │ +1.24x faster │
│ QQuery 33 │ 1440.65 / 1495.46 ±32.59 / 1539.17 ms │ 1442.74 / 1459.96 ±11.09 / 1475.15 ms │     no change │
│ QQuery 34 │ 1510.20 / 1567.82 ±48.69 / 1629.77 ms │ 1462.00 / 1489.67 ±23.95 / 1531.03 ms │     no change │
│ QQuery 35 │    382.85 / 401.50 ±21.63 / 443.92 ms │     375.90 / 389.43 ±9.55 / 402.71 ms │     no change │
│ QQuery 36 │     111.49 / 119.39 ±4.92 / 126.59 ms │     110.25 / 120.33 ±5.13 / 124.21 ms │     no change │
│ QQuery 37 │        46.70 / 48.20 ±2.02 / 52.11 ms │        46.66 / 48.96 ±2.39 / 53.04 ms │     no change │
│ QQuery 38 │        73.78 / 76.27 ±1.33 / 77.75 ms │        76.57 / 76.95 ±0.53 / 77.97 ms │     no change │
│ QQuery 39 │     204.10 / 212.91 ±6.17 / 223.25 ms │     204.84 / 214.33 ±7.67 / 226.87 ms │     no change │
│ QQuery 40 │        23.46 / 25.73 ±2.09 / 29.54 ms │        22.36 / 25.18 ±2.16 / 28.47 ms │     no change │
│ QQuery 41 │        19.23 / 20.34 ±1.10 / 22.30 ms │        19.73 / 20.68 ±0.65 / 21.66 ms │     no change │
│ QQuery 42 │        19.10 / 19.64 ±0.37 / 20.24 ms │        19.07 / 20.29 ±0.91 / 21.59 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                  ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                  │ 22810.55ms │
│ Total Time (emit-at-batch-size-times-partitions)   │ 22569.60ms │
│ Average Time (HEAD)                                │   530.48ms │
│ Average Time (emit-at-batch-size-times-partitions) │   524.87ms │
│ Queries Faster                                     │          3 │
│ Queries Slower                                     │          2 │
│ Queries with No Change                             │         38 │
│ Queries with Failure                               │          0 │
└────────────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 114.9s
Peak memory 33.2 GiB
Avg memory 25.1 GiB
CPU user 1066.6s
CPU sys 100.7s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 113.7s
Peak memory 36.6 GiB
Avg memory 27.1 GiB
CPU user 1062.8s
CPU sys 92.5s
Peak spill 0 B

File an issue against this benchmark runner

@Dandandan Dandandan closed this Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants