Skip to content

bench(parquet): cover large dictionary values in arrow_reader - #10691

Merged
etseidl merged 1 commit into
apache:mainfrom
AarryaSaraf:bench-dict-large-values
Aug 19, 2026
Merged

bench(parquet): cover large dictionary values in arrow_reader#10691
etseidl merged 1 commit into
apache:mainfrom
AarryaSaraf:bench-dict-large-values

Conversation

@AarryaSaraf

@AarryaSaraf AarryaSaraf commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

None. This is benchmark coverage split out of #10690, so that the change
proposed there can be measured against a benchmark that already exists on main.
It covers the shape reported in #10694.

Rationale for this change

Every dictionary-encoded case in arrow_reader decodes ~20 byte values:
build_dictionary_encoded_string_page_iterator builds "Dictionary value {x}"
at 1% unique. Two properties of that shape keep the dictionary gather out of the
measurement entirely — values are small enough that per-key overhead dominates
(RLE index decoding, the per-key bounds check), and the dictionary is a couple of
KiB, so it stays cached for the whole decode.

Columns of large binary payloads invert both. A writer's dictionary size limit is
checked lazily, so such a column is often dictionary encoded all the way to the
end, with the dictionary page holding the entire column and each entry referenced
exactly once. The gather then gets its data from a source far too large to cache,
and it is the gather rather than the per-key work that dominates.

No benchmark in the crate covers that, so changes to
OffsetBuffer::extend_from_dictionary currently have nothing to be measured
against.

What changes are included in this PR?

One generator and one case in the existing BinaryArray group:

  • build_dictionary_encoded_large_value_page_iterator — 64 KiB values, all
    distinct, 128 per page, mandatory (no NULLs), otherwise the same row-group and
    page geometry as the existing generators.
  • arrow_array_reader/BinaryArray/dictionary encoded, mandatory, no NULLs, large values

One iteration decodes 64 MiB of output from a 32 MiB dictionary. Measured on
main (Apple M-series):

arrow_array_reader/BinaryArray/dictionary encoded, mandatory, no NULLs, large values
                        time:   [7.6857 ms 7.8982 ms 8.1303 ms]

Are these changes tested?

This is a benchmark. It asserts its decoded value count on each run, as the
surrounding cases do.

Are there any user-facing changes?

No.

AI disclosure

This benchmark was drafted with AI assistance and reviewed by me.

@github-actions github-actions Bot added the parquet Changes to the parquet crate label Aug 14, 2026

@etseidl etseidl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@etseidl

etseidl commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

run benchmark arrow_reader

env:
  BENCH_FILTER: large values

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5347285390-1770-sx8rl 6.12.85+ #1 SMP Wed Jun 17 20:31:55 UTC 2026 aarch64 GNU/Linux

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

Comparing bench-dict-large-values (142cc80) to b5794fb (merge-base) diff

Run configuration
run benchmark arrow_reader
env:
  BENCH_FILTER: "large values"

BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_reader
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

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

Comparing bench-dict-large-values (142cc80) to b5794fb (merge-base) diff

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

group                                                                                   bench-dict-large-values
-----                                                                                   -----------------------
arrow_array_reader/BinaryArray/dictionary encoded, mandatory, no NULLs, large values    1.00     41.5±0.56ms        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 51.4 MiB
Avg memory 9.2 MiB
CPU user 0.6s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 15.0s
Peak memory 190.3 MiB
Avg memory 126.0 MiB
CPU user 1.4s
CPU sys 11.6s
Peak spill 0 B

File an issue against this benchmark runner

@etseidl

etseidl commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

thanks @AarryaSaraf

@etseidl
etseidl merged commit f271113 into apache:main Aug 19, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants