Skip to content

perf(repartition): drop redundant reservation Mutex and halve per-batch Instant::now() calls#21745

Closed
Dandandan wants to merge 1 commit intoapache:mainfrom
Dandandan:repartition-perf-cheap-wins
Closed

perf(repartition): drop redundant reservation Mutex and halve per-batch Instant::now() calls#21745
Dandandan wants to merge 1 commit intoapache:mainfrom
Dandandan:repartition-perf-cheap-wins

Conversation

@Dandandan
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

RepartitionExec's per-batch hot path has two small but measurable sources of overhead that are easy to remove without any semantic change:

  1. The SharedMemoryReservation alias is Arc<Mutex<MemoryReservation>>, but every method on MemoryReservation (try_grow, shrink, try_resize, ...) already takes &self and mutates an AtomicUsize internally. The outer Mutex adds a lock acquire per batch on both the producer (pull_from_input's try_grow) and the consumer (PerPartitionStream's shrink) for no correctness benefit.
  2. The per-sub-batch send_time[partition].timer() idiom calls Instant::now() twice per sub-batch (once on timer(), once on done()/drop). With a 16-output hash repartition that is 32 Instant::now() calls per input batch just for metrics.

A new criterion microbench (datafusion/physical-plan/benches/repartition.rs) was added to make both the current cost and the effect of the fix visible in isolation.

What changes are included in this PR?

repartition/mod.rs

  • Type the three SharedMemoryReservation fields (OutputChannel, PartitionChannels, PerPartitionStream) as Arc<MemoryReservation> and drop the three .lock() callsites. A doc comment on OutputChannel explains why the outer lock is unnecessary. The SharedMemoryReservation alias in common.rs is left alone — it is still used by symmetric_hash_join.
  • Replace the per-sub-batch ScopedTimerGuard in the pull_from_input inner loop with a single advancing Instant. One Instant::now() per sub-batch, preserving the existing per-partition send_time metric.

benches/repartition.rs (new)

Criterion microbench that drives 1 M rows through RepartitionExec in three configurations: hash 16→16, round-robin 16→16, and hash 16→1 coalesce. Output partitions are drained concurrently so the measurement reflects real breaker behaviour (mpsc send, reservation lock, metric timers, SpawnedTask per input).

Are these changes tested?

Yes — all 41 tests in datafusion/physical-plan/src/repartition/tests continue to pass, including the spill, memory-pool, order-preservation, and early-shutdown cases. Clippy and cargo fmt are clean.

Before / after on the new microbench (macOS ARM, 1 M rows):

case before after delta
hash_16_to_16 1.62 ms 1.55 ms ~ −2.5%
round_robin_16_to_16 303 µs 268 µs ~ −10%
hash_16_to_1_coalesce 932 µs 917 µs ~ −5%

The hash cases are dominated by BatchPartitioner::partition_iter (hashing + take_arrays) itself, so the plumbing wins show up most clearly on the round-robin variant where hashing is not the bottleneck.

Are there any user-facing changes?

No. Metrics keep the same shape (per-partition send_time), no public API changes, no behavioural changes to spill / backpressure / ordering.

🤖 Generated with Claude Code

…ch Instant::now() calls

`SharedMemoryReservation` wraps `MemoryReservation` in an `Arc<Mutex<_>>`,
but every method on `MemoryReservation` (`try_grow`, `shrink`, `try_resize`,
...) already takes `&self` and mutates an `AtomicUsize` internally. The
extra `Mutex` is dead weight on the hot path: both the producer (`try_grow`
in `pull_from_input`) and the consumer (`shrink` in `PerPartitionStream`)
paid a lock acquire per batch for no correctness benefit.

Type the three fields in `repartition/mod.rs` as `Arc<MemoryReservation>`
and drop the three `.lock()` callsites. The shared-channel alias
`SharedMemoryReservation` in `common.rs` stays as-is for now — it is still
used by `symmetric_hash_join`.

