You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "cetra3 (via GitHub)" <gi...@apache.org> on 2026/02/16 11:49:01 UTC
[PR] Compact more aggressively in TopK based upon memory usage [datafusion]
cetra3 opened a new pull request, #20381:
URL: https://github.com/apache/datafusion/pull/20381
## Which issue does this PR close?
Sort of addresses https://github.com/apache/datafusion/issues/19386
## Rationale for this change
Compaction in TopK values currently uses some hard set heuristics to decide when to compact. Instead we can use the memory size of the batches as a bound.
## What changes are included in this PR?
Adjusts TopK compaction to compact more aggressively, based upon memory size.
## Are these changes tested?
Yes and a test has been added.
## Are there any user-facing changes?
No
## Benchmarks
I'm struggling (in this PR and other PRs...) to get some good reliable benchmarks through.
However with this one it seems like it's *mostly* the same speed as `main` or a little faster in some cases:
```
+ critcmp main topk_memory_batch
group main topk_memory_batch
----- ---- -----------------
aggregate 10000000 time-series rows 1.05 45.5±2.13ms ? ?/sec 1.00 43.5±2.09ms ? ?/sec
aggregate 10000000 worst-case rows 1.06 43.9±1.12ms ? ?/sec 1.00 41.5±1.03ms ? ?/sec
distinct 10000000 rows asc [TopK] 1.00 4.3±0.25ms ? ?/sec 1.00 4.3±0.07ms ? ?/sec
distinct 10000000 rows asc [no TopK] 1.00 42.9±1.83ms ? ?/sec 1.06 45.5±1.65ms ? ?/sec
distinct 10000000 rows desc [TopK] 1.00 4.3±0.07ms ? ?/sec 1.01 4.3±0.06ms ? ?/sec
distinct 10000000 rows desc [no TopK] 1.00 42.4±1.48ms ? ?/sec 1.05 44.7±1.88ms ? ?/sec
top k=10 aggregate 10000000 time-series rows 1.13 10.6±0.54ms ? ?/sec 1.00 9.4±0.64ms ? ?/sec
top k=10 aggregate 10000000 time-series rows [Utf8View] 1.08 11.0±0.65ms ? ?/sec 1.00 10.2±0.48ms ? ?/sec
top k=10 aggregate 10000000 worst-case rows 1.04 16.8±1.47ms ? ?/sec 1.00 16.1±1.44ms ? ?/sec
top k=10 aggregate 10000000 worst-case rows [Utf8View] 1.10 17.9±1.51ms ? ?/sec 1.00 16.2±1.16ms ? ?/sec
top k=10 string aggregate 10000000 time-series rows [Utf8View] 1.11 9.1±0.36ms ? ?/sec 1.00 8.2±0.35ms ? ?/sec
top k=10 string aggregate 10000000 time-series rows [Utf8] 1.12 7.8±0.48ms ? ?/sec 1.00 6.9±0.26ms ? ?/sec
top k=10 string aggregate 10000000 worst-case rows [Utf8View] 1.06 8.6±0.21ms ? ?/sec 1.00 8.1±0.20ms ? ?/sec
top k=10 string aggregate 10000000 worst-case rows [Utf8] 1.07 7.4±0.17ms ? ?/sec 1.00 6.9±0.13ms ? ?/sec
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453914268
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453890106)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4453890106-101-gjlbm 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) to 7f2f78d (merge-base) [diff](https://github.com/apache/datafusion/compare/7f2f78d48b6d3d6aee2ce2fd29910bb4c11b1012..1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) using: clickbench_partitioned
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417670141
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4417615444)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1 │ 40.86 / 43.20 ±3.83 / 50.82 ms │ 41.06 / 42.21 ±1.23 / 43.94 ms │ no change │
│ QQuery 2 │ 22.05 / 22.23 ±0.14 / 22.45 ms │ 21.68 / 21.94 ±0.16 / 22.11 ms │ no change │
│ QQuery 3 │ 39.81 / 40.72 ±0.68 / 41.74 ms │ 38.41 / 41.11 ±1.44 / 42.34 ms │ no change │
│ QQuery 4 │ 19.22 / 19.43 ±0.33 / 20.08 ms │ 19.35 / 19.80 ±0.78 / 21.36 ms │ no change │
│ QQuery 5 │ 46.85 / 48.62 ±1.37 / 50.57 ms │ 48.28 / 49.95 ±1.30 / 51.82 ms │ no change │
│ QQuery 6 │ 17.37 / 17.60 ±0.15 / 17.77 ms │ 17.93 / 18.58 ±1.04 / 20.63 ms │ 1.06x slower │
│ QQuery 7 │ 54.60 / 56.45 ±1.66 / 59.06 ms │ 56.62 / 57.63 ±0.57 / 58.39 ms │ no change │
│ QQuery 8 │ 49.20 / 50.05 ±0.94 / 51.55 ms │ 49.09 / 49.42 ±0.25 / 49.83 ms │ no change │
│ QQuery 9 │ 55.18 / 55.64 ±0.35 / 56.25 ms │ 54.35 / 55.83 ±1.12 / 57.80 ms │ no change │
│ QQuery 10 │ 70.02 / 71.97 ±2.02 / 75.81 ms │ 70.19 / 71.64 ±1.08 / 73.33 ms │ no change │
│ QQuery 11 │ 15.75 / 16.16 ±0.48 / 17.06 ms │ 15.28 / 15.74 ±0.57 / 16.85 ms │ no change │
│ QQuery 12 │ 27.77 / 27.95 ±0.24 / 28.41 ms │ 27.43 / 27.73 ±0.21 / 28.07 ms │ no change │
│ QQuery 13 │ 39.50 / 40.30 ±0.73 / 41.68 ms │ 40.02 / 41.13 ±0.81 / 42.23 ms │ no change │
│ QQuery 14 │ 28.66 / 28.78 ±0.10 / 28.95 ms │ 28.62 / 28.72 ±0.13 / 28.97 ms │ no change │
│ QQuery 15 │ 35.42 / 35.83 ±0.33 / 36.42 ms │ 35.28 / 36.41 ±1.01 / 38.10 ms │ no change │
│ QQuery 16 │ 16.69 / 16.74 ±0.07 / 16.88 ms │ 16.67 / 16.78 ±0.07 / 16.87 ms │ no change │
│ QQuery 17 │ 92.95 / 95.08 ±1.35 / 96.71 ms │ 91.92 / 93.39 ±1.26 / 94.98 ms │ no change │
│ QQuery 18 │ 79.38 / 81.84 ±1.71 / 84.75 ms │ 78.75 / 80.82 ±2.06 / 84.56 ms │ no change │
│ QQuery 19 │ 39.24 / 40.19 ±1.41 / 42.96 ms │ 38.96 / 40.51 ±1.98 / 44.42 ms │ no change │
│ QQuery 20 │ 42.50 / 43.16 ±0.59 / 43.97 ms │ 41.96 / 42.75 ±0.71 / 43.86 ms │ no change │
│ QQuery 21 │ 68.78 / 70.16 ±1.07 / 71.76 ms │ 66.76 / 67.57 ±0.99 / 69.48 ms │ no change │
│ QQuery 22 │ 25.82 / 26.07 ±0.17 / 26.31 ms │ 24.99 / 25.22 ±0.20 / 25.48 ms │ no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD) │ 948.15ms │
│ Total Time (topk_memory_batch) │ 944.88ms │
│ Average Time (HEAD) │ 43.10ms │
│ Average Time (topk_memory_batch) │ 42.95ms │
│ Queries Faster │ 0 │
│ Queries Slower │ 1 │
│ Queries with No Change │ 21 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴──────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpch — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.6 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 35.1s |
| CPU sys | 2.8s |
| Peak spill | 0 B |
**tpch — branch**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.7 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 34.8s |
| CPU sys | 3.0s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan merged PR #20381:
URL: https://github.com/apache/datafusion/pull/20381
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453915195
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453890106)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4453890106-102-5smcg 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) to 7f2f78d (merge-base) [diff](https://github.com/apache/datafusion/compare/7f2f78d48b6d3d6aee2ce2fd29910bb4c11b1012..1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) using: tpcds
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453890106
run benchmarks
```yaml
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: '12G'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417615444
run benchmarks
```yaml
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: '4Gi'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4287420481
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4287289167)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1 │ 6.92 / 7.39 ±0.85 / 9.09 ms │ 6.96 / 7.42 ±0.88 / 9.19 ms │ no change │
│ QQuery 2 │ 147.60 / 148.03 ±0.29 / 148.35 ms │ 147.56 / 148.03 ±0.31 / 148.48 ms │ no change │
│ QQuery 3 │ 112.77 / 113.94 ±1.18 / 116.15 ms │ 112.29 / 113.83 ±1.11 / 114.91 ms │ no change │
│ QQuery 4 │ 1210.29 / 1226.33 ±13.80 / 1243.93 ms │ 1207.42 / 1220.36 ±6.70 / 1226.32 ms │ no change │
│ QQuery 5 │ 171.32 / 172.25 ±0.54 / 172.82 ms │ 172.19 / 173.08 ±1.10 / 175.03 ms │ no change │
│ QQuery 6 │ 805.79 / 837.70 ±17.09 / 855.94 ms │ 797.93 / 819.76 ±21.47 / 858.25 ms │ no change │
│ QQuery 7 │ 329.67 / 333.49 ±2.90 / 338.10 ms │ 334.35 / 335.89 ±1.50 / 338.64 ms │ no change │
│ QQuery 8 │ 111.41 / 112.58 ±0.67 / 113.20 ms │ 111.21 / 111.82 ±0.46 / 112.34 ms │ no change │
│ QQuery 9 │ 101.44 / 105.03 ±1.85 / 106.52 ms │ 104.83 / 105.89 ±0.90 / 107.06 ms │ no change │
│ QQuery 10 │ 99.89 / 100.82 ±0.57 / 101.44 ms │ 102.21 / 102.79 ±0.34 / 103.27 ms │ no change │
│ QQuery 11 │ 808.04 / 816.33 ±5.45 / 824.82 ms │ 803.91 / 815.36 ±9.58 / 831.82 ms │ no change │
│ QQuery 12 │ 42.42 / 43.48 ±1.23 / 45.68 ms │ 42.26 / 42.76 ±0.46 / 43.55 ms │ no change │
│ QQuery 13 │ 385.27 / 388.10 ±1.81 / 390.00 ms │ 387.82 / 389.05 ±1.07 / 390.61 ms │ no change │
│ QQuery 14 │ 976.52 / 981.36 ±4.43 / 987.24 ms │ 976.26 / 979.56 ±3.50 / 986.33 ms │ no change │
│ QQuery 15 │ 14.62 / 14.91 ±0.24 / 15.20 ms │ 14.36 / 14.75 ±0.29 / 15.15 ms │ no change │
│ QQuery 16 │ 7.33 / 7.46 ±0.12 / 7.67 ms │ 7.20 / 7.34 ±0.15 / 7.63 ms │ no change │
│ QQuery 17 │ 219.37 / 222.28 ±2.41 / 226.23 ms │ 220.69 / 222.12 ±1.83 / 225.57 ms │ no change │
│ QQuery 18 │ 120.83 / 121.79 ±0.99 / 123.53 ms │ 123.42 / 124.56 ±1.80 / 128.12 ms │ no change │
│ QQuery 19 │ 152.78 / 154.98 ±1.56 / 157.62 ms │ 152.18 / 153.64 ±1.36 / 156.05 ms │ no change │
│ QQuery 20 │ 12.68 / 13.01 ±0.27 / 13.31 ms │ 13.08 / 13.34 ±0.30 / 13.87 ms │ no change │
│ QQuery 21 │ 18.86 / 19.15 ±0.35 / 19.79 ms │ 18.75 / 18.97 ±0.14 / 19.14 ms │ no change │
│ QQuery 22 │ 470.38 / 473.91 ±1.97 / 475.83 ms │ 475.81 / 477.75 ±1.82 / 481.18 ms │ no change │
│ QQuery 23 │ 809.58 / 817.52 ±6.52 / 824.55 ms │ 810.01 / 813.08 ±3.74 / 820.28 ms │ no change │
│ QQuery 24 │ 372.65 / 376.04 ±4.72 / 384.93 ms │ 371.81 / 375.77 ±6.55 / 388.82 ms │ no change │
│ QQuery 25 │ 332.69 / 334.81 ±1.92 / 337.19 ms │ 330.73 / 334.46 ±2.68 / 338.74 ms │ no change │
│ QQuery 26 │ 76.82 / 76.92 ±0.08 / 77.07 ms │ 77.56 / 77.90 ±0.28 / 78.26 ms │ no change │
│ QQuery 27 │ 6.95 / 8.00 ±1.96 / 11.91 ms │ 6.88 / 7.00 ±0.17 / 7.33 ms │ +1.14x faster │
│ QQuery 28 │ 148.11 / 149.07 ±0.87 / 150.70 ms │ 147.80 / 148.98 ±1.47 / 151.82 ms │ no change │
│ QQuery 29 │ 269.10 / 272.55 ±1.87 / 274.25 ms │ 268.93 / 274.06 ±6.16 / 285.92 ms │ no change │
│ QQuery 30 │ 40.48 / 41.01 ±0.60 / 42.17 ms │ 40.99 / 41.75 ±0.59 / 42.47 ms │ no change │
│ QQuery 31 │ 162.51 / 163.69 ±0.61 / 164.15 ms │ 163.77 / 165.27 ±1.40 / 167.87 ms │ no change │
│ QQuery 32 │ 13.13 / 13.41 ±0.25 / 13.86 ms │ 13.42 / 13.64 ±0.19 / 13.93 ms │ no change │
│ QQuery 33 │ 137.22 / 137.99 ±0.59 / 138.79 ms │ 138.18 / 138.80 ±0.45 / 139.40 ms │ no change │
│ QQuery 34 │ 6.86 / 7.02 ±0.20 / 7.41 ms │ 6.76 / 6.90 ±0.19 / 7.28 ms │ no change │
│ QQuery 35 │ 98.86 / 99.64 ±0.57 / 100.40 ms │ 100.80 / 103.02 ±3.12 / 109.19 ms │ no change │
│ QQuery 36 │ 6.43 / 6.55 ±0.19 / 6.93 ms │ 6.59 / 6.80 ±0.13 / 6.95 ms │ no change │
│ QQuery 37 │ 8.09 / 8.19 ±0.10 / 8.37 ms │ 8.14 / 8.29 ±0.14 / 8.55 ms │ no change │
│ QQuery 38 │ 83.64 / 85.81 ±1.33 / 87.38 ms │ 84.25 / 86.69 ±1.73 / 89.59 ms │ no change │
│ QQuery 39 │ 117.90 / 119.61 ±2.71 / 125.00 ms │ 115.72 / 118.01 ±1.67 / 120.94 ms │ no change │
│ QQuery 40 │ 105.03 / 109.07 ±2.68 / 112.48 ms │ 102.26 / 105.08 ±2.53 / 108.88 ms │ no change │
│ QQuery 41 │ 13.90 / 14.18 ±0.26 / 14.64 ms │ 13.96 / 14.19 ±0.27 / 14.73 ms │ no change │
│ QQuery 42 │ 104.85 / 105.70 ±0.57 / 106.36 ms │ 105.62 / 107.30 ±1.76 / 110.66 ms │ no change │
│ QQuery 43 │ 5.54 / 5.65 ±0.09 / 5.80 ms │ 5.67 / 5.80 ±0.12 / 6.02 ms │ no change │
│ QQuery 44 │ 11.31 / 12.83 ±2.89 / 18.61 ms │ 11.64 / 11.75 ±0.07 / 11.84 ms │ +1.09x faster │
│ QQuery 45 │ 47.73 / 48.56 ±1.07 / 50.63 ms │ 47.97 / 48.20 ±0.25 / 48.62 ms │ no change │
│ QQuery 46 │ 8.10 / 8.32 ±0.24 / 8.76 ms │ 8.29 / 9.25 ±1.49 / 12.22 ms │ 1.11x slower │
│ QQuery 47 │ 658.85 / 665.99 ±4.25 / 671.26 ms │ 664.50 / 671.45 ±4.98 / 678.82 ms │ no change │
│ QQuery 48 │ 271.92 / 273.96 ±1.40 / 276.23 ms │ 273.65 / 275.82 ±3.59 / 282.98 ms │ no change │
│ QQuery 49 │ 248.30 / 250.25 ±2.32 / 254.79 ms │ 249.28 / 251.12 ±1.51 / 253.48 ms │ no change │
│ QQuery 50 │ 200.99 / 204.27 ±3.40 / 210.83 ms │ 202.07 / 206.31 ±3.97 / 213.22 ms │ no change │
│ QQuery 51 │ 176.01 / 178.59 ±2.91 / 184.08 ms │ 175.34 / 177.85 ±1.45 / 179.75 ms │ no change │
│ QQuery 52 │ 105.80 / 106.83 ±1.21 / 109.10 ms │ 106.16 / 107.85 ±2.49 / 112.73 ms │ no change │
│ QQuery 53 │ 100.64 / 101.78 ±0.79 / 102.97 ms │ 100.32 / 100.90 ±0.54 / 101.68 ms │ no change │
│ QQuery 54 │ 141.65 / 143.35 ±1.29 / 145.47 ms │ 142.25 / 143.39 ±1.31 / 145.84 ms │ no change │
│ QQuery 55 │ 104.90 / 106.12 ±1.08 / 108.13 ms │ 104.61 / 106.16 ±1.04 / 107.77 ms │ no change │
│ QQuery 56 │ 137.33 / 138.15 ±0.79 / 139.47 ms │ 138.23 / 139.47 ±0.93 / 140.72 ms │ no change │
│ QQuery 57 │ 162.95 / 164.26 ±1.35 / 166.82 ms │ 163.67 / 165.02 ±1.40 / 167.62 ms │ no change │
│ QQuery 58 │ 308.43 / 311.33 ±2.74 / 316.55 ms │ 309.98 / 311.58 ±1.58 / 314.45 ms │ no change │
│ QQuery 59 │ 196.64 / 198.87 ±2.60 / 203.64 ms │ 195.26 / 196.84 ±0.88 / 197.54 ms │ no change │
│ QQuery 60 │ 138.70 / 140.29 ±1.45 / 142.10 ms │ 138.82 / 140.26 ±1.02 / 141.61 ms │ no change │
│ QQuery 61 │ 13.31 / 13.42 ±0.18 / 13.77 ms │ 13.37 / 13.55 ±0.13 / 13.75 ms │ no change │
│ QQuery 62 │ 854.57 / 859.29 ±6.85 / 872.41 ms │ 848.39 / 856.15 ±7.13 / 868.25 ms │ no change │
│ QQuery 63 │ 100.41 / 101.51 ±0.71 / 102.30 ms │ 100.19 / 101.40 ±0.97 / 102.90 ms │ no change │
│ QQuery 64 │ 652.17 / 656.29 ±3.15 / 661.83 ms │ 656.43 / 658.35 ±1.75 / 661.35 ms │ no change │
│ QQuery 65 │ 242.80 / 248.00 ±4.34 / 255.16 ms │ 239.54 / 242.24 ±2.33 / 246.50 ms │ no change │
│ QQuery 66 │ 214.60 / 222.00 ±7.57 / 235.58 ms │ 212.15 / 218.58 ±7.80 / 231.45 ms │ no change │
│ QQuery 67 │ 292.70 / 297.40 ±6.92 / 310.72 ms │ 288.66 / 296.38 ±8.45 / 310.20 ms │ no change │
│ QQuery 68 │ 8.54 / 8.76 ±0.29 / 9.32 ms │ 8.33 / 8.59 ±0.23 / 9.01 ms │ no change │
│ QQuery 69 │ 97.05 / 98.93 ±1.85 / 102.46 ms │ 97.75 / 99.32 ±0.89 / 100.33 ms │ no change │
│ QQuery 70 │ 311.13 / 314.44 ±4.77 / 323.45 ms │ 309.65 / 321.65 ±9.57 / 332.15 ms │ no change │
│ QQuery 71 │ 134.06 / 136.13 ±2.67 / 141.37 ms │ 131.85 / 134.39 ±3.00 / 140.11 ms │ no change │
│ QQuery 72 │ 585.27 / 594.27 ±7.58 / 603.83 ms │ 575.07 / 587.56 ±10.64 / 607.15 ms │ no change │
│ QQuery 73 │ 6.67 / 6.84 ±0.21 / 7.25 ms │ 6.59 / 6.85 ±0.22 / 7.23 ms │ no change │
│ QQuery 74 │ 509.97 / 520.85 ±8.50 / 532.59 ms │ 518.57 / 526.81 ±5.82 / 534.95 ms │ no change │
│ QQuery 75 │ 264.54 / 266.00 ±1.61 / 268.90 ms │ 264.96 / 267.92 ±2.96 / 273.48 ms │ no change │
│ QQuery 76 │ 129.07 / 129.89 ±0.70 / 131.16 ms │ 129.48 / 131.57 ±2.64 / 136.71 ms │ no change │
│ QQuery 77 │ 184.59 / 186.22 ±1.48 / 188.50 ms │ 185.40 / 186.94 ±1.26 / 188.87 ms │ no change │
│ QQuery 78 │ 327.58 / 330.39 ±2.24 / 334.07 ms │ 328.16 / 329.96 ±1.49 / 332.45 ms │ no change │
│ QQuery 79 │ 225.01 / 227.36 ±1.90 / 229.85 ms │ 224.56 / 228.28 ±3.55 / 234.50 ms │ no change │
│ QQuery 80 │ 317.13 / 319.57 ±1.73 / 321.38 ms │ 318.62 / 320.82 ±1.55 / 322.59 ms │ no change │
│ QQuery 81 │ 25.03 / 25.59 ±0.37 / 26.01 ms │ 25.21 / 25.84 ±0.58 / 26.64 ms │ no change │
│ QQuery 82 │ 38.36 / 38.83 ±0.39 / 39.42 ms │ 38.15 / 38.64 ±0.43 / 39.16 ms │ no change │
│ QQuery 83 │ 36.46 / 36.60 ±0.11 / 36.77 ms │ 36.13 / 36.33 ±0.18 / 36.56 ms │ no change │
│ QQuery 84 │ 45.23 / 45.95 ±0.89 / 47.69 ms │ 46.18 / 46.57 ±0.47 / 47.45 ms │ no change │
│ QQuery 85 │ 138.54 / 139.62 ±1.41 / 142.37 ms │ 140.09 / 141.24 ±0.63 / 141.83 ms │ no change │
│ QQuery 86 │ 36.45 / 36.88 ±0.24 / 37.16 ms │ 37.14 / 37.90 ±1.13 / 40.15 ms │ no change │
│ QQuery 87 │ 3.49 / 3.58 ±0.10 / 3.77 ms │ 3.47 / 3.55 ±0.12 / 3.79 ms │ no change │
│ QQuery 88 │ 97.99 / 98.57 ±0.41 / 99.10 ms │ 98.48 / 99.58 ±0.81 / 100.72 ms │ no change │
│ QQuery 89 │ 114.70 / 117.42 ±3.21 / 123.71 ms │ 115.57 / 117.15 ±2.16 / 121.41 ms │ no change │
│ QQuery 90 │ 21.89 / 22.45 ±0.30 / 22.77 ms │ 21.84 / 22.37 ±0.47 / 23.12 ms │ no change │
│ QQuery 91 │ 56.96 / 57.53 ±0.36 / 57.91 ms │ 58.34 / 59.10 ±0.57 / 59.93 ms │ no change │
│ QQuery 92 │ 55.26 / 55.67 ±0.35 / 56.21 ms │ 55.11 / 55.62 ±0.46 / 56.31 ms │ no change │
│ QQuery 93 │ 179.61 / 181.50 ±1.78 / 184.86 ms │ 179.66 / 180.65 ±0.87 / 182.20 ms │ no change │
│ QQuery 94 │ 59.17 / 59.79 ±0.41 / 60.39 ms │ 59.43 / 60.25 ±0.80 / 61.76 ms │ no change │
│ QQuery 95 │ 123.05 / 124.43 ±1.04 / 126.06 ms │ 124.94 / 125.30 ±0.32 / 125.85 ms │ no change │
│ QQuery 96 │ 66.24 / 67.97 ±1.58 / 70.91 ms │ 67.88 / 69.15 ±0.82 / 70.25 ms │ no change │
│ QQuery 97 │ 115.09 / 117.29 ±1.56 / 119.02 ms │ 114.99 / 116.65 ±1.48 / 118.76 ms │ no change │
│ QQuery 98 │ 148.76 / 150.18 ±0.97 / 151.31 ms │ 148.31 / 148.91 ±0.84 / 150.57 ms │ no change │
│ QQuery 99 │ 10708.86 / 10749.22 ±33.59 / 10793.07 ms │ 10657.97 / 10720.66 ±41.49 / 10764.23 ms │ no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD) │ 30087.07ms │
│ Total Time (topk_memory_batch) │ 30056.89ms │
│ Average Time (HEAD) │ 303.91ms │
│ Average Time (topk_memory_batch) │ 303.60ms │
│ Queries Faster │ 2 │
│ Queries Slower │ 1 │
│ Queries with No Change │ 96 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴────────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpcds — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 155.0s |
| Peak memory | 6.5 GiB |
| Avg memory | 5.7 GiB |
| CPU user | 251.9s |
| CPU sys | 7.9s |
| Peak spill | 0 B |
**tpcds — branch**
| Metric | Value |
|--------|-------|
| Wall time | 155.0s |
| Peak memory | 6.3 GiB |
| Avg memory | 5.6 GiB |
| CPU user | 252.0s |
| CPU sys | 7.8s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4287309002
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4287289167)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4287289167-1671-sl4vh 6.12.55+ #1 SMP Sun Feb 1 08:59:41 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (d805436dfe16663640c6038ec18d41da1d59eed3) to a737c27 (merge-base) [diff](https://github.com/apache/datafusion/compare/a737c27b775f02e88cf8183dc257f9bb3d6a9024..d805436dfe16663640c6038ec18d41da1d59eed3) using: tpcds
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417095576
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4416959715)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1 │ 6.39 / 6.83 ±0.86 / 8.55 ms │ 6.44 / 6.92 ±0.86 / 8.64 ms │ no change │
│ QQuery 2 │ 82.03 / 82.61 ±0.46 / 83.43 ms │ 82.40 / 82.80 ±0.28 / 83.27 ms │ no change │
│ QQuery 3 │ 29.07 / 29.29 ±0.17 / 29.49 ms │ 28.75 / 29.33 ±0.57 / 30.31 ms │ no change │
│ QQuery 4 │ 515.19 / 519.76 ±3.52 / 525.72 ms │ 517.15 / 521.49 ±3.63 / 528.14 ms │ no change │
│ QQuery 5 │ 52.70 / 52.97 ±0.21 / 53.22 ms │ 52.71 / 53.12 ±0.40 / 53.82 ms │ no change │
│ QQuery 6 │ 35.68 / 36.16 ±0.68 / 37.49 ms │ 35.92 / 36.39 ±0.50 / 37.04 ms │ no change │
│ QQuery 7 │ 109.79 / 110.57 ±0.54 / 111.45 ms │ 110.53 / 111.96 ±2.00 / 115.89 ms │ no change │
│ QQuery 8 │ 38.76 / 39.25 ±0.35 / 39.87 ms │ 39.49 / 39.64 ±0.11 / 39.78 ms │ no change │
│ QQuery 9 │ 53.61 / 55.49 ±1.07 / 56.89 ms │ 54.47 / 56.71 ±2.98 / 62.57 ms │ no change │
│ QQuery 10 │ 80.86 / 81.67 ±1.08 / 83.81 ms │ 81.45 / 82.43 ±1.22 / 84.65 ms │ no change │
│ QQuery 11 │ 317.37 / 320.15 ±3.38 / 325.88 ms │ 318.61 / 323.34 ±3.78 / 329.78 ms │ no change │
│ QQuery 12 │ 28.73 / 29.08 ±0.29 / 29.45 ms │ 29.30 / 29.63 ±0.18 / 29.84 ms │ no change │
│ QQuery 13 │ 128.78 / 129.45 ±0.56 / 130.36 ms │ 128.98 / 129.38 ±0.62 / 130.60 ms │ no change │
│ QQuery 14 │ 514.51 / 517.62 ±2.94 / 522.30 ms │ 516.62 / 518.87 ±1.46 / 520.49 ms │ no change │
│ QQuery 15 │ 60.74 / 61.42 ±0.58 / 62.48 ms │ 60.81 / 62.21 ±0.79 / 63.24 ms │ no change │
│ QQuery 16 │ 6.82 / 7.02 ±0.20 / 7.38 ms │ 7.11 / 7.23 ±0.16 / 7.53 ms │ no change │
│ QQuery 17 │ 84.20 / 85.09 ±1.22 / 87.50 ms │ 84.60 / 86.35 ±1.64 / 88.83 ms │ no change │
│ QQuery 18 │ 155.48 / 156.61 ±0.91 / 157.67 ms │ 156.98 / 158.00 ±1.53 / 161.03 ms │ no change │
│ QQuery 19 │ 41.31 / 41.93 ±0.43 / 42.66 ms │ 41.67 / 41.99 ±0.36 / 42.66 ms │ no change │
│ QQuery 20 │ 35.17 / 35.74 ±0.32 / 36.12 ms │ 35.59 / 35.87 ±0.33 / 36.46 ms │ no change │
│ QQuery 21 │ 18.26 / 18.36 ±0.07 / 18.47 ms │ 18.41 / 18.71 ±0.24 / 18.94 ms │ no change │
│ QQuery 22 │ 62.36 / 63.14 ±0.49 / 63.70 ms │ 62.79 / 63.67 ±0.58 / 64.43 ms │ no change │
│ QQuery 23 │ 480.83 / 489.36 ±7.31 / 501.13 ms │ 480.13 / 486.64 ±6.02 / 497.78 ms │ no change │
│ QQuery 24 │ 244.68 / 249.50 ±5.69 / 260.66 ms │ 244.54 / 246.62 ±1.73 / 249.31 ms │ no change │
│ QQuery 25 │ 118.29 / 119.56 ±1.06 / 121.20 ms │ 117.89 / 120.71 ±1.64 / 122.47 ms │ no change │
│ QQuery 26 │ 71.16 / 71.67 ±0.59 / 72.80 ms │ 71.46 / 72.22 ±0.95 / 73.87 ms │ no change │
│ QQuery 27 │ 6.96 / 7.11 ±0.17 / 7.44 ms │ 7.18 / 7.28 ±0.14 / 7.56 ms │ no change │
│ QQuery 28 │ 62.35 / 63.38 ±0.75 / 64.46 ms │ 59.40 / 62.92 ±1.89 / 65.14 ms │ no change │
│ QQuery 29 │ 102.09 / 102.80 ±0.71 / 104.09 ms │ 102.75 / 104.47 ±1.38 / 106.29 ms │ no change │
│ QQuery 30 │ FAIL │ FAIL │ incomparable │
│ QQuery 31 │ 111.75 / 113.45 ±0.95 / 114.53 ms │ 112.54 / 114.04 ±1.98 / 117.92 ms │ no change │
│ QQuery 32 │ 20.21 / 20.51 ±0.37 / 21.24 ms │ 20.38 / 20.67 ±0.27 / 21.13 ms │ no change │
│ QQuery 33 │ 38.91 / 39.32 ±0.27 / 39.73 ms │ 39.45 / 39.80 ±0.22 / 40.03 ms │ no change │
│ QQuery 34 │ 9.72 / 10.28 ±0.52 / 11.12 ms │ 9.75 / 10.07 ±0.30 / 10.45 ms │ no change │
│ QQuery 35 │ 80.83 / 82.32 ±1.50 / 84.97 ms │ 81.35 / 82.20 ±0.60 / 82.91 ms │ no change │
│ QQuery 36 │ 6.38 / 6.49 ±0.15 / 6.79 ms │ 6.52 / 6.71 ±0.24 / 7.18 ms │ no change │
│ QQuery 37 │ 7.07 / 7.29 ±0.18 / 7.55 ms │ 7.35 / 7.49 ±0.19 / 7.87 ms │ no change │
│ QQuery 38 │ 68.56 / 69.36 ±0.45 / 69.86 ms │ 68.83 / 69.40 ±0.53 / 70.26 ms │ no change │
│ QQuery 39 │ 101.03 / 101.95 ±0.63 / 102.97 ms │ 101.05 / 102.57 ±0.98 / 103.96 ms │ no change │
│ QQuery 40 │ 23.83 / 24.57 ±1.04 / 26.63 ms │ 24.00 / 24.23 ±0.19 / 24.53 ms │ no change │
│ QQuery 41 │ 13.95 / 14.09 ±0.20 / 14.48 ms │ 14.24 / 14.35 ±0.11 / 14.57 ms │ no change │
│ QQuery 42 │ 24.15 / 24.39 ±0.30 / 24.97 ms │ 24.00 / 24.36 ±0.22 / 24.69 ms │ no change │
│ QQuery 43 │ 5.34 / 5.46 ±0.19 / 5.85 ms │ 5.37 / 5.46 ±0.12 / 5.70 ms │ no change │
│ QQuery 44 │ 10.84 / 10.94 ±0.07 / 11.05 ms │ 10.90 / 11.01 ±0.07 / 11.09 ms │ no change │
│ QQuery 45 │ 40.83 / 41.32 ±0.27 / 41.55 ms │ 41.17 / 41.66 ±0.46 / 42.22 ms │ no change │
│ QQuery 46 │ 13.40 / 13.64 ±0.23 / 14.04 ms │ 13.40 / 13.67 ±0.20 / 13.91 ms │ no change │
│ QQuery 47 │ 231.32 / 233.13 ±1.29 / 234.90 ms │ 231.30 / 233.88 ±2.00 / 236.90 ms │ no change │
│ QQuery 48 │ 104.27 / 105.05 ±0.49 / 105.83 ms │ 104.30 / 105.15 ±0.88 / 106.84 ms │ no change │
│ QQuery 49 │ 81.59 / 83.29 ±1.41 / 85.58 ms │ 82.68 / 82.98 ±0.18 / 83.22 ms │ no change │
│ QQuery 50 │ 63.06 / 64.47 ±1.11 / 65.97 ms │ 62.75 / 64.55 ±1.40 / 66.54 ms │ no change │
│ QQuery 51 │ 92.56 / 95.40 ±2.09 / 98.69 ms │ 93.60 / 95.02 ±2.04 / 99.00 ms │ no change │
│ QQuery 52 │ 24.10 / 24.44 ±0.36 / 24.93 ms │ 24.38 / 24.59 ±0.16 / 24.85 ms │ no change │
│ QQuery 53 │ 30.46 / 30.72 ±0.26 / 31.15 ms │ 30.54 / 31.34 ±1.37 / 34.07 ms │ no change │
│ QQuery 54 │ 55.03 / 56.69 ±1.66 / 59.61 ms │ 54.99 / 55.95 ±0.74 / 57.12 ms │ no change │
│ QQuery 55 │ 23.74 / 24.04 ±0.27 / 24.52 ms │ 23.59 / 24.08 ±0.40 / 24.56 ms │ no change │
│ QQuery 56 │ 39.63 / 40.12 ±0.28 / 40.44 ms │ 39.72 / 40.04 ±0.24 / 40.40 ms │ no change │
│ QQuery 57 │ 178.89 / 181.50 ±2.39 / 185.73 ms │ 179.00 / 180.59 ±1.47 / 182.46 ms │ no change │
│ QQuery 58 │ 117.99 / 118.79 ±0.52 / 119.56 ms │ 118.35 / 118.98 ±0.37 / 119.46 ms │ no change │
│ QQuery 59 │ 119.50 / 120.69 ±0.93 / 122.24 ms │ 119.77 / 120.20 ±0.41 / 120.87 ms │ no change │
│ QQuery 60 │ 39.94 / 40.38 ±0.32 / 40.86 ms │ 39.88 / 40.27 ±0.31 / 40.60 ms │ no change │
│ QQuery 61 │ 13.70 / 13.81 ±0.18 / 14.18 ms │ 13.86 / 14.29 ±0.45 / 15.15 ms │ no change │
│ QQuery 62 │ 47.52 / 48.76 ±1.37 / 51.33 ms │ 47.68 / 48.04 ±0.59 / 49.22 ms │ no change │
│ QQuery 63 │ 30.29 / 30.79 ±0.30 / 31.15 ms │ 30.49 / 30.65 ±0.13 / 30.80 ms │ no change │
│ QQuery 64 │ 479.52 / 484.97 ±3.02 / 488.65 ms │ 482.40 / 483.48 ±0.96 / 484.94 ms │ no change │
│ QQuery 65 │ 145.18 / 149.02 ±2.95 / 152.42 ms │ 145.46 / 149.22 ±3.00 / 153.33 ms │ no change │
│ QQuery 66 │ 83.55 / 84.04 ±0.63 / 85.27 ms │ 84.05 / 84.46 ±0.45 / 85.23 ms │ no change │
│ QQuery 67 │ 247.58 / 253.94 ±4.47 / 260.50 ms │ 248.50 / 252.24 ±2.71 / 256.42 ms │ no change │
│ QQuery 68 │ 13.77 / 13.93 ±0.22 / 14.36 ms │ 13.86 / 15.45 ±2.11 / 19.60 ms │ 1.11x slower │
│ QQuery 69 │ 76.59 / 77.05 ±0.28 / 77.44 ms │ 77.18 / 77.46 ±0.21 / 77.80 ms │ no change │
│ QQuery 70 │ 104.48 / 110.04 ±5.93 / 121.27 ms │ 108.18 / 112.01 ±5.28 / 122.36 ms │ no change │
│ QQuery 71 │ 35.81 / 36.14 ±0.37 / 36.79 ms │ 35.82 / 36.17 ±0.25 / 36.41 ms │ no change │
│ QQuery 72 │ 2259.88 / 2278.99 ±17.89 / 2309.43 ms │ 2172.27 / 2243.60 ±47.09 / 2286.23 ms │ no change │
│ QQuery 73 │ 9.77 / 10.04 ±0.19 / 10.25 ms │ 9.57 / 9.84 ±0.19 / 10.13 ms │ no change │
│ QQuery 74 │ 182.89 / 187.72 ±4.30 / 194.38 ms │ 179.48 / 183.74 ±2.67 / 186.74 ms │ no change │
│ QQuery 75 │ 150.82 / 153.39 ±3.31 / 159.60 ms │ 150.47 / 152.93 ±2.42 / 157.37 ms │ no change │
│ QQuery 76 │ 35.94 / 36.31 ±0.28 / 36.73 ms │ 35.99 / 36.27 ±0.25 / 36.74 ms │ no change │
│ QQuery 77 │ 62.86 / 63.06 ±0.12 / 63.22 ms │ 62.13 / 62.76 ±0.38 / 63.26 ms │ no change │
│ QQuery 78 │ 194.78 / 197.86 ±3.04 / 201.67 ms │ 193.77 / 195.90 ±1.84 / 198.47 ms │ no change │
│ QQuery 79 │ 67.50 / 69.22 ±1.42 / 71.19 ms │ 67.47 / 68.58 ±1.72 / 72.00 ms │ no change │
│ QQuery 80 │ 105.18 / 106.27 ±1.28 / 108.67 ms │ 104.47 / 106.30 ±1.85 / 109.77 ms │ no change │
│ QQuery 81 │ 24.63 / 24.78 ±0.11 / 24.96 ms │ 24.56 / 24.80 ±0.22 / 25.22 ms │ no change │
│ QQuery 82 │ 16.89 / 17.12 ±0.16 / 17.28 ms │ 16.84 / 16.94 ±0.08 / 17.09 ms │ no change │
│ QQuery 83 │ 37.70 / 38.96 ±1.98 / 42.90 ms │ 37.94 / 38.74 ±1.09 / 40.90 ms │ no change │
│ QQuery 84 │ 43.37 / 44.02 ±0.60 / 45.10 ms │ 43.43 / 44.02 ±0.49 / 44.79 ms │ no change │
│ QQuery 85 │ 137.67 / 138.29 ±0.47 / 138.90 ms │ 138.83 / 139.46 ±0.53 / 140.16 ms │ no change │
│ QQuery 86 │ 25.06 / 25.68 ±0.65 / 26.87 ms │ 25.68 / 25.90 ±0.15 / 26.08 ms │ no change │
│ QQuery 87 │ 69.30 / 69.70 ±0.24 / 69.98 ms │ 69.05 / 69.68 ±0.46 / 70.26 ms │ no change │
│ QQuery 88 │ 64.69 / 65.59 ±0.51 / 66.21 ms │ 65.43 / 65.83 ±0.26 / 66.11 ms │ no change │
│ QQuery 89 │ 36.54 / 37.03 ±0.71 / 38.42 ms │ 36.46 / 36.66 ±0.18 / 37.00 ms │ no change │
│ QQuery 90 │ 17.63 / 17.91 ±0.27 / 18.42 ms │ 17.76 / 17.88 ±0.14 / 18.15 ms │ no change │
│ QQuery 91 │ 52.38 / 53.76 ±1.76 / 57.22 ms │ 51.50 / 52.85 ±1.02 / 54.34 ms │ no change │
│ QQuery 92 │ 29.94 / 30.38 ±0.25 / 30.72 ms │ 29.18 / 29.97 ±0.44 / 30.38 ms │ no change │
│ QQuery 93 │ 53.99 / 54.75 ±0.72 / 55.93 ms │ 53.01 / 54.07 ±1.11 / 56.07 ms │ no change │
│ QQuery 94 │ 38.43 / 38.80 ±0.38 / 39.48 ms │ 38.51 / 39.22 ±0.52 / 39.87 ms │ no change │
│ QQuery 95 │ 90.74 / 92.52 ±1.19 / 93.98 ms │ 91.36 / 92.24 ±0.84 / 93.73 ms │ no change │
│ QQuery 96 │ 24.38 / 24.64 ±0.28 / 25.16 ms │ 24.19 / 24.51 ±0.33 / 25.14 ms │ no change │
│ QQuery 97 │ 46.25 / 46.95 ±0.39 / 47.31 ms │ 46.83 / 47.28 ±0.29 / 47.63 ms │ no change │
│ QQuery 98 │ 42.63 / 43.32 ±0.38 / 43.74 ms │ 42.39 / 43.18 ±0.94 / 44.86 ms │ no change │
│ QQuery 99 │ 71.27 / 71.83 ±0.40 / 72.32 ms │ 71.37 / 72.26 ±0.84 / 73.76 ms │ no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD) │ 10729.08ms │
│ Total Time (topk_memory_batch) │ 10701.14ms │
│ Average Time (HEAD) │ 109.48ms │
│ Average Time (topk_memory_batch) │ 109.20ms │
│ Queries Faster │ 0 │
│ Queries Slower │ 1 │
│ Queries with No Change │ 97 │
│ Queries with Failure │ 1 │
└──────────────────────────────────┴────────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpcds — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 55.0s |
| Peak memory | 7.0 GiB |
| Avg memory | 6.2 GiB |
| CPU user | 247.9s |
| CPU sys | 6.4s |
| Peak spill | 0 B |
**tpcds — branch**
| Metric | Value |
|--------|-------|
| Wall time | 55.0s |
| Peak memory | 6.9 GiB |
| Avg memory | 6.2 GiB |
| CPU user | 246.0s |
| CPU sys | 6.4s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4454759423
Benchmark for [this request](https://github.com/apache/datafusion/pull/20381#issuecomment-4453890106) hit the 7200s job deadline before finishing.
Benchmarks requested: `tpcds`
<details><summary>Kubernetes message</summary>
```
Job was active longer than specified deadline
```
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4448041895
run benchmarks
```yaml
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: '4G'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4416959715
run benchmarks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417626612
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4417615444)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4417615444-6-d52wm 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (dff9381e798c8d038ed391b6471ff21e0f6c3227) to 8741a77 (merge-base) [diff](https://github.com/apache/datafusion/compare/8741a7752c02f278394e9de1977da6d18f563f6d..dff9381e798c8d038ed391b6471ff21e0f6c3227) using: tpch
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "bharath-techie (via GitHub)" <gi...@apache.org>.
bharath-techie commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4287197187
Hi @cetra3 ,
Can you address the remaining comments and take the PR forward ? This fix is quite useful for TopK queries
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453872590
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453838362)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4453838362-100-mwdll 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) to 7f2f78d (merge-base) [diff](https://github.com/apache/datafusion/compare/7f2f78d48b6d3d6aee2ce2fd29910bb4c11b1012..1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) using: tpch
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4448130986
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4448041895)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4448041895-70-wj6l6 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) to 7f2f78d (merge-base) [diff](https://github.com/apache/datafusion/compare/7f2f78d48b6d3d6aee2ce2fd29910bb4c11b1012..1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) using: tpch
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4287309769
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4287289167)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4287289167-1672-ltlbn 6.12.55+ #1 SMP Sun Feb 1 08:59:41 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (d805436dfe16663640c6038ec18d41da1d59eed3) to a737c27 (merge-base) [diff](https://github.com/apache/datafusion/compare/a737c27b775f02e88cf8183dc257f9bb3d6a9024..d805436dfe16663640c6038ec18d41da1d59eed3) using: tpch
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "bharath-techie (via GitHub)" <gi...@apache.org>.
bharath-techie commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4414819087
@adriangb @Dandandan @alamb @kosiew sorry for the spam, this PR helps a lot in `group by + top k` kind of queries - can somebody please review and push the PR forward ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4448120265
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4448041895)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4448041895-69-lmszw 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) to 7f2f78d (merge-base) [diff](https://github.com/apache/datafusion/compare/7f2f78d48b6d3d6aee2ce2fd29910bb4c11b1012..1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) using: tpcds
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453959687
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453838362)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1 │ 39.00 / 40.23 ±1.17 / 41.63 ms │ 39.01 / 40.06 ±0.93 / 41.63 ms │ no change │
│ QQuery 2 │ 20.61 / 20.86 ±0.16 / 21.05 ms │ 20.66 / 20.93 ±0.22 / 21.29 ms │ no change │
│ QQuery 3 │ 35.57 / 37.30 ±1.40 / 39.23 ms │ 35.42 / 37.20 ±1.45 / 39.00 ms │ no change │
│ QQuery 4 │ 17.45 / 17.90 ±0.50 / 18.85 ms │ 17.47 / 17.95 ±0.59 / 19.12 ms │ no change │
│ QQuery 5 │ 43.37 / 45.27 ±1.32 / 46.66 ms │ 43.13 / 45.18 ±1.57 / 47.63 ms │ no change │
│ QQuery 6 │ 16.64 / 17.13 ±0.84 / 18.80 ms │ 16.77 / 17.23 ±0.66 / 18.54 ms │ no change │
│ QQuery 7 │ 51.79 / 52.79 ±0.77 / 54.05 ms │ 49.20 / 51.59 ±1.88 / 53.40 ms │ no change │
│ QQuery 8 │ 45.94 / 46.39 ±0.24 / 46.60 ms │ 45.96 / 46.25 ±0.23 / 46.65 ms │ no change │
│ QQuery 9 │ 51.30 / 51.95 ±0.66 / 53.00 ms │ 51.43 / 51.86 ±0.57 / 52.93 ms │ no change │
│ QQuery 10 │ 64.48 / 65.08 ±0.68 / 66.37 ms │ 64.37 / 65.32 ±1.09 / 67.36 ms │ no change │
│ QQuery 11 │ 13.88 / 14.44 ±0.59 / 15.30 ms │ 13.80 / 14.18 ±0.51 / 15.15 ms │ no change │
│ QQuery 12 │ 25.33 / 26.04 ±0.84 / 27.66 ms │ 25.34 / 25.76 ±0.26 / 26.03 ms │ no change │
│ QQuery 13 │ 34.76 / 36.47 ±0.97 / 37.77 ms │ 36.16 / 36.80 ±0.71 / 38.17 ms │ no change │
│ QQuery 14 │ 26.03 / 26.27 ±0.14 / 26.45 ms │ 26.35 / 27.30 ±1.25 / 29.63 ms │ no change │
│ QQuery 15 │ 31.91 / 32.46 ±0.85 / 34.15 ms │ 32.09 / 32.36 ±0.45 / 33.27 ms │ no change │
│ QQuery 16 │ 15.43 / 15.60 ±0.21 / 16.01 ms │ 15.19 / 15.39 ±0.11 / 15.54 ms │ no change │
│ QQuery 17 │ 76.17 / 77.27 ±0.80 / 78.29 ms │ 75.66 / 77.01 ±0.86 / 78.21 ms │ no change │
│ QQuery 18 │ 69.05 / 70.94 ±1.24 / 72.95 ms │ 69.93 / 70.42 ±0.52 / 71.21 ms │ no change │
│ QQuery 19 │ 36.06 / 36.16 ±0.08 / 36.28 ms │ 36.41 / 37.72 ±0.93 / 39.00 ms │ no change │
│ QQuery 20 │ 38.55 / 39.36 ±1.00 / 41.28 ms │ 38.72 / 39.12 ±0.33 / 39.64 ms │ no change │
│ QQuery 21 │ 57.70 / 59.61 ±1.04 / 60.81 ms │ 60.43 / 61.24 ±0.67 / 62.05 ms │ no change │
│ QQuery 22 │ 23.67 / 23.89 ±0.12 / 24.03 ms │ 23.71 / 23.86 ±0.10 / 23.99 ms │ no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD) │ 853.40ms │
│ Total Time (topk_memory_batch) │ 854.74ms │
│ Average Time (HEAD) │ 38.79ms │
│ Average Time (topk_memory_batch) │ 38.85ms │
│ Queries Faster │ 0 │
│ Queries Slower │ 0 │
│ Queries with No Change │ 22 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴──────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpch — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.5 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 31.4s |
| CPU sys | 2.3s |
| Peak spill | 0 B |
**tpch — branch**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.5 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 31.5s |
| CPU sys | 2.3s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453911476
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453890106)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4453890106-103-mpd92 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) to 7f2f78d (merge-base) [diff](https://github.com/apache/datafusion/compare/7f2f78d48b6d3d6aee2ce2fd29910bb4c11b1012..1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) using: tpch
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4288053798
Benchmark for [this request](https://github.com/apache/datafusion/pull/20381#issuecomment-4287289167) hit the 7200s job deadline before finishing.
Benchmarks requested: `tpch`
<details><summary>Kubernetes message</summary>
```
Job was active longer than specified deadline
```
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "bharath-techie (via GitHub)" <gi...@apache.org>.
bharath-techie commented on code in PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#discussion_r3117617504
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -790,16 +787,20 @@ impl TopKHeap {
/// Compact this heap, rewriting all stored batches into a single
/// input batch
pub fn maybe_compact(&mut self) -> Result<()> {
- // we compact if the number of "unused" rows in the store is
- // past some pre-defined threshold. Target holding up to
- // around 20 batches, but handle cases of large k where some
- // batches might be partially full
- let max_unused_rows = (20 * self.batch_size) + self.k;
- let unused_rows = self.store.unused_rows();
-
- // don't compact if the store has one extra batch or
- // unused rows is under the threshold
- if self.store.len() <= 2 || unused_rows < max_unused_rows {
+ // Don't compact if there's only one batch (compacting into itself is pointless)
+ if self.store.len() <= 1 {
+ return Ok(());
+ }
+
+ let total_rows = self.store.total_rows;
+
+ let avg_bytes_per_row = self.store.batches_size / total_rows.max(1); // .max(1) prevents div by zero
+ let compacted_estimate = avg_bytes_per_row * self.inner.len();
+
+ // Compact when current store memory exceeds 2x what the compacted
+ // result would need. The multiplier avoids compacting when the
+ // savings would be marginal.
+ if self.store.batches_size <= compacted_estimate * 2 {
return Ok(());
Review Comment:
This looks good to me , @Dandandan @kosiew folks do you see any concerns ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417626603
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4417615444)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4417615444-5-p6htq 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (dff9381e798c8d038ed391b6471ff21e0f6c3227) to 8741a77 (merge-base) [diff](https://github.com/apache/datafusion/compare/8741a7752c02f278394e9de1977da6d18f563f6d..dff9381e798c8d038ed391b6471ff21e0f6c3227) using: tpcds
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453866480
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453838362)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4453838362-98-5ddqh 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) to 7f2f78d (merge-base) [diff](https://github.com/apache/datafusion/compare/7f2f78d48b6d3d6aee2ce2fd29910bb4c11b1012..1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) using: clickbench_partitioned
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4454175742
Yes and we probably need to put a memory limit in to see any difference. I kicked off 4G limit but they timed out. 12G ClickBench is still running, we may or may not see a difference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4287308600
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4287289167)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4287289167-1670-hckmt 6.12.55+ #1 SMP Sun Feb 1 08:59:41 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (d805436dfe16663640c6038ec18d41da1d59eed3) to a737c27 (merge-base) [diff](https://github.com/apache/datafusion/compare/a737c27b775f02e88cf8183dc257f9bb3d6a9024..d805436dfe16663640c6038ec18d41da1d59eed3) using: clickbench_partitioned
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "cetra3 (via GitHub)" <gi...@apache.org>.
cetra3 commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4288079804
@bharath-techie I had replied to a comment about simplifying this further:
> Actually simplifying this down, we get:
>
> batches_size <= (batches_size / total_rows) * inner_len * 2
>
> // Multiply both sides by total_rows:
>
> batches_size * total_rows <= batches_size * inner_len * 2
>
> // Divide both sides by batches_size:
>
> total_rows <= inner_len * 2
>
> So the batches size actually just cancels out. In light of this let me know if it's still something we want to pursue. I still see some perf gains with this strategy.
If you're OK with this I will do the change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-3912907893
run benchmarks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#discussion_r2888883831
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -790,16 +787,20 @@ impl TopKHeap {
/// Compact this heap, rewriting all stored batches into a single
/// input batch
pub fn maybe_compact(&mut self) -> Result<()> {
- // we compact if the number of "unused" rows in the store is
- // past some pre-defined threshold. Target holding up to
- // around 20 batches, but handle cases of large k where some
- // batches might be partially full
- let max_unused_rows = (20 * self.batch_size) + self.k;
- let unused_rows = self.store.unused_rows();
-
- // don't compact if the store has one extra batch or
- // unused rows is under the threshold
- if self.store.len() <= 2 || unused_rows < max_unused_rows {
+ // Don't compact if there's only one batch (compacting into itself is pointless)
+ if self.store.len() <= 1 {
+ return Ok(());
+ }
+
+ let total_rows = self.store.total_rows;
+
+ let avg_bytes_per_row = self.store.batches_size / total_rows.max(1); // .max(1) prevents div by zero
+ let compacted_estimate = avg_bytes_per_row * self.inner.len();
+
+ // Compact when current store memory exceeds 2x what the compacted
+ // result would need. The multiplier avoids compacting when the
+ // savings would be marginal.
+ if self.store.batches_size <= compacted_estimate * 2 {
return Ok(());
Review Comment:
Could we simplify and avoid truncation (from integer division)?
Also add a boolean-column regression test that verifies we *don’t* compact every time when savings are marginal.
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -1254,4 +1256,85 @@ mod tests {
Ok(())
}
+
+ /// Tests that memory-based compaction triggers when a large batch
+ /// has very few rows referenced by the top-k heap.
+ #[tokio::test]
+ async fn test_topk_memory_compaction() -> Result<()> {
Review Comment:
Can we also add a negative-path test (multiple batches, low expected savings) to pin down aggressiveness?
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -1056,6 +1053,11 @@ impl RecordBatchStore {
.batches_size
.checked_sub(get_record_batch_memory_size(&old_entry.batch))
.unwrap();
+
+ self.total_rows = self
+ .total_rows
+ .checked_sub(old_entry.batch.num_rows())
+ .unwrap_or_default();
Review Comment:
This belongs with the existing strict invariant checks (`checked_sub(...).unwrap()` used for `batches_size`).
Prefer `expect("total_rows underflow")` (or `unwrap`) to fail fast.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4287423108
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4287289167)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0 │ 1.20 / 4.68 ±6.83 / 18.33 ms │ 1.18 / 4.67 ±6.84 / 18.35 ms │ no change │
│ QQuery 1 │ 13.45 / 13.71 ±0.14 / 13.82 ms │ 13.07 / 13.39 ±0.25 / 13.71 ms │ no change │
│ QQuery 2 │ 37.98 / 38.21 ±0.24 / 38.63 ms │ 37.22 / 37.43 ±0.27 / 37.95 ms │ no change │
│ QQuery 3 │ 32.03 / 33.51 ±0.88 / 34.44 ms │ 31.50 / 31.99 ±0.37 / 32.60 ms │ no change │
│ QQuery 4 │ 245.40 / 251.17 ±4.06 / 255.14 ms │ 245.26 / 250.02 ±3.24 / 254.92 ms │ no change │
│ QQuery 5 │ 288.81 / 290.46 ±1.65 / 293.31 ms │ 285.56 / 287.54 ±1.41 / 289.73 ms │ no change │
│ QQuery 6 │ 6.32 / 6.93 ±0.48 / 7.80 ms │ 6.41 / 8.29 ±2.50 / 13.24 ms │ 1.20x slower │
│ QQuery 7 │ 14.21 / 14.42 ±0.12 / 14.58 ms │ 14.88 / 14.99 ±0.09 / 15.15 ms │ no change │
│ QQuery 8 │ 334.02 / 336.25 ±2.30 / 340.68 ms │ 331.80 / 335.82 ±2.42 / 338.81 ms │ no change │
│ QQuery 9 │ 493.88 / 515.07 ±12.38 / 529.64 ms │ 488.48 / 512.25 ±12.82 / 526.80 ms │ no change │
│ QQuery 10 │ 75.08 / 75.83 ±0.58 / 76.80 ms │ 76.60 / 77.58 ±0.57 / 78.29 ms │ no change │
│ QQuery 11 │ 86.24 / 87.73 ±0.81 / 88.64 ms │ 89.16 / 89.71 ±0.49 / 90.57 ms │ no change │
│ QQuery 12 │ 276.42 / 281.02 ±3.91 / 285.80 ms │ 277.85 / 281.73 ±2.86 / 284.58 ms │ no change │
│ QQuery 13 │ 401.81 / 411.76 ±5.68 / 417.92 ms │ 404.22 / 412.13 ±8.42 / 428.18 ms │ no change │
│ QQuery 14 │ 289.45 / 292.28 ±3.09 / 297.24 ms │ 289.96 / 293.76 ±4.41 / 302.19 ms │ no change │
│ QQuery 15 │ 287.86 / 293.33 ±4.55 / 299.99 ms │ 285.82 / 290.60 ±3.43 / 295.62 ms │ no change │
│ QQuery 16 │ 627.80 / 639.81 ±8.51 / 647.28 ms │ 629.02 / 633.89 ±2.95 / 637.83 ms │ no change │
│ QQuery 17 │ 639.02 / 643.91 ±4.01 / 650.04 ms │ 636.55 / 641.04 ±2.35 / 642.77 ms │ no change │
│ QQuery 18 │ 1271.99 / 1282.02 ±6.34 / 1289.41 ms │ 1266.59 / 1292.01 ±19.64 / 1320.19 ms │ no change │
│ QQuery 19 │ 28.99 / 32.65 ±6.73 / 46.10 ms │ 28.88 / 31.11 ±2.69 / 35.99 ms │ no change │
│ QQuery 20 │ 521.45 / 529.49 ±9.65 / 541.97 ms │ 521.10 / 528.90 ±6.33 / 538.16 ms │ no change │
│ QQuery 21 │ 603.53 / 606.98 ±2.81 / 610.34 ms │ 601.12 / 607.76 ±6.55 / 619.42 ms │ no change │
│ QQuery 22 │ 1069.89 / 1077.40 ±6.64 / 1085.79 ms │ 1059.86 / 1072.67 ±9.54 / 1086.84 ms │ no change │
│ QQuery 23 │ 3346.48 / 3381.68 ±26.29 / 3409.46 ms │ 3355.58 / 3393.76 ±25.52 / 3421.01 ms │ no change │
│ QQuery 24 │ 41.90 / 42.86 ±0.54 / 43.57 ms │ 42.56 / 45.88 ±4.87 / 55.47 ms │ 1.07x slower │
│ QQuery 25 │ 114.55 / 120.33 ±8.31 / 136.81 ms │ 114.12 / 114.83 ±0.49 / 115.65 ms │ no change │
│ QQuery 26 │ 42.89 / 43.74 ±1.21 / 46.11 ms │ 42.42 / 43.43 ±0.77 / 44.34 ms │ no change │
│ QQuery 27 │ 670.12 / 681.88 ±7.70 / 693.76 ms │ 673.13 / 679.48 ±6.30 / 689.21 ms │ no change │
│ QQuery 28 │ 3013.79 / 3039.00 ±16.21 / 3064.20 ms │ 3016.93 / 3039.83 ±12.83 / 3055.84 ms │ no change │
│ QQuery 29 │ 42.77 / 50.54 ±14.62 / 79.78 ms │ 42.78 / 49.55 ±6.87 / 59.24 ms │ no change │
│ QQuery 30 │ 310.08 / 314.37 ±2.77 / 318.25 ms │ 310.86 / 317.17 ±3.36 / 319.75 ms │ no change │
│ QQuery 31 │ 301.15 / 320.77 ±10.55 / 331.07 ms │ 303.64 / 312.58 ±6.15 / 320.58 ms │ no change │
│ QQuery 32 │ 1024.98 / 1040.33 ±16.84 / 1071.47 ms │ 1016.97 / 1037.67 ±25.71 / 1087.33 ms │ no change │
│ QQuery 33 │ 1477.56 / 1495.75 ±18.66 / 1527.77 ms │ 1417.88 / 1443.55 ±15.00 / 1461.36 ms │ no change │
│ QQuery 34 │ 1466.76 / 1496.44 ±29.09 / 1548.15 ms │ 1429.60 / 1452.09 ±16.86 / 1479.48 ms │ no change │
│ QQuery 35 │ 296.75 / 300.52 ±5.20 / 310.73 ms │ 286.10 / 312.09 ±22.28 / 345.52 ms │ no change │
│ QQuery 36 │ 64.93 / 71.58 ±6.37 / 82.41 ms │ 62.04 / 64.38 ±1.48 / 66.48 ms │ +1.11x faster │
│ QQuery 37 │ 36.22 / 40.33 ±4.96 / 48.83 ms │ 35.55 / 40.29 ±6.23 / 51.46 ms │ no change │
│ QQuery 38 │ 41.42 / 46.82 ±5.93 / 58.37 ms │ 40.19 / 42.46 ±1.83 / 45.06 ms │ +1.10x faster │
│ QQuery 39 │ 126.60 / 136.54 ±7.29 / 145.64 ms │ 132.89 / 139.58 ±5.06 / 148.50 ms │ no change │
│ QQuery 40 │ 15.04 / 15.70 ±1.15 / 17.99 ms │ 14.78 / 15.48 ±1.05 / 17.57 ms │ no change │
│ QQuery 41 │ 14.44 / 16.00 ±2.76 / 21.50 ms │ 13.70 / 17.81 ±4.64 / 24.80 ms │ 1.11x slower │
│ QQuery 42 │ 14.18 / 15.25 ±2.03 / 19.31 ms │ 13.04 / 13.37 ±0.26 / 13.72 ms │ +1.14x faster │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD) │ 20429.02ms │
│ Total Time (topk_memory_batch) │ 20324.55ms │
│ Average Time (HEAD) │ 475.09ms │
│ Average Time (topk_memory_batch) │ 472.66ms │
│ Queries Faster │ 3 │
│ Queries Slower │ 3 │
│ Queries with No Change │ 37 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴────────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**clickbench_partitioned — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 105.0s |
| Peak memory | 30.6 GiB |
| Avg memory | 23.4 GiB |
| CPU user | 1080.0s |
| CPU sys | 65.5s |
| Peak spill | 0 B |
**clickbench_partitioned — branch**
| Metric | Value |
|--------|-------|
| Wall time | 105.0s |
| Peak memory | 30.6 GiB |
| Avg memory | 23.3 GiB |
| CPU user | 1076.6s |
| CPU sys | 64.9s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417673592
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4417615444)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1 │ 6.43 / 6.97 ±0.93 / 8.82 ms │ 6.18 / 6.73 ±0.85 / 8.43 ms │ no change │
│ QQuery 2 │ 83.79 / 84.09 ±0.29 / 84.44 ms │ 81.99 / 82.88 ±0.47 / 83.24 ms │ no change │
│ QQuery 3 │ 29.93 / 30.38 ±0.35 / 30.99 ms │ 29.43 / 29.75 ±0.22 / 30.07 ms │ no change │
│ QQuery 4 │ 545.81 / 556.56 ±9.02 / 569.12 ms │ 540.83 / 550.57 ±6.62 / 559.09 ms │ no change │
│ QQuery 5 │ 52.95 / 53.69 ±0.63 / 54.57 ms │ 52.62 / 53.42 ±0.63 / 54.47 ms │ no change │
│ QQuery 6 │ 36.11 / 36.94 ±0.68 / 37.97 ms │ 36.37 / 37.06 ±0.36 / 37.35 ms │ no change │
│ QQuery 7 │ 111.70 / 113.79 ±2.39 / 118.44 ms │ 112.35 / 115.28 ±2.12 / 118.99 ms │ no change │
│ QQuery 8 │ 39.62 / 40.06 ±0.28 / 40.42 ms │ 39.82 / 40.25 ±0.36 / 40.83 ms │ no change │
│ QQuery 9 │ 54.15 / 55.86 ±0.91 / 56.86 ms │ 51.90 / 54.76 ±1.63 / 56.74 ms │ no change │
│ QQuery 10 │ 83.19 / 84.16 ±1.56 / 87.27 ms │ 82.20 / 83.69 ±2.05 / 87.76 ms │ no change │
│ QQuery 11 │ 342.16 / 350.29 ±4.50 / 354.86 ms │ 338.59 / 346.66 ±4.26 / 350.80 ms │ no change │
│ QQuery 12 │ 29.58 / 29.70 ±0.08 / 29.79 ms │ 29.76 / 30.45 ±1.03 / 32.49 ms │ no change │
│ QQuery 13 │ 131.83 / 132.51 ±0.50 / 133.39 ms │ 129.58 / 131.50 ±1.79 / 133.72 ms │ no change │
│ QQuery 14 │ 523.71 / 528.51 ±3.41 / 534.21 ms │ 520.22 / 523.69 ±2.89 / 528.79 ms │ no change │
│ QQuery 15 │ 62.53 / 63.17 ±0.47 / 63.99 ms │ 64.79 / 65.62 ±0.89 / 67.32 ms │ no change │
│ QQuery 16 │ 7.07 / 7.31 ±0.23 / 7.69 ms │ 6.88 / 7.18 ±0.23 / 7.46 ms │ no change │
│ QQuery 17 │ 85.81 / 87.83 ±1.97 / 90.58 ms │ 85.26 / 86.11 ±1.00 / 87.87 ms │ no change │
│ QQuery 18 │ 158.08 / 160.03 ±1.57 / 162.42 ms │ 158.51 / 159.28 ±0.93 / 160.79 ms │ no change │
│ QQuery 19 │ 42.24 / 42.78 ±0.51 / 43.62 ms │ 42.16 / 42.70 ±0.53 / 43.58 ms │ no change │
│ QQuery 20 │ 36.43 / 37.06 ±0.36 / 37.37 ms │ 36.08 / 36.52 ±0.50 / 37.20 ms │ no change │
│ QQuery 21 │ 18.48 / 19.14 ±0.34 / 19.45 ms │ 18.35 / 18.70 ±0.24 / 19.01 ms │ no change │
│ QQuery 22 │ 63.74 / 64.35 ±0.45 / 64.82 ms │ 63.89 / 65.07 ±1.36 / 67.64 ms │ no change │
│ QQuery 23 │ 502.69 / 507.57 ±4.30 / 515.61 ms │ 490.85 / 499.80 ±6.04 / 507.31 ms │ no change │
│ QQuery 24 │ 250.04 / 252.45 ±2.82 / 257.68 ms │ 249.07 / 253.34 ±3.79 / 260.28 ms │ no change │
│ QQuery 25 │ 118.78 / 121.67 ±2.11 / 124.42 ms │ 123.17 / 125.16 ±1.36 / 127.22 ms │ no change │
│ QQuery 26 │ 72.72 / 73.76 ±1.21 / 76.04 ms │ 72.64 / 73.51 ±0.96 / 75.35 ms │ no change │
│ QQuery 27 │ 7.49 / 7.64 ±0.13 / 7.84 ms │ 7.03 / 7.23 ±0.18 / 7.56 ms │ +1.06x faster │
│ QQuery 28 │ 64.71 / 65.27 ±0.43 / 65.92 ms │ 59.77 / 60.86 ±1.26 / 63.24 ms │ +1.07x faster │
│ QQuery 29 │ 104.04 / 106.45 ±1.48 / 108.08 ms │ 104.51 / 107.58 ±2.08 / 110.95 ms │ no change │
│ QQuery 30 │ FAIL │ FAIL │ incomparable │
│ QQuery 31 │ 113.42 / 115.22 ±1.30 / 116.90 ms │ 114.36 / 115.11 ±0.74 / 116.51 ms │ no change │
│ QQuery 32 │ 21.27 / 21.64 ±0.26 / 22.07 ms │ 20.93 / 21.80 ±0.68 / 22.60 ms │ no change │
│ QQuery 33 │ 40.43 / 40.57 ±0.11 / 40.69 ms │ 39.59 / 40.32 ±0.57 / 41.09 ms │ no change │
│ QQuery 34 │ 10.41 / 11.75 ±1.47 / 14.61 ms │ 10.71 / 11.35 ±0.82 / 12.90 ms │ no change │
│ QQuery 35 │ 82.75 / 83.37 ±0.59 / 84.37 ms │ 81.40 / 81.96 ±0.49 / 82.72 ms │ no change │
│ QQuery 36 │ 6.48 / 6.64 ±0.20 / 7.00 ms │ 6.36 / 6.48 ±0.15 / 6.76 ms │ no change │
│ QQuery 37 │ 7.23 / 7.40 ±0.16 / 7.64 ms │ 7.27 / 7.71 ±0.39 / 8.34 ms │ no change │
│ QQuery 38 │ 70.27 / 72.50 ±1.94 / 75.19 ms │ 70.01 / 71.62 ±1.24 / 73.72 ms │ no change │
│ QQuery 39 │ 102.00 / 106.47 ±2.41 / 109.20 ms │ 103.30 / 104.64 ±1.05 / 106.17 ms │ no change │
│ QQuery 40 │ 24.24 / 24.93 ±0.45 / 25.66 ms │ 24.29 / 25.10 ±0.49 / 25.81 ms │ no change │
│ QQuery 41 │ 14.76 / 14.93 ±0.12 / 15.06 ms │ 14.42 / 14.69 ±0.18 / 14.89 ms │ no change │
│ QQuery 42 │ 25.05 / 25.29 ±0.15 / 25.52 ms │ 25.03 / 25.31 ±0.22 / 25.55 ms │ no change │
│ QQuery 43 │ 5.50 / 5.65 ±0.13 / 5.85 ms │ 5.68 / 5.80 ±0.10 / 5.92 ms │ no change │
│ QQuery 44 │ 11.34 / 11.54 ±0.14 / 11.70 ms │ 10.88 / 11.55 ±0.42 / 12.17 ms │ no change │
│ QQuery 45 │ 42.75 / 44.53 ±1.39 / 46.58 ms │ 41.07 / 44.40 ±2.05 / 47.17 ms │ no change │
│ QQuery 46 │ 13.71 / 14.00 ±0.24 / 14.36 ms │ 13.67 / 14.34 ±0.47 / 15.08 ms │ no change │
│ QQuery 47 │ 241.12 / 249.16 ±4.97 / 256.30 ms │ 240.04 / 248.90 ±5.71 / 257.64 ms │ no change │
│ QQuery 48 │ 105.59 / 106.84 ±0.94 / 108.39 ms │ 105.51 / 107.01 ±1.41 / 109.44 ms │ no change │
│ QQuery 49 │ 83.27 / 84.06 ±0.58 / 84.91 ms │ 83.29 / 83.93 ±0.54 / 84.68 ms │ no change │
│ QQuery 50 │ 64.96 / 66.13 ±1.51 / 69.02 ms │ 62.87 / 64.66 ±1.59 / 67.56 ms │ no change │
│ QQuery 51 │ 94.92 / 98.28 ±1.71 / 99.62 ms │ 94.35 / 97.98 ±2.60 / 101.04 ms │ no change │
│ QQuery 52 │ 24.99 / 25.21 ±0.17 / 25.49 ms │ 24.67 / 25.06 ±0.21 / 25.30 ms │ no change │
│ QQuery 53 │ 30.79 / 31.41 ±0.35 / 31.78 ms │ 30.73 / 31.32 ±0.47 / 31.93 ms │ no change │
│ QQuery 54 │ 56.65 / 57.92 ±1.42 / 60.54 ms │ 55.14 / 56.65 ±1.34 / 59.14 ms │ no change │
│ QQuery 55 │ 24.24 / 24.64 ±0.24 / 24.98 ms │ 24.75 / 25.15 ±0.32 / 25.70 ms │ no change │
│ QQuery 56 │ 40.17 / 41.82 ±2.03 / 45.65 ms │ 41.26 / 41.76 ±0.39 / 42.38 ms │ no change │
│ QQuery 57 │ 183.01 / 185.36 ±2.28 / 189.58 ms │ 180.82 / 183.12 ±1.65 / 185.82 ms │ no change │
│ QQuery 58 │ 120.98 / 122.71 ±2.03 / 126.53 ms │ 118.73 / 119.50 ±0.78 / 120.74 ms │ no change │
│ QQuery 59 │ 121.07 / 121.79 ±0.77 / 123.10 ms │ 120.33 / 121.62 ±1.68 / 124.89 ms │ no change │
│ QQuery 60 │ 41.27 / 42.08 ±0.88 / 43.70 ms │ 40.29 / 40.78 ±0.39 / 41.40 ms │ no change │
│ QQuery 61 │ 14.21 / 14.47 ±0.28 / 15.00 ms │ 14.18 / 14.48 ±0.25 / 14.80 ms │ no change │
│ QQuery 62 │ 47.92 / 48.74 ±0.95 / 50.51 ms │ 47.63 / 47.81 ±0.17 / 48.02 ms │ no change │
│ QQuery 63 │ 30.80 / 31.36 ±0.41 / 31.92 ms │ 30.77 / 32.06 ±1.92 / 35.84 ms │ no change │
│ QQuery 64 │ 487.25 / 492.11 ±3.42 / 495.75 ms │ 486.75 / 488.52 ±2.17 / 492.76 ms │ no change │
│ QQuery 65 │ 154.74 / 156.23 ±1.88 / 159.92 ms │ 147.92 / 149.80 ±1.56 / 152.68 ms │ no change │
│ QQuery 66 │ 86.17 / 87.35 ±0.88 / 88.47 ms │ 84.48 / 86.29 ±2.48 / 91.08 ms │ no change │
│ QQuery 67 │ 257.41 / 264.71 ±5.58 / 272.65 ms │ 258.48 / 262.52 ±3.02 / 267.27 ms │ no change │
│ QQuery 68 │ 14.28 / 14.56 ±0.24 / 14.98 ms │ 14.37 / 14.48 ±0.14 / 14.76 ms │ no change │
│ QQuery 69 │ 79.27 / 80.48 ±2.01 / 84.47 ms │ 77.39 / 80.03 ±3.57 / 87.08 ms │ no change │
│ QQuery 70 │ 112.51 / 113.91 ±1.26 / 115.69 ms │ 108.25 / 112.26 ±3.85 / 118.71 ms │ no change │
│ QQuery 71 │ 37.82 / 38.07 ±0.22 / 38.43 ms │ 37.22 / 37.73 ±0.31 / 38.09 ms │ no change │
│ QQuery 72 │ 2304.15 / 2345.49 ±37.17 / 2396.48 ms │ 2311.00 / 2378.10 ±56.82 / 2455.72 ms │ no change │
│ QQuery 73 │ 9.98 / 10.29 ±0.19 / 10.51 ms │ 9.68 / 9.98 ±0.22 / 10.30 ms │ no change │
│ QQuery 74 │ 191.70 / 197.53 ±4.34 / 204.04 ms │ 191.40 / 198.14 ±5.35 / 206.77 ms │ no change │
│ QQuery 75 │ 154.53 / 155.04 ±0.44 / 155.83 ms │ 152.48 / 154.89 ±2.38 / 159.23 ms │ no change │
│ QQuery 76 │ 37.08 / 37.27 ±0.19 / 37.57 ms │ 36.86 / 37.66 ±0.67 / 38.86 ms │ no change │
│ QQuery 77 │ 63.98 / 64.78 ±0.70 / 65.95 ms │ 63.29 / 63.84 ±0.41 / 64.36 ms │ no change │
│ QQuery 78 │ 200.96 / 204.41 ±1.85 / 206.26 ms │ 201.57 / 202.80 ±1.07 / 204.25 ms │ no change │
│ QQuery 79 │ 68.04 / 69.04 ±0.79 / 70.04 ms │ 67.64 / 68.28 ±0.52 / 68.90 ms │ no change │
│ QQuery 80 │ 106.50 / 107.17 ±0.55 / 107.88 ms │ 106.63 / 108.84 ±1.67 / 111.06 ms │ no change │
│ QQuery 81 │ 25.72 / 27.17 ±1.68 / 30.38 ms │ 25.51 / 25.97 ±0.38 / 26.58 ms │ no change │
│ QQuery 82 │ 17.98 / 18.40 ±0.29 / 18.86 ms │ 16.60 / 17.23 ±1.02 / 19.26 ms │ +1.07x faster │
│ QQuery 83 │ 38.34 / 39.60 ±0.82 / 40.83 ms │ 37.51 / 38.18 ±0.59 / 39.18 ms │ no change │
│ QQuery 84 │ 45.05 / 45.63 ±0.45 / 46.38 ms │ 43.74 / 44.73 ±1.13 / 46.93 ms │ no change │
│ QQuery 85 │ 140.98 / 142.35 ±1.39 / 144.48 ms │ 138.70 / 140.47 ±1.06 / 141.86 ms │ no change │
│ QQuery 86 │ 26.14 / 26.36 ±0.17 / 26.60 ms │ 25.65 / 25.96 ±0.23 / 26.25 ms │ no change │
│ QQuery 87 │ 71.22 / 71.81 ±0.64 / 72.76 ms │ 71.48 / 74.25 ±1.90 / 77.17 ms │ no change │
│ QQuery 88 │ 66.35 / 66.65 ±0.33 / 67.23 ms │ 65.65 / 66.64 ±0.57 / 67.31 ms │ no change │
│ QQuery 89 │ 37.62 / 37.86 ±0.25 / 38.32 ms │ 37.34 / 37.51 ±0.20 / 37.87 ms │ no change │
│ QQuery 90 │ 18.46 / 18.91 ±0.26 / 19.19 ms │ 17.38 / 17.73 ±0.24 / 18.08 ms │ +1.07x faster │
│ QQuery 91 │ 53.13 / 53.73 ±0.39 / 54.18 ms │ 52.57 / 53.01 ±0.55 / 53.99 ms │ no change │
│ QQuery 92 │ 30.52 / 30.87 ±0.26 / 31.30 ms │ 30.24 / 31.00 ±0.49 / 31.58 ms │ no change │
│ QQuery 93 │ 54.75 / 57.86 ±3.58 / 64.02 ms │ 54.50 / 56.10 ±0.87 / 57.14 ms │ no change │
│ QQuery 94 │ 38.83 / 39.71 ±0.57 / 40.49 ms │ 38.86 / 39.30 ±0.35 / 39.77 ms │ no change │
│ QQuery 95 │ 91.46 / 92.87 ±1.24 / 95.18 ms │ 93.47 / 93.90 ±0.55 / 94.95 ms │ no change │
│ QQuery 96 │ 24.96 / 25.31 ±0.20 / 25.55 ms │ 24.78 / 25.07 ±0.25 / 25.49 ms │ no change │
│ QQuery 97 │ 47.59 / 48.23 ±0.44 / 48.72 ms │ 47.66 / 48.56 ±0.93 / 49.75 ms │ no change │
│ QQuery 98 │ 42.72 / 43.48 ±0.58 / 44.28 ms │ 43.60 / 44.03 ±0.33 / 44.53 ms │ no change │
│ QQuery 99 │ 71.76 / 72.57 ±0.60 / 73.61 ms │ 71.78 / 72.47 ±0.72 / 73.82 ms │ no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD) │ 11076.24ms │
│ Total Time (topk_memory_batch) │ 11045.60ms │
│ Average Time (HEAD) │ 113.02ms │
│ Average Time (topk_memory_batch) │ 112.71ms │
│ Queries Faster │ 4 │
│ Queries Slower │ 0 │
│ Queries with No Change │ 94 │
│ Queries with Failure │ 1 │
└──────────────────────────────────┴────────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpcds — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 60.0s |
| Peak memory | 6.7 GiB |
| Avg memory | 6.0 GiB |
| CPU user | 258.3s |
| CPU sys | 6.6s |
| Peak spill | 0 B |
**tpcds — branch**
| Metric | Value |
|--------|-------|
| Wall time | 60.0s |
| Peak memory | 6.8 GiB |
| Avg memory | 6.0 GiB |
| CPU user | 256.7s |
| CPU sys | 6.8s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "cetra3 (via GitHub)" <gi...@apache.org>.
cetra3 commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4416780649
I've updated to `main` and adjusted as per comments
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4448895918
Benchmark for [this request](https://github.com/apache/datafusion/pull/20381#issuecomment-4448041895) hit the 7200s job deadline before finishing.
Benchmarks requested: `clickbench_partitioned`
<details><summary>Kubernetes message</summary>
```
Job was active longer than specified deadline
```
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453999246
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453838362)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0 │ 1.23 / 4.75 ±6.90 / 18.55 ms │ 1.21 / 4.67 ±6.77 / 18.20 ms │ no change │
│ QQuery 1 │ 12.61 / 12.85 ±0.13 / 13.01 ms │ 12.56 / 12.95 ±0.23 / 13.17 ms │ no change │
│ QQuery 2 │ 35.61 / 36.14 ±0.48 / 36.92 ms │ 35.26 / 35.54 ±0.29 / 36.08 ms │ no change │
│ QQuery 3 │ 30.95 / 31.37 ±0.63 / 32.60 ms │ 30.76 / 32.17 ±1.16 / 33.50 ms │ no change │
│ QQuery 4 │ 230.75 / 235.16 ±2.81 / 238.61 ms │ 233.56 / 237.11 ±2.42 / 241.08 ms │ no change │
│ QQuery 5 │ 281.82 / 285.41 ±3.31 / 291.12 ms │ 280.85 / 282.43 ±1.49 / 285.25 ms │ no change │
│ QQuery 6 │ 6.41 / 6.93 ±0.40 / 7.51 ms │ 6.97 / 7.31 ±0.30 / 7.84 ms │ 1.06x slower │
│ QQuery 7 │ 13.73 / 13.90 ±0.10 / 14.01 ms │ 13.76 / 14.04 ±0.17 / 14.27 ms │ no change │
│ QQuery 8 │ 317.74 / 321.98 ±2.81 / 325.53 ms │ 312.09 / 319.21 ±3.86 / 323.20 ms │ no change │
│ QQuery 9 │ 456.91 / 462.65 ±4.75 / 469.31 ms │ 460.09 / 465.72 ±3.47 / 469.46 ms │ no change │
│ QQuery 10 │ 69.60 / 70.94 ±1.22 / 73.16 ms │ 69.19 / 74.06 ±7.85 / 89.68 ms │ no change │
│ QQuery 11 │ 80.24 / 81.13 ±0.80 / 82.56 ms │ 80.80 / 81.44 ±0.55 / 82.33 ms │ no change │
│ QQuery 12 │ 272.98 / 278.20 ±3.24 / 281.91 ms │ 272.98 / 280.88 ±5.49 / 287.16 ms │ no change │
│ QQuery 13 │ 395.09 / 406.02 ±11.91 / 424.46 ms │ 387.78 / 392.04 ±5.90 / 403.44 ms │ no change │
│ QQuery 14 │ 281.94 / 284.81 ±3.79 / 292.15 ms │ 280.92 / 285.56 ±3.71 / 289.84 ms │ no change │
│ QQuery 15 │ 283.89 / 287.62 ±4.04 / 295.47 ms │ 283.76 / 285.20 ±1.38 / 287.60 ms │ no change │
│ QQuery 16 │ 605.05 / 612.47 ±6.24 / 621.48 ms │ 604.25 / 610.16 ±4.56 / 617.69 ms │ no change │
│ QQuery 17 │ 603.69 / 611.69 ±7.40 / 624.87 ms │ 601.98 / 615.20 ±8.88 / 629.20 ms │ no change │
│ QQuery 18 │ 1212.27 / 1226.95 ±10.17 / 1242.39 ms │ 1195.39 / 1216.24 ±14.35 / 1233.81 ms │ no change │
│ QQuery 19 │ 27.85 / 29.03 ±1.88 / 32.74 ms │ 28.43 / 31.85 ±4.10 / 37.00 ms │ 1.10x slower │
│ QQuery 20 │ 518.80 / 526.81 ±11.80 / 550.27 ms │ 518.11 / 526.75 ±11.19 / 548.35 ms │ no change │
│ QQuery 21 │ 591.91 / 596.41 ±3.04 / 601.45 ms │ 597.08 / 603.65 ±4.27 / 607.95 ms │ no change │
│ QQuery 22 │ 1054.76 / 1069.25 ±9.19 / 1082.03 ms │ 1069.95 / 1080.84 ±17.41 / 1115.45 ms │ no change │
│ QQuery 23 │ 3189.78 / 3226.76 ±26.30 / 3260.77 ms │ 3167.11 / 3189.24 ±17.44 / 3215.74 ms │ no change │
│ QQuery 24 │ 41.81 / 45.76 ±3.82 / 51.33 ms │ 42.01 / 46.31 ±4.63 / 52.23 ms │ no change │
│ QQuery 25 │ 112.80 / 113.85 ±1.32 / 116.32 ms │ 111.91 / 113.30 ±1.54 / 115.48 ms │ no change │
│ QQuery 26 │ 42.39 / 43.93 ±1.92 / 47.68 ms │ 42.25 / 43.05 ±0.54 / 43.78 ms │ no change │
│ QQuery 27 │ 670.94 / 675.74 ±4.73 / 683.66 ms │ 670.84 / 676.56 ±4.52 / 682.20 ms │ no change │
│ QQuery 28 │ 3019.95 / 3038.07 ±15.17 / 3058.50 ms │ 3023.66 / 3039.37 ±10.79 / 3056.44 ms │ no change │
│ QQuery 29 │ 41.51 / 52.81 ±16.08 / 83.30 ms │ 41.66 / 45.79 ±8.11 / 62.02 ms │ +1.15x faster │
│ QQuery 30 │ 301.72 / 308.66 ±5.66 / 318.56 ms │ 304.48 / 310.54 ±6.26 / 321.19 ms │ no change │
│ QQuery 31 │ 289.08 / 292.16 ±3.19 / 297.72 ms │ 290.33 / 298.70 ±4.97 / 302.97 ms │ no change │
│ QQuery 32 │ 921.20 / 927.66 ±3.57 / 930.59 ms │ 931.97 / 942.47 ±14.09 / 969.99 ms │ no change │
│ QQuery 33 │ 1421.20 / 1453.80 ±19.98 / 1481.17 ms │ 1450.22 / 1459.46 ±11.19 / 1480.09 ms │ no change │
│ QQuery 34 │ 1458.57 / 1496.82 ±24.19 / 1530.57 ms │ 1473.14 / 1515.03 ±34.25 / 1565.67 ms │ no change │
│ QQuery 35 │ 293.78 / 303.25 ±13.40 / 329.78 ms │ 284.71 / 293.72 ±7.38 / 307.30 ms │ no change │
│ QQuery 36 │ 64.05 / 70.55 ±6.58 / 82.68 ms │ 61.26 / 69.40 ±5.27 / 76.32 ms │ no change │
│ QQuery 37 │ 35.97 / 41.68 ±10.22 / 62.05 ms │ 35.32 / 38.75 ±5.28 / 49.27 ms │ +1.08x faster │
│ QQuery 38 │ 40.54 / 42.97 ±1.52 / 44.66 ms │ 40.46 / 42.80 ±2.30 / 47.19 ms │ no change │
│ QQuery 39 │ 124.76 / 135.54 ±5.45 / 139.25 ms │ 125.26 / 134.99 ±7.54 / 146.10 ms │ no change │
│ QQuery 40 │ 14.34 / 16.65 ±3.89 / 24.39 ms │ 14.26 / 18.27 ±7.72 / 33.69 ms │ 1.10x slower │
│ QQuery 41 │ 13.85 / 15.84 ±2.39 / 19.61 ms │ 14.18 / 14.59 ±0.43 / 15.40 ms │ +1.09x faster │
│ QQuery 42 │ 13.43 / 14.07 ±0.77 / 15.48 ms │ 13.44 / 13.69 ±0.15 / 13.87 ms │ no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD) │ 19809.02ms │
│ Total Time (topk_memory_batch) │ 19801.07ms │
│ Average Time (HEAD) │ 460.67ms │
│ Average Time (topk_memory_batch) │ 460.49ms │
│ Queries Faster │ 3 │
│ Queries Slower │ 3 │
│ Queries with No Change │ 37 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴────────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**clickbench_partitioned — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 100.0s |
| Peak memory | 29.4 GiB |
| Avg memory | 22.9 GiB |
| CPU user | 1041.7s |
| CPU sys | 63.7s |
| Peak spill | 0 B |
**clickbench_partitioned — branch**
| Metric | Value |
|--------|-------|
| Wall time | 100.0s |
| Peak memory | 30.5 GiB |
| Avg memory | 23.1 GiB |
| CPU user | 1039.5s |
| CPU sys | 64.8s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453872292
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453838362)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4453838362-99-nz828 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) to 7f2f78d (merge-base) [diff](https://github.com/apache/datafusion/compare/7f2f78d48b6d3d6aee2ce2fd29910bb4c11b1012..1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) using: tpcds
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453838362
run benchmarks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "cetra3 (via GitHub)" <gi...@apache.org>.
cetra3 commented on code in PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#discussion_r2944370520
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -790,16 +787,20 @@ impl TopKHeap {
/// Compact this heap, rewriting all stored batches into a single
/// input batch
pub fn maybe_compact(&mut self) -> Result<()> {
- // we compact if the number of "unused" rows in the store is
- // past some pre-defined threshold. Target holding up to
- // around 20 batches, but handle cases of large k where some
- // batches might be partially full
- let max_unused_rows = (20 * self.batch_size) + self.k;
- let unused_rows = self.store.unused_rows();
-
- // don't compact if the store has one extra batch or
- // unused rows is under the threshold
- if self.store.len() <= 2 || unused_rows < max_unused_rows {
+ // Don't compact if there's only one batch (compacting into itself is pointless)
+ if self.store.len() <= 1 {
+ return Ok(());
+ }
+
+ let total_rows = self.store.total_rows;
+
+ let avg_bytes_per_row = self.store.batches_size / total_rows.max(1); // .max(1) prevents div by zero
+ let compacted_estimate = avg_bytes_per_row * self.inner.len();
+
+ // Compact when current store memory exceeds 2x what the compacted
+ // result would need. The multiplier avoids compacting when the
+ // savings would be marginal.
+ if self.store.batches_size <= compacted_estimate * 2 {
return Ok(());
Review Comment:
Actually simplifying this down, we get:
```
batches_size <= (batches_size / total_rows) * inner_len * 2
// Multiply both sides by total_rows:
batches_size * total_rows <= batches_size * inner_len * 2
// Divide both sides by batches_size:
total_rows <= inner_len * 2
```
So the batches size actually just cancels out. In light of this let me know if it's still something we want to pursue. I still see some perf gains with this strategy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4448203086
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4448041895)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1 │ 40.73 / 42.64 ±1.83 / 45.77 ms │ 38.74 / 39.83 ±0.93 / 41.21 ms │ +1.07x faster │
│ QQuery 2 │ 21.87 / 22.03 ±0.12 / 22.24 ms │ 20.55 / 21.04 ±0.55 / 21.99 ms │ no change │
│ QQuery 3 │ 38.10 / 39.45 ±1.24 / 41.64 ms │ 35.29 / 36.62 ±1.07 / 38.57 ms │ +1.08x faster │
│ QQuery 4 │ 18.52 / 18.67 ±0.08 / 18.77 ms │ 17.28 / 17.38 ±0.11 / 17.56 ms │ +1.07x faster │
│ QQuery 5 │ 46.02 / 47.89 ±1.80 / 50.62 ms │ 43.35 / 45.19 ±1.15 / 46.78 ms │ +1.06x faster │
│ QQuery 6 │ 16.54 / 17.05 ±0.88 / 18.79 ms │ 16.58 / 17.09 ±0.93 / 18.96 ms │ no change │
│ QQuery 7 │ 50.18 / 52.77 ±1.46 / 54.49 ms │ 49.10 / 50.96 ±1.31 / 52.50 ms │ no change │
│ QQuery 8 │ 46.02 / 46.91 ±0.73 / 47.68 ms │ 45.81 / 45.91 ±0.11 / 46.11 ms │ no change │
│ QQuery 9 │ 50.82 / 51.71 ±0.91 / 53.42 ms │ 50.58 / 51.58 ±0.80 / 52.79 ms │ no change │
│ QQuery 10 │ 64.58 / 64.96 ±0.35 / 65.54 ms │ 63.66 / 64.40 ±0.69 / 65.72 ms │ no change │
│ QQuery 11 │ 13.54 / 13.71 ±0.18 / 14.04 ms │ 13.56 / 13.83 ±0.33 / 14.40 ms │ no change │
│ QQuery 12 │ 25.39 / 25.77 ±0.26 / 26.15 ms │ 25.34 / 25.59 ±0.22 / 25.89 ms │ no change │
│ QQuery 13 │ 35.69 / 36.08 ±0.26 / 36.33 ms │ 35.76 / 36.14 ±0.42 / 36.92 ms │ no change │
│ QQuery 14 │ 26.11 / 26.16 ±0.06 / 26.27 ms │ 25.98 / 26.36 ±0.60 / 27.54 ms │ no change │
│ QQuery 15 │ 31.64 / 31.83 ±0.14 / 32.01 ms │ 31.64 / 31.78 ±0.11 / 31.88 ms │ no change │
│ QQuery 16 │ 15.27 / 15.40 ±0.20 / 15.79 ms │ 15.26 / 15.29 ±0.03 / 15.35 ms │ no change │
│ QQuery 17 │ 75.08 / 76.26 ±1.55 / 79.22 ms │ 74.31 / 76.16 ±1.96 / 79.87 ms │ no change │
│ QQuery 18 │ 70.21 / 70.65 ±0.44 / 71.44 ms │ 68.73 / 69.37 ±0.45 / 70.02 ms │ no change │
│ QQuery 19 │ 35.74 / 36.47 ±0.96 / 38.34 ms │ 35.25 / 36.21 ±0.93 / 37.69 ms │ no change │
│ QQuery 20 │ 38.22 / 38.53 ±0.32 / 39.13 ms │ 38.07 / 38.26 ±0.15 / 38.43 ms │ no change │
│ QQuery 21 │ 59.77 / 61.18 ±2.58 / 66.34 ms │ 58.20 / 60.72 ±2.47 / 64.61 ms │ no change │
│ QQuery 22 │ 23.45 / 23.80 ±0.24 / 24.20 ms │ 23.15 / 23.58 ±0.37 / 24.12 ms │ no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD) │ 859.92ms │
│ Total Time (topk_memory_batch) │ 843.30ms │
│ Average Time (HEAD) │ 39.09ms │
│ Average Time (topk_memory_batch) │ 38.33ms │
│ Queries Faster │ 4 │
│ Queries Slower │ 0 │
│ Queries with No Change │ 18 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴──────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpch — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.5 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 31.8s |
| CPU sys | 2.4s |
| Peak spill | 0 B |
**tpch — branch**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.5 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 31.0s |
| CPU sys | 2.4s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417090518
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4416959715)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0 │ 1.20 / 4.53 ±6.60 / 17.74 ms │ 1.19 / 4.64 ±6.76 / 18.17 ms │ no change │
│ QQuery 1 │ 12.63 / 12.82 ±0.15 / 13.03 ms │ 13.11 / 13.54 ±0.31 / 14.00 ms │ 1.06x slower │
│ QQuery 2 │ 35.42 / 36.21 ±0.58 / 36.92 ms │ 36.18 / 36.59 ±0.39 / 37.24 ms │ no change │
│ QQuery 3 │ 30.45 / 31.06 ±0.57 / 32.04 ms │ 30.70 / 30.94 ±0.24 / 31.37 ms │ no change │
│ QQuery 4 │ 227.53 / 232.23 ±2.43 / 234.45 ms │ 229.22 / 233.92 ±4.34 / 241.46 ms │ no change │
│ QQuery 5 │ 277.29 / 279.39 ±1.99 / 282.89 ms │ 274.81 / 276.53 ±1.60 / 278.95 ms │ no change │
│ QQuery 6 │ 6.96 / 7.31 ±0.19 / 7.48 ms │ 6.37 / 7.05 ±0.35 / 7.38 ms │ no change │
│ QQuery 7 │ 13.99 / 14.18 ±0.19 / 14.55 ms │ 14.86 / 14.87 ±0.01 / 14.89 ms │ no change │
│ QQuery 8 │ 312.81 / 314.89 ±2.17 / 318.72 ms │ 311.36 / 313.05 ±1.54 / 315.77 ms │ no change │
│ QQuery 9 │ 447.57 / 451.12 ±2.52 / 454.69 ms │ 447.78 / 451.71 ±3.06 / 455.81 ms │ no change │
│ QQuery 10 │ 68.61 / 69.39 ±0.82 / 70.82 ms │ 69.36 / 70.88 ±1.16 / 72.54 ms │ no change │
│ QQuery 11 │ 78.92 / 80.84 ±2.09 / 84.88 ms │ 80.07 / 81.90 ±2.12 / 86.03 ms │ no change │
│ QQuery 12 │ 269.36 / 272.89 ±4.10 / 277.98 ms │ 270.57 / 272.67 ±2.13 / 276.69 ms │ no change │
│ QQuery 13 │ 374.53 / 384.72 ±10.27 / 401.94 ms │ 381.44 / 397.15 ±19.12 / 432.41 ms │ no change │
│ QQuery 14 │ 275.28 / 279.52 ±3.26 / 285.09 ms │ 280.42 / 289.22 ±9.21 / 306.54 ms │ no change │
│ QQuery 15 │ 277.18 / 282.09 ±3.59 / 287.71 ms │ 274.49 / 281.40 ±6.29 / 293.22 ms │ no change │
│ QQuery 16 │ 594.64 / 604.19 ±8.70 / 615.63 ms │ 601.86 / 606.93 ±3.56 / 611.06 ms │ no change │
│ QQuery 17 │ 593.71 / 606.11 ±8.40 / 618.04 ms │ 605.62 / 611.28 ±5.72 / 622.15 ms │ no change │
│ QQuery 18 │ 1185.90 / 1201.08 ±12.09 / 1214.94 ms │ 1186.40 / 1220.18 ±20.66 / 1247.10 ms │ no change │
│ QQuery 19 │ 27.54 / 28.88 ±1.58 / 31.95 ms │ 28.39 / 34.43 ±11.59 / 57.60 ms │ 1.19x slower │
│ QQuery 20 │ 512.46 / 517.76 ±6.66 / 530.90 ms │ 509.87 / 519.00 ±9.66 / 537.23 ms │ no change │
│ QQuery 21 │ 588.07 / 590.91 ±2.79 / 595.50 ms │ 589.24 / 594.52 ±9.32 / 613.14 ms │ no change │
│ QQuery 22 │ 1048.87 / 1057.64 ±5.71 / 1064.92 ms │ 1052.18 / 1058.86 ±4.50 / 1065.98 ms │ no change │
│ QQuery 23 │ 3098.26 / 3151.71 ±27.65 / 3177.92 ms │ 3134.20 / 3170.64 ±21.97 / 3195.83 ms │ no change │
│ QQuery 24 │ 41.77 / 44.35 ±2.67 / 49.21 ms │ 41.62 / 45.60 ±4.20 / 52.82 ms │ no change │
│ QQuery 25 │ 112.27 / 113.38 ±1.14 / 114.99 ms │ 112.44 / 115.09 ±4.11 / 123.26 ms │ no change │
│ QQuery 26 │ 42.69 / 43.46 ±0.70 / 44.34 ms │ 41.50 / 42.03 ±0.36 / 42.59 ms │ no change │
│ QQuery 27 │ 668.22 / 674.65 ±4.12 / 680.16 ms │ 671.03 / 678.29 ±4.81 / 684.31 ms │ no change │
│ QQuery 28 │ 2985.50 / 3019.69 ±21.19 / 3046.13 ms │ 2999.53 / 3044.74 ±33.47 / 3085.86 ms │ no change │
│ QQuery 29 │ 41.38 / 43.54 ±4.01 / 51.55 ms │ 41.44 / 47.89 ±7.58 / 59.04 ms │ 1.10x slower │
│ QQuery 30 │ 299.21 / 301.48 ±2.90 / 307.08 ms │ 300.21 / 306.10 ±3.89 / 311.15 ms │ no change │
│ QQuery 31 │ 287.99 / 290.34 ±1.65 / 292.43 ms │ 292.40 / 299.71 ±4.65 / 306.87 ms │ no change │
│ QQuery 32 │ 910.33 / 937.56 ±32.24 / 996.52 ms │ 904.99 / 927.70 ±21.67 / 955.37 ms │ no change │
│ QQuery 33 │ 1418.29 / 1440.13 ±13.32 / 1455.18 ms │ 1426.98 / 1446.30 ±21.05 / 1484.10 ms │ no change │
│ QQuery 34 │ 1436.44 / 1450.53 ±12.84 / 1468.57 ms │ 1436.24 / 1448.75 ±6.54 / 1455.22 ms │ no change │
│ QQuery 35 │ 280.58 / 291.93 ±14.04 / 319.61 ms │ 279.26 / 305.64 ±33.61 / 372.02 ms │ no change │
│ QQuery 36 │ 61.91 / 65.14 ±2.79 / 68.86 ms │ 66.09 / 72.89 ±4.60 / 78.53 ms │ 1.12x slower │
│ QQuery 37 │ 35.34 / 42.33 ±6.90 / 54.51 ms │ 35.37 / 37.61 ±2.95 / 43.45 ms │ +1.13x faster │
│ QQuery 38 │ 39.87 / 44.45 ±4.38 / 52.68 ms │ 39.95 / 45.63 ±4.67 / 51.88 ms │ no change │
│ QQuery 39 │ 133.44 / 137.23 ±3.13 / 142.40 ms │ 129.01 / 135.12 ±5.66 / 144.08 ms │ no change │
│ QQuery 40 │ 14.06 / 16.55 ±2.57 / 20.84 ms │ 14.36 / 14.56 ±0.23 / 15.00 ms │ +1.14x faster │
│ QQuery 41 │ 13.45 / 14.99 ±2.06 / 19.06 ms │ 13.94 / 14.20 ±0.15 / 14.38 ms │ +1.06x faster │
│ QQuery 42 │ 13.18 / 15.89 ±5.26 / 26.41 ms │ 13.31 / 15.71 ±4.37 / 24.44 ms │ no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD) │ 19499.10ms │
│ Total Time (topk_memory_batch) │ 19635.47ms │
│ Average Time (HEAD) │ 453.47ms │
│ Average Time (topk_memory_batch) │ 456.64ms │
│ Queries Faster │ 3 │
│ Queries Slower │ 4 │
│ Queries with No Change │ 36 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴────────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**clickbench_partitioned — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 100.0s |
| Peak memory | 29.9 GiB |
| Avg memory | 23.0 GiB |
| CPU user | 1028.2s |
| CPU sys | 62.3s |
| Peak spill | 0 B |
**clickbench_partitioned — branch**
| Metric | Value |
|--------|-------|
| Wall time | 100.0s |
| Peak memory | 30.1 GiB |
| Avg memory | 23.0 GiB |
| CPU user | 1031.1s |
| CPU sys | 63.6s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417036140
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4416959715)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4416959715-3-fs42c 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (dff9381e798c8d038ed391b6471ff21e0f6c3227) to 8741a77 (merge-base) [diff](https://github.com/apache/datafusion/compare/8741a7752c02f278394e9de1977da6d18f563f6d..dff9381e798c8d038ed391b6471ff21e0f6c3227) using: tpch
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417055118
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4416959715)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4416959715-2-q7v2x 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (dff9381e798c8d038ed391b6471ff21e0f6c3227) to 8741a77 (merge-base) [diff](https://github.com/apache/datafusion/compare/8741a7752c02f278394e9de1977da6d18f563f6d..dff9381e798c8d038ed391b6471ff21e0f6c3227) using: tpcds
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417685250
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4417615444)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0 │ 1.23 / 4.67 ±6.79 / 18.24 ms │ 1.19 / 4.62 ±6.76 / 18.14 ms │ no change │
│ QQuery 1 │ 13.49 / 13.63 ±0.11 / 13.78 ms │ 12.92 / 13.23 ±0.43 / 14.08 ms │ no change │
│ QQuery 2 │ 36.35 / 36.79 ±0.50 / 37.74 ms │ 37.49 / 37.79 ±0.35 / 38.48 ms │ no change │
│ QQuery 3 │ 30.94 / 31.41 ±0.59 / 32.56 ms │ 31.33 / 31.85 ±0.33 / 32.31 ms │ no change │
│ QQuery 4 │ 231.20 / 236.26 ±2.95 / 239.77 ms │ 229.11 / 233.11 ±2.75 / 237.46 ms │ no change │
│ QQuery 5 │ 278.32 / 282.63 ±3.37 / 287.54 ms │ 274.39 / 279.16 ±3.88 / 285.56 ms │ no change │
│ QQuery 6 │ 6.59 / 6.97 ±0.31 / 7.52 ms │ 6.69 / 6.94 ±0.25 / 7.41 ms │ no change │
│ QQuery 7 │ 15.09 / 15.90 ±1.27 / 18.43 ms │ 14.13 / 14.25 ±0.08 / 14.38 ms │ +1.12x faster │
│ QQuery 8 │ 315.19 / 319.96 ±4.13 / 327.45 ms │ 315.34 / 318.34 ±1.65 / 320.37 ms │ no change │
│ QQuery 9 │ 448.32 / 452.52 ±2.53 / 455.03 ms │ 449.58 / 460.93 ±7.23 / 471.17 ms │ no change │
│ QQuery 10 │ 70.33 / 71.15 ±0.44 / 71.55 ms │ 69.28 / 70.57 ±0.77 / 71.54 ms │ no change │
│ QQuery 11 │ 80.87 / 82.31 ±0.97 / 83.74 ms │ 81.03 / 82.07 ±0.64 / 82.81 ms │ no change │
│ QQuery 12 │ 269.09 / 274.52 ±4.31 / 281.45 ms │ 267.99 / 274.25 ±5.62 / 284.24 ms │ no change │
│ QQuery 13 │ 383.09 / 390.10 ±4.83 / 397.60 ms │ 386.13 / 396.44 ±7.03 / 405.38 ms │ no change │
│ QQuery 14 │ 282.59 / 286.68 ±4.44 / 295.28 ms │ 277.19 / 281.69 ±3.00 / 286.42 ms │ no change │
│ QQuery 15 │ 276.33 / 283.56 ±6.34 / 295.21 ms │ 276.43 / 286.97 ±9.85 / 303.59 ms │ no change │
│ QQuery 16 │ 608.61 / 612.57 ±4.04 / 619.54 ms │ 602.24 / 611.54 ±7.07 / 622.91 ms │ no change │
│ QQuery 17 │ 610.10 / 617.63 ±10.25 / 637.83 ms │ 598.57 / 606.64 ±4.78 / 611.90 ms │ no change │
│ QQuery 18 │ 1197.80 / 1208.35 ±7.95 / 1218.34 ms │ 1184.35 / 1208.07 ±17.14 / 1236.63 ms │ no change │
│ QQuery 19 │ 28.44 / 32.07 ±6.48 / 45.02 ms │ 28.14 / 36.70 ±12.56 / 60.79 ms │ 1.14x slower │
│ QQuery 20 │ 512.50 / 525.60 ±7.77 / 534.98 ms │ 513.54 / 517.26 ±4.02 / 524.60 ms │ no change │
│ QQuery 21 │ 590.75 / 597.21 ±4.37 / 604.14 ms │ 587.52 / 596.55 ±7.69 / 605.64 ms │ no change │
│ QQuery 22 │ 1050.27 / 1058.03 ±6.05 / 1064.87 ms │ 1047.94 / 1051.31 ±3.03 / 1056.64 ms │ no change │
│ QQuery 23 │ 3120.39 / 3178.54 ±39.87 / 3238.39 ms │ 3132.66 / 3160.89 ±20.28 / 3190.36 ms │ no change │
│ QQuery 24 │ 41.35 / 43.48 ±2.65 / 48.32 ms │ 42.21 / 43.93 ±2.14 / 48.09 ms │ no change │
│ QQuery 25 │ 111.98 / 112.59 ±0.72 / 113.66 ms │ 111.13 / 114.43 ±3.71 / 121.20 ms │ no change │
│ QQuery 26 │ 42.33 / 42.92 ±0.66 / 44.05 ms │ 41.91 / 45.97 ±5.06 / 55.41 ms │ 1.07x slower │
│ QQuery 27 │ 674.76 / 681.30 ±7.83 / 696.39 ms │ 665.84 / 678.09 ±7.43 / 687.03 ms │ no change │
│ QQuery 28 │ 2994.65 / 3018.39 ±21.09 / 3057.16 ms │ 2989.39 / 3001.84 ±15.78 / 3031.97 ms │ no change │
│ QQuery 29 │ 42.35 / 48.72 ±8.15 / 62.58 ms │ 42.53 / 46.15 ±4.69 / 55.16 ms │ +1.06x faster │
│ QQuery 30 │ 298.15 / 302.88 ±3.48 / 308.08 ms │ 301.87 / 305.52 ±4.07 / 313.31 ms │ no change │
│ QQuery 31 │ 289.29 / 294.15 ±3.79 / 300.09 ms │ 288.21 / 298.79 ±5.84 / 304.39 ms │ no change │
│ QQuery 32 │ 920.59 / 931.16 ±10.38 / 944.48 ms │ 913.47 / 938.40 ±34.42 / 1006.45 ms │ no change │
│ QQuery 33 │ 1415.94 / 1431.08 ±16.20 / 1460.36 ms │ 1411.71 / 1440.52 ±30.36 / 1497.44 ms │ no change │
│ QQuery 34 │ 1442.71 / 1451.81 ±7.63 / 1465.06 ms │ 1427.36 / 1457.15 ±18.18 / 1481.44 ms │ no change │
│ QQuery 35 │ 285.48 / 291.98 ±3.39 / 295.33 ms │ 280.29 / 287.92 ±4.82 / 293.55 ms │ no change │
│ QQuery 36 │ 63.05 / 67.74 ±4.98 / 77.00 ms │ 61.76 / 63.52 ±1.42 / 65.57 ms │ +1.07x faster │
│ QQuery 37 │ 36.46 / 40.67 ±5.79 / 51.30 ms │ 35.16 / 38.73 ±4.42 / 46.94 ms │ no change │
│ QQuery 38 │ 40.21 / 44.64 ±3.07 / 49.32 ms │ 40.71 / 43.31 ±1.62 / 45.63 ms │ no change │
│ QQuery 39 │ 122.72 / 160.57 ±52.97 / 265.48 ms │ 128.71 / 136.56 ±7.01 / 149.04 ms │ +1.18x faster │
│ QQuery 40 │ 14.39 / 15.44 ±1.61 / 18.64 ms │ 14.50 / 15.93 ±2.11 / 20.10 ms │ no change │
│ QQuery 41 │ 13.67 / 13.96 ±0.25 / 14.39 ms │ 13.51 / 15.07 ±2.36 / 19.77 ms │ 1.08x slower │
│ QQuery 42 │ 13.25 / 14.86 ±2.00 / 18.41 ms │ 13.37 / 14.45 ±1.93 / 18.30 ms │ no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD) │ 19627.38ms │
│ Total Time (topk_memory_batch) │ 19567.46ms │
│ Average Time (HEAD) │ 456.45ms │
│ Average Time (topk_memory_batch) │ 455.06ms │
│ Queries Faster │ 4 │
│ Queries Slower │ 3 │
│ Queries with No Change │ 36 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴────────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**clickbench_partitioned — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 100.0s |
| Peak memory | 30.9 GiB |
| Avg memory | 23.4 GiB |
| CPU user | 1033.6s |
| CPU sys | 63.2s |
| Peak spill | 0 B |
**clickbench_partitioned — branch**
| Metric | Value |
|--------|-------|
| Wall time | 100.0s |
| Peak memory | 30.0 GiB |
| Avg memory | 23.0 GiB |
| CPU user | 1028.6s |
| CPU sys | 63.2s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4454030663
The queries that are reported to be slower in https://github.com/apache/datafusion/pull/20381#issuecomment-4453999246 do not have TopK, so I think they are noise
https://github.com/apache/datafusion/blob/main/benchmarks/queries/clickbench/queries/q6.sql
https://github.com/apache/datafusion/blob/main/benchmarks/queries/clickbench/queries/q19.sql
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#discussion_r3217605298
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -1243,4 +1243,154 @@ mod tests {
Ok(())
}
+
+ /// Tests that memory-based compaction triggers when a large batch
+ /// has very few rows referenced by the top-k heap.
+ #[tokio::test]
+ async fn test_topk_memory_compaction() -> Result<()> {
+ let schema = Arc::new(Schema::new(vec![Field::new("a", DataType::Int32, false)]));
+
+ let sort_expr = PhysicalSortExpr {
+ expr: col("a", schema.as_ref())?,
+ options: SortOptions::default(),
+ };
+
+ let full_expr = LexOrdering::from([sort_expr.clone()]);
+ let prefix = vec![sort_expr];
+
+ let runtime = Arc::new(RuntimeEnv::default());
+ let metrics = ExecutionPlanMetricsSet::new();
+
+ let k = 5;
+ let mut topk = TopK::try_new(
+ 0,
+ Arc::clone(&schema),
+ prefix,
+ full_expr,
+ k,
+ 8192,
+ runtime,
+ &metrics,
+ Arc::new(RwLock::new(TopKDynamicFilters::new(Arc::new(
+ DynamicFilterPhysicalExpr::new(vec![], lit(true)),
+ )))),
+ )?;
+
+ // Insert a large batch (100,000 rows) with values 1..=100_000.
+ // Only the smallest 5 values (1..=5) will end up in the heap.
+ let large_values: Vec<i32> = (1..=100_000).collect();
+ let array1: ArrayRef = Arc::new(Int32Array::from(large_values));
+ let batch1 = RecordBatch::try_new(Arc::clone(&schema), vec![array1])?;
+ topk.insert_batch(batch1)?;
+
+ // After the first batch, store has 1 batch — compaction should
+ // not trigger (guard: store.len() <= 1).
+ assert_eq!(
+ topk.heap.store.len(),
+ 1,
+ "should have 1 batch before second insert"
+ );
+
+ // Insert a second batch with a couple of values that replace
+ // some heap entries (e.g. values 2 and 3 appear again, but won't
+ // displace 1-5; use values smaller than current min-of-max to
+ // force replacements). Actually, heap already has 1..=5. Inserting
+ // values like [1, 2] would just be duplicates that don't replace.
+ // Instead, insert values that do NOT replace, to keep the 5 rows
+ // pointing at the first batch. The point is that we now have 2
+ // batches and the first is huge, so compaction should fire.
+ let array2: ArrayRef = Arc::new(Int32Array::from(vec![200_000, 300_000]));
+ let batch2 = RecordBatch::try_new(Arc::clone(&schema), vec![array2])?;
+ topk.insert_batch(batch2)?;
+
+ // After inserting a second batch, maybe_compact should have fired
+ // because the large batch dwarfs the compacted estimate.
+ // The store should now contain only 1 batch (the compacted one).
+ assert_eq!(
+ topk.heap.store.len(),
+ 1,
+ "store should be compacted to 1 batch"
+ );
+
+ // Verify the emitted results are correct (top 5 ascending).
+ let results: Vec<_> = topk.emit()?.try_collect().await?;
+ assert_batches_eq!(
+ &[
+ "+---+", "| a |", "+---+", "| 1 |", "| 2 |", "| 3 |", "| 4 |", "| 5 |",
+ "+---+",
+ ],
+ &results
+ );
+
+ Ok(())
+ }
+
+ /// Negative path: when stored rows are close to the heap size,
+ /// compaction must NOT fire even with multiple batches present,
+ /// because the savings would be marginal
+ /// (guard: `total_rows <= num_rows * 2`).
+ #[tokio::test]
+ async fn test_topk_memory_compaction_skipped_when_marginal() -> Result<()> {
Review Comment:
The requested boolean-column regression test still seems to be missing. The new negative-path test uses an Int32Array, so it does not cover the bit-packed boolean case from the earlier review.
Could you please add a boolean-column multi-batch test that verifies marginal savings do not trigger compaction every time?
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -1243,4 +1243,154 @@ mod tests {
Ok(())
}
+
+ /// Tests that memory-based compaction triggers when a large batch
+ /// has very few rows referenced by the top-k heap.
+ #[tokio::test]
+ async fn test_topk_memory_compaction() -> Result<()> {
+ let schema = Arc::new(Schema::new(vec![Field::new("a", DataType::Int32, false)]));
+
+ let sort_expr = PhysicalSortExpr {
+ expr: col("a", schema.as_ref())?,
+ options: SortOptions::default(),
+ };
+
+ let full_expr = LexOrdering::from([sort_expr.clone()]);
+ let prefix = vec![sort_expr];
+
+ let runtime = Arc::new(RuntimeEnv::default());
+ let metrics = ExecutionPlanMetricsSet::new();
+
+ let k = 5;
+ let mut topk = TopK::try_new(
+ 0,
+ Arc::clone(&schema),
+ prefix,
+ full_expr,
+ k,
+ 8192,
+ runtime,
+ &metrics,
+ Arc::new(RwLock::new(TopKDynamicFilters::new(Arc::new(
+ DynamicFilterPhysicalExpr::new(vec![], lit(true)),
+ )))),
+ )?;
+
+ // Insert a large batch (100,000 rows) with values 1..=100_000.
+ // Only the smallest 5 values (1..=5) will end up in the heap.
+ let large_values: Vec<i32> = (1..=100_000).collect();
+ let array1: ArrayRef = Arc::new(Int32Array::from(large_values));
+ let batch1 = RecordBatch::try_new(Arc::clone(&schema), vec![array1])?;
+ topk.insert_batch(batch1)?;
+
+ // After the first batch, store has 1 batch — compaction should
+ // not trigger (guard: store.len() <= 1).
+ assert_eq!(
+ topk.heap.store.len(),
+ 1,
+ "should have 1 batch before second insert"
+ );
+
+ // Insert a second batch with a couple of values that replace
+ // some heap entries (e.g. values 2 and 3 appear again, but won't
+ // displace 1-5; use values smaller than current min-of-max to
+ // force replacements). Actually, heap already has 1..=5. Inserting
+ // values like [1, 2] would just be duplicates that don't replace.
+ // Instead, insert values that do NOT replace, to keep the 5 rows
+ // pointing at the first batch. The point is that we now have 2
+ // batches and the first is huge, so compaction should fire.
+ let array2: ArrayRef = Arc::new(Int32Array::from(vec![200_000, 300_000]));
Review Comment:
I do not think this test currently exercises compaction. The second batch uses [200_000, 300_000], which does not produce replacements for ascending top-5 after the first batch already contains 1..=5.
Since TopK::insert_batch only calls maybe_compact() when replacements > 0, the store remains at length 1 from the first insert, and the later assertion passes without proving compaction happened.
Could you please make the second batch produce at least one replacement while keeping multiple stored batches, or add an assertion for the pre-compaction state that proves two batches existed before compaction?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4448120123
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4448041895)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4448041895-68-bl5w9 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) to 7f2f78d (merge-base) [diff](https://github.com/apache/datafusion/compare/7f2f78d48b6d3d6aee2ce2fd29910bb4c11b1012..1ab6aeace0e26d3caf3e9d87563837f48e4e9db3) using: clickbench_partitioned
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453971142
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453838362)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1 │ 6.36 / 6.88 ±0.88 / 8.64 ms │ 6.44 / 6.96 ±0.80 / 8.55 ms │ no change │
│ QQuery 2 │ 82.52 / 83.41 ±1.27 / 85.91 ms │ 83.35 / 83.66 ±0.27 / 84.08 ms │ no change │
│ QQuery 3 │ 28.94 / 29.63 ±0.46 / 30.22 ms │ 29.26 / 29.49 ±0.14 / 29.65 ms │ no change │
│ QQuery 4 │ 511.15 / 517.59 ±3.62 / 521.84 ms │ 529.68 / 540.73 ±5.66 / 545.76 ms │ no change │
│ QQuery 5 │ 52.87 / 53.51 ±0.38 / 53.90 ms │ 53.66 / 53.97 ±0.26 / 54.39 ms │ no change │
│ QQuery 6 │ 35.30 / 35.72 ±0.33 / 36.23 ms │ 36.12 / 36.53 ±0.39 / 37.21 ms │ no change │
│ QQuery 7 │ 110.73 / 112.14 ±1.69 / 115.35 ms │ 110.63 / 112.03 ±1.70 / 114.87 ms │ no change │
│ QQuery 8 │ 39.28 / 39.55 ±0.23 / 39.89 ms │ 39.48 / 39.85 ±0.31 / 40.26 ms │ no change │
│ QQuery 9 │ 53.67 / 54.81 ±1.34 / 57.31 ms │ 54.27 / 55.15 ±0.89 / 56.31 ms │ no change │
│ QQuery 10 │ 81.76 / 82.17 ±0.47 / 83.08 ms │ 81.25 / 82.57 ±1.33 / 85.00 ms │ no change │
│ QQuery 11 │ 323.73 / 329.09 ±3.38 / 332.18 ms │ 331.90 / 340.23 ±6.14 / 348.03 ms │ no change │
│ QQuery 12 │ 29.35 / 29.54 ±0.15 / 29.73 ms │ 28.96 / 29.38 ±0.27 / 29.77 ms │ no change │
│ QQuery 13 │ 130.11 / 130.95 ±0.59 / 131.86 ms │ 129.85 / 130.40 ±0.61 / 131.59 ms │ no change │
│ QQuery 14 │ 514.00 / 516.70 ±2.34 / 520.49 ms │ 515.62 / 517.81 ±1.83 / 520.85 ms │ no change │
│ QQuery 15 │ 60.98 / 62.30 ±1.13 / 64.26 ms │ 61.55 / 62.85 ±1.57 / 65.82 ms │ no change │
│ QQuery 16 │ 7.03 / 7.19 ±0.21 / 7.58 ms │ 6.91 / 7.11 ±0.25 / 7.60 ms │ no change │
│ QQuery 17 │ 83.31 / 84.29 ±0.51 / 84.70 ms │ 83.51 / 84.94 ±1.35 / 87.30 ms │ no change │
│ QQuery 18 │ 156.97 / 159.60 ±2.87 / 164.78 ms │ 156.63 / 157.13 ±0.40 / 157.80 ms │ no change │
│ QQuery 19 │ 43.49 / 43.80 ±0.26 / 44.12 ms │ 41.70 / 42.13 ±0.36 / 42.78 ms │ no change │
│ QQuery 20 │ 37.66 / 38.05 ±0.35 / 38.70 ms │ 35.95 / 36.24 ±0.26 / 36.59 ms │ no change │
│ QQuery 21 │ 19.52 / 19.82 ±0.29 / 20.20 ms │ 18.21 / 18.60 ±0.27 / 18.94 ms │ +1.07x faster │
│ QQuery 22 │ 61.50 / 63.81 ±2.71 / 68.09 ms │ 63.04 / 63.76 ±0.52 / 64.44 ms │ no change │
│ QQuery 23 │ 478.06 / 484.21 ±7.05 / 492.85 ms │ 488.98 / 493.59 ±4.32 / 499.27 ms │ no change │
│ QQuery 24 │ 241.69 / 246.03 ±4.41 / 254.14 ms │ 243.59 / 245.34 ±1.43 / 247.51 ms │ no change │
│ QQuery 25 │ 118.02 / 119.64 ±1.19 / 121.14 ms │ 118.45 / 119.55 ±1.05 / 121.53 ms │ no change │
│ QQuery 26 │ 71.95 / 72.59 ±0.84 / 74.24 ms │ 71.48 / 71.98 ±0.48 / 72.89 ms │ no change │
│ QQuery 27 │ 7.04 / 7.13 ±0.15 / 7.43 ms │ 6.99 / 7.10 ±0.18 / 7.46 ms │ no change │
│ QQuery 28 │ 59.80 / 63.55 ±2.30 / 67.05 ms │ 58.56 / 62.43 ±2.92 / 66.13 ms │ no change │
│ QQuery 29 │ 102.92 / 105.49 ±2.14 / 109.12 ms │ 101.46 / 103.46 ±1.39 / 105.52 ms │ no change │
│ QQuery 30 │ 30.91 / 31.38 ±0.48 / 32.25 ms │ 30.69 / 31.12 ±0.38 / 31.79 ms │ no change │
│ QQuery 31 │ 112.39 / 112.86 ±0.41 / 113.49 ms │ 113.36 / 115.13 ±1.61 / 117.75 ms │ no change │
│ QQuery 32 │ 20.30 / 20.56 ±0.27 / 21.05 ms │ 20.88 / 21.13 ±0.16 / 21.36 ms │ no change │
│ QQuery 33 │ 39.14 / 39.54 ±0.30 / 40.03 ms │ 39.60 / 40.60 ±0.93 / 42.37 ms │ no change │
│ QQuery 34 │ 9.74 / 10.17 ±0.44 / 10.90 ms │ 10.21 / 10.75 ±0.35 / 11.24 ms │ 1.06x slower │
│ QQuery 35 │ 80.54 / 81.45 ±0.56 / 82.27 ms │ 81.67 / 82.47 ±0.57 / 83.45 ms │ no change │
│ QQuery 36 │ 6.43 / 6.56 ±0.18 / 6.91 ms │ 6.38 / 6.57 ±0.18 / 6.91 ms │ no change │
│ QQuery 37 │ 7.24 / 7.48 ±0.24 / 7.77 ms │ 7.14 / 7.29 ±0.09 / 7.43 ms │ no change │
│ QQuery 38 │ 68.05 / 69.28 ±0.75 / 70.23 ms │ 69.44 / 70.50 ±0.86 / 72.02 ms │ no change │
│ QQuery 39 │ 100.89 / 102.83 ±1.63 / 105.71 ms │ 101.32 / 103.37 ±2.28 / 106.43 ms │ no change │
│ QQuery 40 │ 23.63 / 24.12 ±0.32 / 24.60 ms │ 23.90 / 24.13 ±0.27 / 24.53 ms │ no change │
│ QQuery 41 │ 14.15 / 14.66 ±0.38 / 15.14 ms │ 14.54 / 14.69 ±0.17 / 15.00 ms │ no change │
│ QQuery 42 │ 24.53 / 24.63 ±0.10 / 24.82 ms │ 24.24 / 24.51 ±0.22 / 24.88 ms │ no change │
│ QQuery 43 │ 5.33 / 5.46 ±0.19 / 5.83 ms │ 5.33 / 5.50 ±0.15 / 5.78 ms │ no change │
│ QQuery 44 │ 11.03 / 11.24 ±0.19 / 11.58 ms │ 11.01 / 11.20 ±0.12 / 11.36 ms │ no change │
│ QQuery 45 │ 41.03 / 41.47 ±0.45 / 42.11 ms │ 41.59 / 42.43 ±0.66 / 43.50 ms │ no change │
│ QQuery 46 │ 13.88 / 14.28 ±0.29 / 14.66 ms │ 13.62 / 14.24 ±0.32 / 14.52 ms │ no change │
│ QQuery 47 │ 233.21 / 237.98 ±3.38 / 242.67 ms │ 238.03 / 242.61 ±4.98 / 251.64 ms │ no change │
│ QQuery 48 │ 104.28 / 105.08 ±0.54 / 105.94 ms │ 104.85 / 105.40 ±0.30 / 105.73 ms │ no change │
│ QQuery 49 │ 81.92 / 82.83 ±1.19 / 85.11 ms │ 83.41 / 84.37 ±1.26 / 86.85 ms │ no change │
│ QQuery 50 │ 63.09 / 64.11 ±0.96 / 65.60 ms │ 63.06 / 63.33 ±0.23 / 63.71 ms │ no change │
│ QQuery 51 │ 93.05 / 94.79 ±0.92 / 95.63 ms │ 92.99 / 96.13 ±2.35 / 100.18 ms │ no change │
│ QQuery 52 │ 24.84 / 25.11 ±0.34 / 25.71 ms │ 24.43 / 24.73 ±0.27 / 25.14 ms │ no change │
│ QQuery 53 │ 30.66 / 31.82 ±1.96 / 35.72 ms │ 30.91 / 31.38 ±0.48 / 32.03 ms │ no change │
│ QQuery 54 │ 55.42 / 55.79 ±0.24 / 56.03 ms │ 55.96 / 56.26 ±0.25 / 56.58 ms │ no change │
│ QQuery 55 │ 24.06 / 24.49 ±0.48 / 25.38 ms │ 24.37 / 24.85 ±0.39 / 25.57 ms │ no change │
│ QQuery 56 │ 40.39 / 40.82 ±0.40 / 41.57 ms │ 40.52 / 41.33 ±1.15 / 43.61 ms │ no change │
│ QQuery 57 │ 179.46 / 181.36 ±1.93 / 185.03 ms │ 180.33 / 181.67 ±1.80 / 185.12 ms │ no change │
│ QQuery 58 │ 118.14 / 119.58 ±1.13 / 120.87 ms │ 117.98 / 120.39 ±1.73 / 123.10 ms │ no change │
│ QQuery 59 │ 119.64 / 120.21 ±0.41 / 120.66 ms │ 120.41 / 121.02 ±0.59 / 121.95 ms │ no change │
│ QQuery 60 │ 40.31 / 40.77 ±0.44 / 41.51 ms │ 40.53 / 41.11 ±0.34 / 41.56 ms │ no change │
│ QQuery 61 │ 13.72 / 14.32 ±0.81 / 15.89 ms │ 13.77 / 14.53 ±1.08 / 16.65 ms │ no change │
│ QQuery 62 │ 47.94 / 48.33 ±0.25 / 48.60 ms │ 47.52 / 47.94 ±0.33 / 48.38 ms │ no change │
│ QQuery 63 │ 30.92 / 31.08 ±0.11 / 31.25 ms │ 30.68 / 31.17 ±0.33 / 31.72 ms │ no change │
│ QQuery 64 │ 480.35 / 483.59 ±2.28 / 486.62 ms │ 475.40 / 478.56 ±2.29 / 482.49 ms │ no change │
│ QQuery 65 │ 144.81 / 146.77 ±1.99 / 150.43 ms │ 144.77 / 145.86 ±1.14 / 148.05 ms │ no change │
│ QQuery 66 │ 83.71 / 85.86 ±2.22 / 89.86 ms │ 84.28 / 86.39 ±3.08 / 92.48 ms │ no change │
│ QQuery 67 │ 248.43 / 252.97 ±3.71 / 257.91 ms │ 256.79 / 263.58 ±6.88 / 275.76 ms │ no change │
│ QQuery 68 │ 13.79 / 14.17 ±0.25 / 14.51 ms │ 14.04 / 14.15 ±0.13 / 14.40 ms │ no change │
│ QQuery 69 │ 78.27 / 78.69 ±0.25 / 79.02 ms │ 77.09 / 78.13 ±0.95 / 79.60 ms │ no change │
│ QQuery 70 │ 108.84 / 113.84 ±6.90 / 126.96 ms │ 109.66 / 114.91 ±7.15 / 128.96 ms │ no change │
│ QQuery 71 │ 36.54 / 36.91 ±0.30 / 37.40 ms │ 36.14 / 36.49 ±0.31 / 36.87 ms │ no change │
│ QQuery 72 │ 2342.23 / 2376.08 ±28.92 / 2412.61 ms │ 2383.91 / 2454.17 ±56.48 / 2524.27 ms │ no change │
│ QQuery 73 │ 10.11 / 10.56 ±0.37 / 11.25 ms │ 10.20 / 10.44 ±0.20 / 10.79 ms │ no change │
│ QQuery 74 │ 196.78 / 201.95 ±3.43 / 207.32 ms │ 196.34 / 200.01 ±2.36 / 202.50 ms │ no change │
│ QQuery 75 │ 153.30 / 154.46 ±1.76 / 157.94 ms │ 153.46 / 154.13 ±0.52 / 154.87 ms │ no change │
│ QQuery 76 │ 36.72 / 37.16 ±0.49 / 38.10 ms │ 36.48 / 37.66 ±1.59 / 40.79 ms │ no change │
│ QQuery 77 │ 62.37 / 63.33 ±0.53 / 63.99 ms │ 64.11 / 64.69 ±0.62 / 65.85 ms │ no change │
│ QQuery 78 │ 199.48 / 201.70 ±2.85 / 206.96 ms │ 195.90 / 201.29 ±2.96 / 204.79 ms │ no change │
│ QQuery 79 │ 69.09 / 70.78 ±2.14 / 74.66 ms │ 69.16 / 69.45 ±0.22 / 69.84 ms │ no change │
│ QQuery 80 │ 105.95 / 106.68 ±0.54 / 107.44 ms │ 107.03 / 109.46 ±1.72 / 112.17 ms │ no change │
│ QQuery 81 │ 25.33 / 25.55 ±0.18 / 25.82 ms │ 25.57 / 26.80 ±1.41 / 29.49 ms │ no change │
│ QQuery 82 │ 17.15 / 17.48 ±0.22 / 17.81 ms │ 17.20 / 17.65 ±0.48 / 18.39 ms │ no change │
│ QQuery 83 │ 38.46 / 39.47 ±1.44 / 42.34 ms │ 38.38 / 38.84 ±0.30 / 39.23 ms │ no change │
│ QQuery 84 │ 44.18 / 45.59 ±1.47 / 48.39 ms │ 43.72 / 44.64 ±1.24 / 47.08 ms │ no change │
│ QQuery 85 │ 139.17 / 139.83 ±0.39 / 140.19 ms │ 137.56 / 139.53 ±2.61 / 144.69 ms │ no change │
│ QQuery 86 │ 25.78 / 26.71 ±1.25 / 29.15 ms │ 25.89 / 26.13 ±0.25 / 26.55 ms │ no change │
│ QQuery 87 │ 70.86 / 72.69 ±1.07 / 73.94 ms │ 70.12 / 71.01 ±0.69 / 72.21 ms │ no change │
│ QQuery 88 │ 65.96 / 66.45 ±0.33 / 67.00 ms │ 66.07 / 66.50 ±0.23 / 66.74 ms │ no change │
│ QQuery 89 │ 36.81 / 37.93 ±1.55 / 40.97 ms │ 36.60 / 36.85 ±0.16 / 37.03 ms │ no change │
│ QQuery 90 │ 18.34 / 18.56 ±0.15 / 18.75 ms │ 17.50 / 17.85 ±0.27 / 18.30 ms │ no change │
│ QQuery 91 │ 52.94 / 54.48 ±2.08 / 58.56 ms │ 52.34 / 52.87 ±0.31 / 53.16 ms │ no change │
│ QQuery 92 │ 30.07 / 30.63 ±0.45 / 31.21 ms │ 30.95 / 31.29 ±0.26 / 31.74 ms │ no change │
│ QQuery 93 │ 53.68 / 54.98 ±0.76 / 55.89 ms │ 53.94 / 55.17 ±1.04 / 56.59 ms │ no change │
│ QQuery 94 │ 39.15 / 39.52 ±0.30 / 39.98 ms │ 38.44 / 39.31 ±0.61 / 40.22 ms │ no change │
│ QQuery 95 │ 91.64 / 92.71 ±0.95 / 94.35 ms │ 90.59 / 91.76 ±1.00 / 93.50 ms │ no change │
│ QQuery 96 │ 24.98 / 25.21 ±0.15 / 25.45 ms │ 25.01 / 25.17 ±0.16 / 25.47 ms │ no change │
│ QQuery 97 │ 47.44 / 47.77 ±0.42 / 48.56 ms │ 47.78 / 48.38 ±0.40 / 48.93 ms │ no change │
│ QQuery 98 │ 43.66 / 44.08 ±0.37 / 44.73 ms │ 42.93 / 43.36 ±0.39 / 43.91 ms │ no change │
│ QQuery 99 │ 71.90 / 73.20 ±1.04 / 74.53 ms │ 71.69 / 72.67 ±1.55 / 75.75 ms │ no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD) │ 10923.98ms │
│ Total Time (topk_memory_batch) │ 11053.95ms │
│ Average Time (HEAD) │ 110.34ms │
│ Average Time (topk_memory_batch) │ 111.66ms │
│ Queries Faster │ 1 │
│ Queries Slower │ 1 │
│ Queries with No Change │ 97 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴────────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpcds — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 55.0s |
| Peak memory | 6.9 GiB |
| Avg memory | 6.2 GiB |
| CPU user | 255.9s |
| CPU sys | 6.6s |
| Peak spill | 0 B |
**tpcds — branch**
| Metric | Value |
|--------|-------|
| Wall time | 60.0s |
| Peak memory | 6.7 GiB |
| Avg memory | 6.0 GiB |
| CPU user | 259.6s |
| CPU sys | 6.3s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4453996106
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4453890106)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1 │ 39.24 / 40.44 ±1.50 / 43.12 ms │ 38.96 / 40.57 ±1.84 / 44.16 ms │ no change │
│ QQuery 2 │ 20.80 / 21.21 ±0.45 / 21.77 ms │ 20.87 / 21.08 ±0.24 / 21.53 ms │ no change │
│ QQuery 3 │ 35.41 / 36.08 ±0.45 / 36.65 ms │ 36.91 / 38.69 ±1.69 / 41.75 ms │ 1.07x slower │
│ QQuery 4 │ 17.63 / 17.72 ±0.07 / 17.81 ms │ 17.54 / 18.53 ±1.77 / 22.07 ms │ no change │
│ QQuery 5 │ 44.06 / 45.55 ±1.50 / 48.26 ms │ 44.80 / 45.99 ±0.77 / 46.97 ms │ no change │
│ QQuery 6 │ 16.66 / 16.80 ±0.10 / 16.94 ms │ 16.78 / 17.37 ±0.79 / 18.90 ms │ no change │
│ QQuery 7 │ 50.56 / 52.68 ±1.92 / 55.59 ms │ 49.54 / 50.89 ±1.02 / 52.14 ms │ no change │
│ QQuery 8 │ 46.53 / 47.49 ±0.84 / 48.77 ms │ 46.37 / 47.25 ±0.98 / 48.93 ms │ no change │
│ QQuery 9 │ 51.34 / 52.56 ±0.92 / 54.02 ms │ 50.90 / 52.19 ±1.03 / 53.34 ms │ no change │
│ QQuery 10 │ 64.39 / 65.11 ±1.19 / 67.49 ms │ 64.09 / 64.62 ±0.47 / 65.48 ms │ no change │
│ QQuery 11 │ 13.65 / 13.95 ±0.22 / 14.22 ms │ 13.71 / 13.86 ±0.10 / 13.98 ms │ no change │
│ QQuery 12 │ 25.65 / 25.89 ±0.27 / 26.41 ms │ 25.63 / 25.75 ±0.16 / 26.06 ms │ no change │
│ QQuery 13 │ 34.99 / 35.88 ±0.98 / 37.76 ms │ 35.93 / 36.50 ±0.62 / 37.62 ms │ no change │
│ QQuery 14 │ 26.12 / 26.26 ±0.16 / 26.56 ms │ 26.03 / 26.21 ±0.21 / 26.47 ms │ no change │
│ QQuery 15 │ 31.76 / 32.49 ±1.02 / 34.52 ms │ 32.26 / 33.01 ±0.83 / 34.29 ms │ no change │
│ QQuery 16 │ 15.12 / 15.29 ±0.10 / 15.40 ms │ 15.28 / 15.39 ±0.10 / 15.57 ms │ no change │
│ QQuery 17 │ 76.75 / 78.18 ±2.09 / 82.29 ms │ 75.63 / 77.01 ±1.49 / 78.90 ms │ no change │
│ QQuery 18 │ 69.59 / 70.49 ±0.68 / 71.49 ms │ 69.00 / 69.96 ±0.65 / 70.56 ms │ no change │
│ QQuery 19 │ 36.23 / 36.49 ±0.22 / 36.80 ms │ 36.02 / 36.97 ±1.02 / 38.92 ms │ no change │
│ QQuery 20 │ 38.53 / 38.64 ±0.07 / 38.75 ms │ 38.21 / 38.87 ±0.48 / 39.64 ms │ no change │
│ QQuery 21 │ 58.64 / 60.05 ±1.01 / 61.46 ms │ 57.68 / 59.38 ±1.49 / 61.65 ms │ no change │
│ QQuery 22 │ 23.53 / 24.06 ±0.58 / 25.19 ms │ 23.60 / 24.10 ±0.57 / 25.20 ms │ no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD) │ 853.32ms │
│ Total Time (topk_memory_batch) │ 854.19ms │
│ Average Time (HEAD) │ 38.79ms │
│ Average Time (topk_memory_batch) │ 38.83ms │
│ Queries Faster │ 0 │
│ Queries Slower │ 1 │
│ Queries with No Change │ 21 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴──────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpch — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.5 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 31.5s |
| CPU sys | 2.3s |
| Peak spill | 0 B |
**tpch — branch**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.5 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 31.4s |
| CPU sys | 2.3s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4454759348
Benchmark for [this request](https://github.com/apache/datafusion/pull/20381#issuecomment-4453890106) hit the 7200s job deadline before finishing.
Benchmarks requested: `clickbench_partitioned`
<details><summary>Kubernetes message</summary>
```
Job was active longer than specified deadline
```
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417626352
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4417615444)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4417615444-4-875k4 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (dff9381e798c8d038ed391b6471ff21e0f6c3227) to 8741a77 (merge-base) [diff](https://github.com/apache/datafusion/compare/8741a7752c02f278394e9de1977da6d18f563f6d..dff9381e798c8d038ed391b6471ff21e0f6c3227) using: clickbench_partitioned
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417031140
🤖 Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4416959715)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4416959715-1-gd97l 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux`
<details><summary>CPU Details (lscpu)</summary>
```
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 topk_memory_batch (dff9381e798c8d038ed391b6471ff21e0f6c3227) to 8741a77 (merge-base) [diff](https://github.com/apache/datafusion/compare/8741a7752c02f278394e9de1977da6d18f563f6d..dff9381e798c8d038ed391b6471ff21e0f6c3227) using: clickbench_partitioned
Results will be posted here when complete
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417073505
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/20381#issuecomment-4416959715)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
<details><summary>CPU Details (lscpu)</summary>
```
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>
<details><summary>Details</summary>
<p>
```
Comparing HEAD and topk_memory_batch
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query ┃ HEAD ┃ topk_memory_batch ┃ Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1 │ 37.96 / 38.81 ±1.00 / 40.75 ms │ 38.32 / 39.54 ±1.10 / 40.86 ms │ no change │
│ QQuery 2 │ 20.24 / 20.56 ±0.27 / 20.93 ms │ 20.11 / 20.61 ±0.58 / 21.69 ms │ no change │
│ QQuery 3 │ 35.24 / 37.57 ±1.18 / 38.41 ms │ 34.73 / 36.07 ±1.35 / 37.72 ms │ no change │
│ QQuery 4 │ 17.37 / 17.62 ±0.20 / 17.85 ms │ 17.22 / 17.70 ±0.48 / 18.52 ms │ no change │
│ QQuery 5 │ 42.79 / 44.15 ±0.95 / 45.59 ms │ 42.60 / 43.71 ±1.01 / 45.34 ms │ no change │
│ QQuery 6 │ 16.25 / 16.68 ±0.64 / 17.91 ms │ 16.27 / 16.35 ±0.07 / 16.45 ms │ no change │
│ QQuery 7 │ 47.71 / 50.21 ±1.97 / 53.13 ms │ 49.86 / 50.82 ±0.55 / 51.36 ms │ no change │
│ QQuery 8 │ 45.07 / 45.32 ±0.18 / 45.57 ms │ 45.28 / 45.55 ±0.21 / 45.87 ms │ no change │
│ QQuery 9 │ 50.09 / 50.63 ±0.38 / 51.25 ms │ 49.90 / 51.09 ±0.91 / 52.36 ms │ no change │
│ QQuery 10 │ 63.16 / 64.45 ±1.31 / 66.63 ms │ 63.25 / 63.63 ±0.65 / 64.93 ms │ no change │
│ QQuery 11 │ 13.38 / 13.87 ±0.67 / 15.18 ms │ 13.31 / 13.56 ±0.16 / 13.78 ms │ no change │
│ QQuery 12 │ 25.22 / 26.01 ±1.06 / 28.06 ms │ 24.95 / 25.71 ±0.69 / 26.54 ms │ no change │
│ QQuery 13 │ 35.36 / 35.92 ±0.53 / 36.89 ms │ 35.47 / 36.86 ±1.10 / 38.82 ms │ no change │
│ QQuery 14 │ 25.70 / 25.77 ±0.08 / 25.92 ms │ 25.46 / 26.15 ±0.90 / 27.93 ms │ no change │
│ QQuery 15 │ 31.43 / 31.78 ±0.44 / 32.64 ms │ 31.09 / 31.61 ±0.59 / 32.77 ms │ no change │
│ QQuery 16 │ 14.63 / 14.90 ±0.15 / 15.05 ms │ 14.71 / 15.30 ±0.55 / 16.20 ms │ no change │
│ QQuery 17 │ 74.51 / 75.93 ±1.48 / 78.69 ms │ 74.78 / 75.96 ±0.90 / 77.31 ms │ no change │
│ QQuery 18 │ 68.14 / 68.80 ±0.34 / 69.03 ms │ 68.55 / 69.32 ±0.96 / 71.08 ms │ no change │
│ QQuery 19 │ 34.99 / 35.17 ±0.19 / 35.46 ms │ 34.83 / 35.30 ±0.45 / 35.97 ms │ no change │
│ QQuery 20 │ 37.74 / 38.19 ±0.37 / 38.65 ms │ 37.80 / 37.95 ±0.14 / 38.19 ms │ no change │
│ QQuery 21 │ 58.64 / 59.57 ±0.83 / 61.11 ms │ 56.85 / 59.86 ±1.66 / 61.48 ms │ no change │
│ QQuery 22 │ 22.86 / 23.33 ±0.28 / 23.64 ms │ 23.14 / 23.35 ±0.23 / 23.72 ms │ no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary ┃ ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD) │ 835.24ms │
│ Total Time (topk_memory_batch) │ 836.02ms │
│ Average Time (HEAD) │ 37.97ms │
│ Average Time (topk_memory_batch) │ 38.00ms │
│ Queries Faster │ 0 │
│ Queries Slower │ 0 │
│ Queries with No Change │ 22 │
│ Queries with Failure │ 0 │
└──────────────────────────────────┴──────────┘
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpch — base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.4 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 30.9s |
| CPU sys | 2.2s |
| Peak spill | 0 B |
**tpch — branch**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 5.5 GiB |
| Avg memory | 5.0 GiB |
| CPU user | 31.0s |
| CPU sys | 2.2s |
| Peak spill | 0 B |
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4417198380
```
TPCH: 835.24ms → 836.02ms ~0.09% slower
ClickBench: 19499.10ms → 19635.47ms ~0.70% slower
TPC-DS: 10729.08ms → 10701.14ms ~0.26% faster
```
I don't see a broad runtime win in these benchmark suites; the aggregate timings are essentially neutral/mixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Compact more aggressively in TopK based upon memory usage [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on PR #20381:
URL: https://github.com/apache/datafusion/pull/20381#issuecomment-4287289167
run benchmarks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org