perf: reuse Arrow IPC compression context across shuffle blocks - #5038
perf: reuse Arrow IPC compression context across shuffle blocks#5038peterxcli wants to merge 2 commits into
Conversation
|
Thanks @peterxcli. Can you share any benchmark results? |
|
@andygrove this would take effect only after #4888 is merged. with arrow 58.4:
with arrow 59.1:
|
|
@andygrove I've publish the benchmark, would appreciate it if you could take a look at this and see if we can get this merged. |
sunchao
left a comment
There was a problem hiding this comment.
LGTM. The mutable context stays with the buffered writer or row-conversion loop, while dictionary tracking and outer compression frames remain independent for each block.
I also compared the base and head writers using a focused Arrow 58.4 probe covering all four codecs, dictionary and schema changes, repeated flushes, and output failures. All seven tests passed. The Arrow-version dependency of the performance benefit is already covered in the benchmark discussion.
Which issue does this PR close?
Closes #5008.
Rationale for this change
Avoid recreating Arrow IPC compression state for every shuffle block.
What changes are included in this PR?
Reuse one
CompressionContextper buffered partition writer and across batches in the JVM row conversion path. Update benchmarks and callers accordingly.How are these changes tested?
Existing shuffle IPC round-trip, buffered writer, and shuffle scan tests pass. The shuffle writer benchmark also compiles successfully.