Independently, the per-sub-batch `send_time[partition].timer()` idiom
calls `Instant::now()` twice per sub-batch (once at `timer()`, once at
`done()`/drop). Replace with a single advancing `Instant` that tracks
elapsed-since-last-partition, giving one `Instant::now()` per sub-batch
while preserving the per-partition `send_time` metric.

Also add a criterion microbench (`benches/repartition.rs`) that drives a
1M-row, 16-input / 16-output hash repartition, a round-robin variant, and
a 16→1 coalesce.

Before / after on the new bench (macOS ARM):

  hash_16_to_16             1.62 ms  ->  1.55 ms   (~ -2.5%)
  round_robin_16_to_16      303 us   ->  268 us    (~ -10%)
  hash_16_to_1_coalesce     932 us   ->  917 us    (~ -5%)

The hash case is dominated by `BatchPartitioner` hashing itself, so the
plumbing wins show up most clearly on the round-robin variant.

All 41 existing `repartition` unit tests pass, including spill and
memory-pool paths.

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 20, 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-c4280940728-1599-wg5qx 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 repartition-perf-cheap-wins (b8fba56) to 43d32a8 (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-c4280940728-1600-7dthm 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 repartition-perf-cheap-wins (b8fba56) to 43d32a8 (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 running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4280940728-1598-27pk2 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 repartition-perf-cheap-wins (b8fba56) to 43d32a8 (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 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 repartition-perf-cheap-wins
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃              repartition-perf-cheap-wins ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │              6.59 / 7.15 ±0.81 / 8.74 ms │              6.63 / 7.17 ±0.81 / 8.78 ms │     no change │
│ QQuery 2  │        145.80 / 146.53 ±0.49 / 147.23 ms │        146.97 / 147.33 ±0.37 / 147.95 ms │     no change │
│ QQuery 3  │        113.67 / 114.24 ±0.47 / 115.11 ms │        113.00 / 113.96 ±0.62 / 114.93 ms │     no change │
│ QQuery 4  │    1313.91 / 1343.26 ±22.27 / 1377.07 ms │    1327.57 / 1357.27 ±15.39 / 1369.42 ms │     no change │
│ QQuery 5  │        173.10 / 175.65 ±1.68 / 177.98 ms │        172.56 / 174.58 ±1.70 / 176.85 ms │     no change │
│ QQuery 6  │       836.67 / 860.23 ±24.42 / 902.61 ms │        854.60 / 865.47 ±7.76 / 873.83 ms │     no change │
│ QQuery 7  │        341.92 / 343.32 ±1.23 / 345.07 ms │        340.84 / 344.39 ±2.24 / 346.49 ms │     no change │
│ QQuery 8  │        114.53 / 115.86 ±0.88 / 117.04 ms │        117.49 / 118.55 ±0.87 / 119.41 ms │     no change │
│ QQuery 9  │        100.69 / 102.50 ±2.57 / 107.55 ms │        100.50 / 105.59 ±8.43 / 122.39 ms │     no change │
│ QQuery 10 │        105.80 / 107.04 ±0.69 / 107.71 ms │        108.35 / 109.18 ±0.57 / 109.95 ms │     no change │
│ QQuery 11 │        957.74 / 967.41 ±5.71 / 973.51 ms │        945.22 / 962.36 ±9.36 / 972.59 ms │     no change │
│ QQuery 12 │           45.94 / 46.87 ±0.92 / 48.52 ms │           44.41 / 46.03 ±1.11 / 47.24 ms │     no change │
│ QQuery 13 │        399.75 / 402.46 ±2.00 / 404.89 ms │        397.67 / 402.53 ±2.99 / 406.86 ms │     no change │
│ QQuery 14 │       995.91 / 999.87 ±3.60 / 1005.75 ms │      991.95 / 1000.45 ±6.26 / 1009.47 ms │     no change │
│ QQuery 15 │           17.15 / 18.51 ±1.07 / 19.96 ms │           15.37 / 15.82 ±0.34 / 16.21 ms │ +1.17x faster │
│ QQuery 16 │              7.19 / 7.74 ±0.36 / 8.32 ms │             7.34 / 8.22 ±1.42 / 11.04 ms │  1.06x slower │
│ QQuery 17 │        229.15 / 230.97 ±1.48 / 233.57 ms │        226.76 / 229.47 ±1.75 / 231.35 ms │     no change │
│ QQuery 18 │        127.30 / 128.56 ±0.70 / 129.27 ms │        126.75 / 128.59 ±1.38 / 130.74 ms │     no change │
│ QQuery 19 │        154.69 / 156.11 ±1.62 / 159.15 ms │        154.23 / 156.32 ±1.11 / 157.42 ms │     no change │
│ QQuery 20 │           13.40 / 14.03 ±0.45 / 14.79 ms │           14.62 / 14.74 ±0.10 / 14.88 ms │  1.05x slower │
│ QQuery 21 │           19.85 / 20.55 ±0.76 / 21.94 ms │           19.37 / 20.18 ±0.54 / 20.82 ms │     no change │
│ QQuery 22 │        484.02 / 485.77 ±1.46 / 487.39 ms │        481.25 / 484.04 ±2.84 / 489.50 ms │     no change │
│ QQuery 23 │        865.42 / 881.42 ±9.53 / 893.21 ms │        880.74 / 887.90 ±4.26 / 891.65 ms │     no change │
│ QQuery 24 │        381.59 / 385.80 ±3.29 / 391.26 ms │        383.46 / 386.82 ±3.75 / 393.85 ms │     no change │
│ QQuery 25 │        340.65 / 342.50 ±1.47 / 344.28 ms │        340.47 / 342.72 ±1.82 / 345.93 ms │     no change │
│ QQuery 26 │           80.86 / 85.49 ±3.27 / 90.33 ms │           82.82 / 84.46 ±0.94 / 85.73 ms │     no change │
│ QQuery 27 │              6.71 / 7.28 ±0.51 / 8.23 ms │              6.93 / 7.49 ±0.49 / 8.26 ms │     no change │
│ QQuery 28 │        149.35 / 150.92 ±1.10 / 152.67 ms │        148.33 / 149.77 ±1.25 / 151.49 ms │     no change │
│ QQuery 29 │        281.14 / 283.35 ±1.68 / 286.15 ms │        283.46 / 284.48 ±1.01 / 286.27 ms │     no change │
│ QQuery 30 │           42.09 / 44.88 ±1.91 / 47.63 ms │           43.02 / 44.69 ±1.03 / 45.85 ms │     no change │
│ QQuery 31 │        170.27 / 171.55 ±0.66 / 172.02 ms │        168.25 / 171.55 ±2.15 / 174.02 ms │     no change │
│ QQuery 32 │           13.57 / 14.07 ±0.34 / 14.56 ms │           14.02 / 15.06 ±1.30 / 17.62 ms │  1.07x slower │
│ QQuery 33 │        141.68 / 143.49 ±1.06 / 144.50 ms │        140.96 / 142.48 ±0.98 / 143.99 ms │     no change │
│ QQuery 34 │              6.99 / 7.66 ±0.64 / 8.86 ms │              6.99 / 7.19 ±0.19 / 7.46 ms │ +1.06x faster │
│ QQuery 35 │        107.14 / 108.23 ±1.32 / 110.66 ms │        106.60 / 109.33 ±1.70 / 111.24 ms │     no change │
│ QQuery 36 │              6.42 / 7.07 ±0.62 / 8.24 ms │              6.70 / 6.91 ±0.14 / 7.12 ms │     no change │
│ QQuery 37 │              8.93 / 9.22 ±0.15 / 9.34 ms │            8.39 / 10.04 ±1.15 / 11.13 ms │  1.09x slower │
│ QQuery 38 │           83.47 / 87.01 ±3.12 / 91.35 ms │           83.81 / 87.95 ±4.27 / 96.18 ms │     no change │
│ QQuery 39 │        123.01 / 126.36 ±3.37 / 132.62 ms │        126.04 / 128.83 ±1.49 / 130.16 ms │     no change │
│ QQuery 40 │        111.95 / 115.34 ±4.35 / 123.77 ms │        111.98 / 116.40 ±5.48 / 126.91 ms │     no change │
│ QQuery 41 │           14.32 / 15.08 ±1.08 / 17.21 ms │           14.34 / 15.11 ±0.53 / 15.86 ms │     no change │
│ QQuery 42 │        108.59 / 109.74 ±0.86 / 111.22 ms │        109.21 / 109.82 ±0.51 / 110.45 ms │     no change │
│ QQuery 43 │              5.96 / 6.36 ±0.61 / 7.55 ms │              6.00 / 6.16 ±0.19 / 6.53 ms │     no change │
│ QQuery 44 │           11.53 / 11.92 ±0.27 / 12.23 ms │           11.83 / 12.13 ±0.29 / 12.64 ms │     no change │
│ QQuery 45 │           50.90 / 52.35 ±1.15 / 54.31 ms │           49.98 / 51.39 ±1.20 / 53.34 ms │     no change │
│ QQuery 46 │              8.34 / 8.67 ±0.18 / 8.89 ms │              8.68 / 8.81 ±0.10 / 8.97 ms │     no change │
│ QQuery 47 │        720.08 / 723.74 ±3.25 / 728.37 ms │        718.50 / 729.33 ±8.94 / 745.12 ms │     no change │
│ QQuery 48 │        286.30 / 290.29 ±2.67 / 293.08 ms │        286.70 / 291.60 ±5.10 / 300.33 ms │     no change │
│ QQuery 49 │        249.89 / 252.82 ±1.88 / 255.03 ms │        248.62 / 253.87 ±2.92 / 257.18 ms │     no change │
│ QQuery 50 │        219.37 / 221.84 ±1.42 / 223.65 ms │        218.64 / 223.43 ±5.49 / 233.72 ms │     no change │
│ QQuery 51 │        181.21 / 182.03 ±0.67 / 182.97 ms │        177.33 / 180.96 ±2.24 / 184.33 ms │     no change │
│ QQuery 52 │        108.16 / 110.17 ±1.23 / 111.99 ms │        108.28 / 109.09 ±0.56 / 109.90 ms │     no change │
│ QQuery 53 │        102.48 / 103.50 ±0.79 / 104.48 ms │        102.79 / 103.94 ±0.75 / 105.17 ms │     no change │
│ QQuery 54 │        145.99 / 148.45 ±1.59 / 150.28 ms │        145.40 / 146.79 ±1.48 / 149.54 ms │     no change │
│ QQuery 55 │        107.36 / 108.48 ±1.11 / 110.31 ms │        106.52 / 107.56 ±0.61 / 108.31 ms │     no change │
│ QQuery 56 │        139.42 / 141.96 ±1.74 / 144.21 ms │        141.42 / 142.29 ±0.81 / 143.51 ms │     no change │
│ QQuery 57 │        173.73 / 175.45 ±1.10 / 177.18 ms │        174.50 / 177.63 ±1.69 / 179.34 ms │     no change │
│ QQuery 58 │        274.77 / 276.42 ±1.66 / 279.04 ms │        272.91 / 273.85 ±0.95 / 275.64 ms │     no change │
│ QQuery 59 │        193.80 / 196.90 ±2.03 / 199.87 ms │        195.07 / 196.57 ±0.87 / 197.45 ms │     no change │
│ QQuery 60 │        143.56 / 144.46 ±0.66 / 145.54 ms │        143.95 / 146.22 ±1.69 / 149.11 ms │     no change │
│ QQuery 61 │           13.20 / 13.37 ±0.10 / 13.51 ms │           13.45 / 13.62 ±0.19 / 13.92 ms │     no change │
│ QQuery 62 │      896.71 / 921.77 ±44.03 / 1009.58 ms │       903.09 / 916.20 ±11.78 / 937.20 ms │     no change │
│ QQuery 63 │        105.06 / 105.82 ±0.50 / 106.55 ms │        102.42 / 106.97 ±2.36 / 109.14 ms │     no change │
│ QQuery 64 │        685.75 / 695.09 ±5.52 / 701.37 ms │        680.95 / 688.08 ±5.16 / 694.29 ms │     no change │
│ QQuery 65 │        253.86 / 257.83 ±4.15 / 265.60 ms │        253.66 / 257.24 ±2.22 / 259.56 ms │     no change │
│ QQuery 66 │       235.19 / 255.45 ±13.22 / 275.63 ms │       234.22 / 250.82 ±11.55 / 267.51 ms │     no change │
│ QQuery 67 │        315.22 / 323.48 ±6.38 / 334.39 ms │        312.30 / 319.42 ±5.46 / 327.71 ms │     no change │
│ QQuery 68 │             8.58 / 9.95 ±1.09 / 11.32 ms │            9.27 / 10.76 ±1.10 / 12.19 ms │  1.08x slower │
│ QQuery 69 │        101.64 / 104.84 ±2.51 / 107.03 ms │        102.44 / 105.60 ±1.75 / 107.31 ms │     no change │
│ QQuery 70 │       340.72 / 358.44 ±14.57 / 379.67 ms │        335.32 / 347.01 ±8.36 / 361.40 ms │     no change │
│ QQuery 71 │        137.63 / 138.79 ±1.20 / 141.04 ms │        135.03 / 137.21 ±1.55 / 139.60 ms │     no change │
│ QQuery 72 │       608.60 / 624.81 ±13.19 / 640.74 ms │        613.74 / 627.24 ±8.53 / 638.43 ms │     no change │
│ QQuery 73 │             6.57 / 7.93 ±1.31 / 10.33 ms │              6.64 / 7.73 ±0.75 / 8.64 ms │     no change │
│ QQuery 74 │        599.25 / 602.36 ±2.67 / 605.70 ms │        601.09 / 610.41 ±8.58 / 620.80 ms │     no change │
│ QQuery 75 │        274.30 / 276.79 ±2.28 / 280.61 ms │        277.25 / 279.06 ±1.31 / 280.54 ms │     no change │
│ QQuery 76 │        131.54 / 135.18 ±2.26 / 137.93 ms │        131.96 / 134.36 ±1.95 / 136.80 ms │     no change │
│ QQuery 77 │        188.44 / 190.66 ±1.71 / 193.31 ms │        190.12 / 191.11 ±0.74 / 192.00 ms │     no change │
│ QQuery 78 │        337.55 / 342.46 ±3.35 / 347.73 ms │        341.43 / 346.89 ±4.48 / 352.44 ms │     no change │
│ QQuery 79 │        232.33 / 234.98 ±2.89 / 240.41 ms │        231.55 / 237.30 ±3.50 / 240.33 ms │     no change │
│ QQuery 80 │        322.50 / 325.64 ±2.12 / 328.04 ms │        320.70 / 325.25 ±2.59 / 327.97 ms │     no change │
│ QQuery 81 │           26.39 / 27.48 ±1.08 / 29.27 ms │           26.82 / 28.18 ±1.05 / 29.39 ms │     no change │
│ QQuery 82 │           40.73 / 41.91 ±1.19 / 43.68 ms │           40.63 / 41.70 ±0.78 / 42.51 ms │     no change │
│ QQuery 83 │           38.53 / 39.75 ±0.91 / 41.32 ms │           39.99 / 41.14 ±0.85 / 42.37 ms │     no change │
│ QQuery 84 │           48.67 / 50.21 ±1.19 / 51.84 ms │           48.14 / 48.89 ±0.48 / 49.63 ms │     no change │
│ QQuery 85 │        148.21 / 149.59 ±1.40 / 151.98 ms │        150.34 / 151.15 ±0.67 / 152.21 ms │     no change │
│ QQuery 86 │           38.75 / 39.84 ±0.65 / 40.51 ms │           39.02 / 40.03 ±0.63 / 40.73 ms │     no change │
│ QQuery 87 │           84.49 / 87.50 ±2.75 / 92.24 ms │           85.07 / 89.74 ±3.96 / 94.59 ms │     no change │
│ QQuery 88 │         99.22 / 100.38 ±0.86 / 101.81 ms │        100.44 / 106.22 ±9.65 / 125.37 ms │  1.06x slower │
│ QQuery 89 │        120.42 / 121.19 ±0.55 / 121.85 ms │        119.44 / 120.69 ±0.80 / 121.83 ms │     no change │
│ QQuery 90 │           23.16 / 24.39 ±0.75 / 25.24 ms │           23.50 / 24.27 ±0.69 / 25.54 ms │     no change │
│ QQuery 91 │           64.80 / 65.90 ±0.77 / 67.13 ms │           63.75 / 64.78 ±0.61 / 65.39 ms │     no change │
│ QQuery 92 │           57.98 / 58.55 ±0.29 / 58.76 ms │           57.85 / 59.37 ±1.01 / 60.87 ms │     no change │
│ QQuery 93 │        186.36 / 188.54 ±1.76 / 191.39 ms │        186.51 / 188.42 ±2.08 / 192.17 ms │     no change │
│ QQuery 94 │           62.61 / 63.59 ±0.84 / 65.14 ms │           62.08 / 63.34 ±1.12 / 65.24 ms │     no change │
│ QQuery 95 │        129.64 / 131.75 ±1.11 / 132.90 ms │        129.56 / 131.48 ±1.81 / 134.54 ms │     no change │
│ QQuery 96 │           72.07 / 73.53 ±1.09 / 74.67 ms │           71.56 / 73.95 ±1.22 / 74.92 ms │     no change │
│ QQuery 97 │        126.35 / 128.22 ±1.14 / 129.84 ms │        127.15 / 128.70 ±1.14 / 130.22 ms │     no change │
│ QQuery 98 │        156.02 / 156.72 ±0.66 / 157.70 ms │        153.87 / 154.24 ±0.33 / 154.71 ms │     no change │
│ QQuery 99 │ 10740.26 / 10767.86 ±19.95 / 10787.36 ms │ 10705.19 / 10740.70 ±31.02 / 10785.30 ms │     no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 31289.46ms │
│ Total Time (repartition-perf-cheap-wins)   │ 31292.12ms │
│ Average Time (HEAD)                        │   316.06ms │
│ Average Time (repartition-perf-cheap-wins) │   316.08ms │
│ Queries Faster                             │          2 │
│ Queries Slower                             │          6 │
│ Queries with No Change                     │         91 │
│ Queries with Failure                       │          0 │
└────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 160.0s
Peak memory 5.0 GiB
Avg memory 4.3 GiB
CPU user 259.8s
CPU sys 16.1s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 160.0s
Peak memory 5.4 GiB
Avg memory 4.4 GiB
CPU user 259.8s
CPU sys 16.3s
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 repartition-perf-cheap-wins
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃           repartition-perf-cheap-wins ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.18 / 4.49 ±6.45 / 17.38 ms │          1.20 / 4.51 ±6.45 / 17.41 ms │     no change │
│ QQuery 1  │        14.99 / 15.44 ±0.33 / 15.98 ms │        14.59 / 14.96 ±0.23 / 15.22 ms │     no change │
│ QQuery 2  │        44.49 / 44.92 ±0.35 / 45.38 ms │        46.03 / 46.27 ±0.24 / 46.68 ms │     no change │
│ QQuery 3  │        39.73 / 40.98 ±1.02 / 42.69 ms │        40.07 / 40.85 ±0.61 / 41.86 ms │     no change │
│ QQuery 4  │     286.79 / 294.95 ±6.24 / 305.05 ms │     292.65 / 301.57 ±7.39 / 313.22 ms │     no change │
│ QQuery 5  │     337.45 / 342.48 ±4.04 / 348.84 ms │     349.37 / 353.33 ±2.48 / 356.74 ms │     no change │
│ QQuery 6  │           5.25 / 6.31 ±0.54 / 6.71 ms │           5.31 / 6.36 ±1.28 / 8.86 ms │     no change │
│ QQuery 7  │        17.83 / 18.19 ±0.21 / 18.50 ms │        17.26 / 17.42 ±0.14 / 17.59 ms │     no change │
│ QQuery 8  │     411.24 / 424.01 ±6.90 / 432.11 ms │    429.76 / 439.87 ±13.73 / 465.72 ms │     no change │
│ QQuery 9  │     655.11 / 665.80 ±5.69 / 670.39 ms │    675.32 / 690.30 ±12.47 / 709.14 ms │     no change │
│ QQuery 10 │        91.31 / 92.88 ±2.28 / 97.40 ms │       94.13 / 96.18 ±3.08 / 102.27 ms │     no change │
│ QQuery 11 │     103.72 / 105.82 ±1.67 / 107.95 ms │     105.60 / 107.23 ±1.07 / 108.43 ms │     no change │
│ QQuery 12 │     337.47 / 344.30 ±6.02 / 355.15 ms │    342.76 / 351.74 ±11.41 / 373.82 ms │     no change │
│ QQuery 13 │     452.26 / 468.64 ±8.31 / 475.26 ms │     464.36 / 473.84 ±9.37 / 490.81 ms │     no change │
│ QQuery 14 │     344.37 / 352.37 ±4.50 / 357.65 ms │     352.66 / 357.31 ±4.24 / 365.32 ms │     no change │
│ QQuery 15 │    370.28 / 383.01 ±13.72 / 409.56 ms │    367.18 / 382.05 ±11.06 / 394.03 ms │     no change │
│ QQuery 16 │     715.03 / 722.59 ±5.24 / 730.50 ms │    714.75 / 727.74 ±13.11 / 752.16 ms │     no change │
│ QQuery 17 │     708.67 / 714.61 ±4.39 / 722.01 ms │     721.38 / 727.77 ±5.18 / 734.40 ms │     no change │
│ QQuery 18 │ 1457.18 / 1486.15 ±32.19 / 1542.50 ms │ 1422.70 / 1500.49 ±40.85 / 1541.81 ms │     no change │
│ QQuery 19 │      36.94 / 59.75 ±42.51 / 144.69 ms │        36.44 / 38.72 ±2.53 / 43.02 ms │ +1.54x faster │
│ QQuery 20 │    715.18 / 739.05 ±21.04 / 769.22 ms │    724.54 / 742.75 ±17.11 / 767.13 ms │     no change │
│ QQuery 21 │     759.40 / 761.30 ±1.22 / 762.70 ms │    770.92 / 781.12 ±10.62 / 800.91 ms │     no change │
│ QQuery 22 │  1142.10 / 1147.97 ±7.56 / 1162.79 ms │  1150.71 / 1156.72 ±4.49 / 1163.01 ms │     no change │
│ QQuery 23 │ 3110.42 / 3141.21 ±23.29 / 3171.86 ms │ 3144.47 / 3161.68 ±12.99 / 3177.26 ms │     no change │
│ QQuery 24 │     102.56 / 105.27 ±2.25 / 108.00 ms │     103.42 / 106.32 ±2.66 / 110.48 ms │     no change │
│ QQuery 25 │     138.47 / 142.08 ±2.34 / 144.74 ms │     139.07 / 142.67 ±2.39 / 145.73 ms │     no change │
│ QQuery 26 │     102.36 / 105.26 ±1.91 / 108.13 ms │     103.28 / 104.26 ±1.35 / 106.91 ms │     no change │
│ QQuery 27 │    850.00 / 859.44 ±13.44 / 885.44 ms │     847.76 / 851.82 ±2.73 / 855.71 ms │     no change │
│ QQuery 28 │ 3277.10 / 3324.21 ±32.42 / 3372.54 ms │ 3259.23 / 3292.64 ±18.71 / 3317.31 ms │     no change │
│ QQuery 29 │        52.21 / 56.17 ±3.05 / 61.05 ms │        51.61 / 58.10 ±4.94 / 65.69 ms │     no change │
│ QQuery 30 │     370.81 / 378.51 ±4.23 / 383.42 ms │     362.19 / 371.18 ±5.30 / 376.75 ms │     no change │
│ QQuery 31 │    376.27 / 392.93 ±10.15 / 408.05 ms │    374.13 / 395.06 ±13.06 / 409.49 ms │     no change │
│ QQuery 32 │ 1052.66 / 1081.27 ±25.57 / 1128.72 ms │ 1068.87 / 1082.77 ±19.04 / 1120.10 ms │     no change │
│ QQuery 33 │ 1482.17 / 1495.78 ±12.87 / 1516.91 ms │ 1495.06 / 1519.30 ±15.65 / 1544.22 ms │     no change │
│ QQuery 34 │ 1498.99 / 1526.03 ±19.33 / 1553.96 ms │ 1491.78 / 1523.03 ±20.00 / 1550.83 ms │     no change │
│ QQuery 35 │    396.93 / 411.79 ±10.52 / 429.33 ms │     400.12 / 405.28 ±3.60 / 410.90 ms │     no change │
│ QQuery 36 │     121.64 / 123.55 ±1.60 / 126.10 ms │     111.79 / 120.48 ±5.01 / 125.74 ms │     no change │
│ QQuery 37 │        48.38 / 49.09 ±0.59 / 49.99 ms │        49.85 / 51.00 ±1.01 / 52.57 ms │     no change │
│ QQuery 38 │        74.85 / 77.12 ±1.63 / 79.26 ms │        76.85 / 78.61 ±1.90 / 82.13 ms │     no change │
│ QQuery 39 │     210.79 / 221.44 ±6.66 / 231.69 ms │     208.67 / 219.01 ±5.22 / 222.51 ms │     no change │
│ QQuery 40 │        24.52 / 26.36 ±1.95 / 30.14 ms │        25.18 / 27.23 ±1.62 / 29.69 ms │     no change │
│ QQuery 41 │        21.06 / 21.83 ±0.66 / 22.90 ms │        20.92 / 22.65 ±1.56 / 25.01 ms │     no change │
│ QQuery 42 │        20.20 / 20.89 ±0.74 / 22.27 ms │        19.86 / 20.50 ±0.39 / 21.08 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 22796.23ms │
│ Total Time (repartition-perf-cheap-wins)   │ 22912.72ms │
│ Average Time (HEAD)                        │   530.14ms │
│ Average Time (repartition-perf-cheap-wins) │   532.85ms │
│ Queries Faster                             │          1 │
│ Queries Slower                             │          0 │
│ Queries with No Change                     │         42 │
│ Queries with Failure                       │          0 │
└────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 120.0s
Peak memory 38.7 GiB
Avg memory 27.0 GiB
CPU user 1082.6s
CPU sys 88.4s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 120.0s
Peak memory 36.2 GiB
Avg memory 26.5 GiB
CPU user 1087.7s
CPU sys 89.3s
Peak spill 0 B

File an issue against this benchmark runner

@Dandandan Dandandan closed this Apr 20, 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