You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "rluvaton (via GitHub)" <gi...@apache.org> on 2026/10/18 12:02:17 UTC
[PR] perf: make `take_bytes` read sequential but write random. [arrow-rs]
rluvaton opened a new pull request, #11677:
URL: https://github.com/apache/arrow-rs/pull/11677
# Which issue does this PR close?
None
# Rationale for this change
Making `take_bytes` faster
the reasoning behind this impl is that reading in random order will lead to memory stalls while waiting to fetch from memory, writing in random does not since it is not waiting for memory to load
# What changes are included in this PR?
change `take_bytes` to read in
# Are these changes tested?
existing tests
# Are there any significant user-facing changes?
no
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: make `take_bytes` read sequential but write random. [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11677:
URL: https://github.com/apache/arrow-rs/pull/11677#issuecomment-6249931239
Hi @rluvaton, your benchmark configuration could not be parsed (https://github.com/apache/arrow-rs/pull/11677#issuecomment-6249930849).
**Error:** `invalid configuration: unknown field `BENCH_FILTER`, expected one of `env`, `baseline`, `changed`, `resources`, `shards` at line 1 column 3`
Usage:
```
run benchmark <name> # run specific benchmark(s)
run benchmarks # run default suite
run benchmarks <name1> <name2> # run specific benchmarks
```
Any benchmark name is accepted: `bench.sh` suite names (e.g. `tpch`, `clickbench_partitioned`, `wide_schema`) and Criterion bench targets (e.g. `sql_planner`) are resolved automatically. A name that matches neither fails on the runner.
Per-side configuration (`run benchmark tpch` followed by):
```yaml
env:
# shared env is inherited by BOTH the build and the run, so build
# flags go here. Builds default to no debuginfo for speed; opt back
# in for hung-job gdb dumps and cap jobs to stay within memory:
CARGO_PROFILE_RELEASE_DEBUG: "1"
CARGO_BUILD_JOBS: "1"
baseline:
ref: v45.0.0
env:
# per-side env only reaches the benchmark run, not the build
DATAFUSION_RUNTIME_MEMORY_LIMIT: 1G
changed:
ref: v46.0.0
env:
DATAFUSION_RUNTIME_MEMORY_LIMIT: 2G
```
Pod size and CPU architecture (each key is optional and keeps the default when absent; requests and limits are set equal):
```yaml
resources:
cpu: "16"
memory: "128Gi"
arch: arm64 # arm64 or amd64
```
Independent benchmark shards (optional; 1–8, default 1):
```yaml
run benchmark arrow_writer
shards: 4
```
Each shard builds both revisions, measures its assigned cases, and posts its own report. Resources and the job deadline apply per shard. DataFusion requests specifying a shard count greater than 1 fail with an error. Omit shards or use shards: 1 for DataFusion.
---
[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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: make `take_bytes` read sequential but write random. [arrow-rs]
Posted by "rluvaton (via GitHub)" <gi...@apache.org>.
rluvaton closed pull request #11677: perf: make `take_bytes` read sequential but write random.
URL: https://github.com/apache/arrow-rs/pull/11677
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: make `take_bytes` read sequential but write random. [arrow-rs]
Posted by "rluvaton (via GitHub)" <gi...@apache.org>.
rluvaton commented on PR #11677:
URL: https://github.com/apache/arrow-rs/pull/11677#issuecomment-6289632720
I've run some internal benchmarks as well and the perf was actually did not improve for some reason. weird. on paper it should have
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: make `take_bytes` read sequential but write random. [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11677:
URL: https://github.com/apache/arrow-rs/pull/11677#issuecomment-6249676746
🤖 Benchmark starting (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11677#issuecomment-6249676185)
**Target:** take_kernels
**Sharding factor: 1** (1 workers).
Comparing take-bytes-read-seq-write-seq (962e1b5f77768fc35ee34ef01a2a97d846254714) to 3658fc0 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/3658fc01e8fed4179d476aa3efc34b2723f89dd3..962e1b5f77768fc35ee34ef01a2a97d846254714)
<details><summary>Run configuration</summary>
```yaml
run benchmark take_kernels
shards: 1
```
</details>
Results will be posted when all workers finish.
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6249676185:start:22579ad5386902fa1f6f502d4b48aceb -->
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: make `take_bytes` read sequential but write random. [arrow-rs]
Posted by "rluvaton (via GitHub)" <gi...@apache.org>.
rluvaton commented on PR #11677:
URL: https://github.com/apache/arrow-rs/pull/11677#issuecomment-6249930849
run benchmark take_kernels
BENCH_FILTER: str
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: make `take_bytes` read sequential but write random. [arrow-rs]
Posted by "rluvaton (via GitHub)" <gi...@apache.org>.
rluvaton commented on PR #11677:
URL: https://github.com/apache/arrow-rs/pull/11677#issuecomment-6249676185
run benchmark take_kernels
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] perf: make `take_bytes` read sequential but write random. [arrow-rs]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #11677:
URL: https://github.com/apache/arrow-rs/pull/11677#issuecomment-6249903561
🤖 Benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/11677#issuecomment-6249676185)
**Target:** take_kernels
Comparing take-bytes-read-seq-write-seq (962e1b5f77768fc35ee34ef01a2a97d846254714) to 3658fc0 (merge-base) [diff](https://github.com/apache/arrow-rs/compare/3658fc01e8fed4179d476aa3efc34b2723f89dd3..962e1b5f77768fc35ee34ef01a2a97d846254714)
<details><summary>Run configuration</summary>
```yaml
run benchmark take_kernels
shards: 1
```
</details>
<details><summary>Details</summary>
```
group base changed
----- ---- -------
take bool 1024 1.03 609.9±2.30ns ? ?/sec 1.00 592.3±1.05ns ? ?/sec
take bool 512 1.00 348.7±0.61ns ? ?/sec 1.00 348.6±0.86ns ? ?/sec
take bool null indices 1024 1.06 844.8±9.97ns ? ?/sec 1.00 798.3±13.67ns ? ?/sec
take bool null values 1024 1.00 1081.4±3.79ns ? ?/sec 1.00 1085.3±1.40ns ? ?/sec
take bool null values null indices 1024 1.00 1130.8±0.93ns ? ?/sec 1.00 1132.7±1.48ns ? ?/sec
take check bounds i32 1024 1.01 659.0±1.18ns ? ?/sec 1.00 653.1±1.47ns ? ?/sec
take check bounds i32 512 1.02 456.1±1.17ns ? ?/sec 1.00 448.8±1.35ns ? ?/sec
take dense union 1024 1.01 7.6±0.01µs ? ?/sec 1.00 7.5±0.01µs ? ?/sec
take dense union 512 1.04 5.2±0.01µs ? ?/sec 1.00 5.0±0.01µs ? ?/sec
take fixed_size_list<i32>[22] 1024 1.00 3.4±0.00µs ? ?/sec 1.01 3.4±0.01µs ? ?/sec
take fixed_size_list<i32>[22] null indices 1024 1.00 6.1±0.01µs ? ?/sec 1.04 6.4±0.01µs ? ?/sec
take fixed_size_list<i32>[22] null values 1024 1.00 7.6±0.01µs ? ?/sec 1.01 7.6±0.01µs ? ?/sec
take fixed_size_list<i32>[8] 1024 1.00 2.5±0.01µs ? ?/sec 1.00 2.5±0.00µs ? ?/sec
take fixed_size_list<i32>[8] null indices 1024 1.00 4.1±0.00µs ? ?/sec 1.00 4.1±0.01µs ? ?/sec
take fixed_size_list<i32>[8] null values 1024 1.02 5.2±0.01µs ? ?/sec 1.00 5.1±0.01µs ? ?/sec
take fsb value len: 12, indices: 1024 1.00 1714.2±1.54ns ? ?/sec 1.09 1865.0±2.46ns ? ?/sec
take fsb value len: 12, null values, indices: 1024 1.00 2.3±0.00µs ? ?/sec 1.07 2.5±0.00µs ? ?/sec
take fsb value optimized len: 16, indices: 1024 1.00 586.9±1.19ns ? ?/sec 1.00 588.5±0.90ns ? ?/sec
take fsb value optimized len: 16, null values, indices: 1024 1.01 1193.2±1.41ns ? ?/sec 1.00 1183.3±1.27ns ? ?/sec
take i32 1024 1.02 522.8±1.29ns ? ?/sec 1.00 513.2±0.87ns ? ?/sec
take i32 512 1.01 351.6±6.09ns ? ?/sec 1.00 349.7±1.06ns ? ?/sec
take i32 null indices 1024 1.00 855.8±0.77ns ? ?/sec 1.01 864.8±5.65ns ? ?/sec
take i32 null values 1024 1.01 1121.0±3.17ns ? ?/sec 1.00 1111.8±1.42ns ? ?/sec
take i32 null values null indices 1024 1.00 1620.6±4.16ns ? ?/sec 1.00 1614.9±2.81ns ? ?/sec
take list i32 1024 1.01 5.0±0.06µs ? ?/sec 1.00 4.9±0.04µs ? ?/sec
take list i32 512 1.00 2.7±0.03µs ? ?/sec 1.00 2.7±0.02µs ? ?/sec
take list i32 null indices 1024 1.00 3.3±0.12µs ? ?/sec 1.02 3.3±0.12µs ? ?/sec
take list i32 null values 1024 1.00 4.0±0.12µs ? ?/sec 1.01 4.0±0.12µs ? ?/sec
take list i32 null values null indices 1024 1.00 7.0±0.04µs ? ?/sec 1.00 7.0±0.04µs ? ?/sec
take listview i32 1024 1.07 1031.9±0.95ns ? ?/sec 1.00 967.6±1.36ns ? ?/sec
take listview i32 512 1.00 591.4±1.06ns ? ?/sec 1.03 608.6±1.24ns ? ?/sec
take listview i32 null indices 1024 1.04 1675.7±1.37ns ? ?/sec 1.00 1605.1±1.63ns ? ?/sec
take listview i32 null values 1024 1.01 1545.7±1.35ns ? ?/sec 1.00 1523.8±1.92ns ? ?/sec
take listview i32 null values null indices 1024 1.01 2.4±0.00µs ? ?/sec 1.00 2.4±0.00µs ? ?/sec
take map<str, i32> 1024 1.00 33.3±0.03µs ? ?/sec 1.01 33.6±0.06µs ? ?/sec
take map<str, i32> 512 1.00 19.0±0.03µs ? ?/sec 1.00 19.0±0.02µs ? ?/sec
take map<str, i32> null indices 1024 1.00 19.6±0.02µs ? ?/sec 1.00 19.5±0.02µs ? ?/sec
take map<str, i32> null values 1024 1.00 19.6±0.03µs ? ?/sec 1.01 19.8±0.02µs ? ?/sec
take primitive run logical len: 1024, physical len: 512, indices: 1024 1.00 17.9±0.02µs ? ?/sec 1.00 17.9±0.01µs ? ?/sec
take sparse union 1024 1.00 7.7±0.01µs ? ?/sec 1.40 10.8±0.02µs ? ?/sec
take sparse union 512 1.00 4.7±0.01µs ? ?/sec 1.34 6.4±0.02µs ? ?/sec
take str 1024 1.00 8.1±0.01µs ? ?/sec 1.41 11.5±0.01µs ? ?/sec
take str 512 1.00 3.8±0.00µs ? ?/sec 1.51 5.8±0.01µs ? ?/sec
take str null indices 1024 1.00 4.4±0.06µs ? ?/sec 1.60 7.1±0.03µs ? ?/sec
take str null indices 512 1.00 2.1±0.03µs ? ?/sec 1.60 3.4±0.01µs ? ?/sec
take str null values 1024 1.00 4.5±0.05µs ? ?/sec 1.59 7.1±0.03µs ? ?/sec
take str null values null indices 1024 1.00 3.2±0.02µs ? ?/sec 1.52 4.8±0.01µs ? ?/sec
take string run logical len: 1024, physical len: 128, indices: 1024 1.00 23.5±0.02µs ? ?/sec 1.13 26.5±0.04µs ? ?/sec
take string run logical len: 1024, physical len: 512, indices: 1024 1.00 24.0±0.02µs ? ?/sec 1.14 27.4±0.04µs ? ?/sec
take string run logical len: 1024, physical len: 512, null indices: 1024 1.00 16.4±0.06µs ? ?/sec 1.12 18.3±0.02µs ? ?/sec
take stringview 1024 1.02 671.0±0.60ns ? ?/sec 1.00 658.3±0.66ns ? ?/sec
take stringview 512 1.16 470.4±0.42ns ? ?/sec 1.00 404.9±0.64ns ? ?/sec
take stringview null indices 1024 1.00 847.6±1.39ns ? ?/sec 1.00 848.4±1.00ns ? ?/sec
take stringview null indices 512 1.00 506.8±0.60ns ? ?/sec 1.00 506.4±1.07ns ? ?/sec
take stringview null values 1024 1.00 1227.4±0.97ns ? ?/sec 1.00 1223.6±1.11ns ? ?/sec
take stringview null values null indices 1024 1.00 1585.3±1.02ns ? ?/sec 1.00 1580.9±1.80ns ? ?/sec
take_record_batch 5 primitive cols no nulls 1024 1.03 2.8±0.01µs ? ?/sec 1.00 2.7±0.00µs ? ?/sec
take_record_batch 6 string/binary cols no nulls 1024 1.00 26.8±0.03µs ? ?/sec 1.51 40.5±0.10µs ? ?/sec
take_record_batch 7 mixed cols null values 1024 1.00 13.6±0.10µs ? ?/sec 1.35 18.3±0.06µs ? ?/sec
take_record_batch 7 mixed cols null values null indices 1024 1.00 13.6±0.06µs ? ?/sec 1.17 16.0±0.01µs ? ?/sec
```
</details>
<details><summary>Per-runner information</summary>
<details><summary>take_kernels — shard 1/1</summary>
**Node:** gk3-benchmark-cluster-nap-1we7yktk-741c906a-4mn5
**Instance:** c4a-highmem-16 (12 vCPU / 65 GiB)
**uname:**
```text
Linux bench-c6249676185-3564-wbvcm 6.12.94+ #1 SMP Fri Aug 21 08:00:16 UTC 2026 aarch64 GNU/Linux
```
**BENCH_COMMAND:**
```sh
cargo bench --features=arrow,async,test_common,experimental,object_store --bench take_kernels
```
<details><summary>CPU Details (lscpu)</summary>
```text
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>Resource Usage</summary>
**base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 580.1s |
| Peak memory | 19.5 MiB |
| Avg memory | 15.9 MiB |
| CPU user | 577.5s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
**branch**
| Metric | Value |
|--------|-------|
| Wall time | 580.1s |
| Peak memory | 19.6 MiB |
| Avg memory | 15.9 MiB |
| CPU user | 577.7s |
| CPU sys | 0.0s |
| Peak spill | 0 B |
</details>
</details>
</details>
---
[File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner
<!-- benchmark-request:6249676185:finish:49c1c359243562efdc4504d7e5c07d93 -->
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org