Repository navigation
bench(parquet): measure ArrowWriter memory allocation - #11268
Merged
Merged
Conversation
Add a dedicated ArrowWriter memory benchmark to complement the timing suite with two distinct views of allocation behavior: incremental peak live memory and cumulative allocated bytes over each writer lifecycle. Measure writer construction, `write()`, and `close()`, including writer destruction, while excluding input construction and configuration cloning. Exercise a focused matrix of primitive, sparse, dictionary, run-end-encoded, and nested inputs across the default, Parquet 2.0, and content-defined chunking configurations. Keep tracking local to the benchmark through a thread-local allocator wrapper, so production allocator behavior remains unchanged. Signed-off-by: Hippolyte Barraud <hippolyte.barraud@datadoghq.com>
Contributor
Author
|
For reference, as of this PR, here are the results (all units MiB): |
ArrowWriter memory allocation
etseidl
approved these changes
Sep 28, 2026
etseidl
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Thanks @HippoBaro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
We do not track memory usage for the Parquet writer. Native REE support should improve memory usage materially so we need some bench harnesses to keep track of that over time.
Add a dedicated memory benchmark with two complementary measurements: incremental peak live memory and cumulative allocated bytes over a complete writer lifecycle.
What changes are included in this PR?
arrow_writer_peak_memoryCriterion benchmark with peak-live-memory and cumulative-allocation measurements.write(), andclose(), including writer destruction.The measurements target the synchronous, single-threaded writer; they are not whole-process resident-memory measurements. How memory usage is tracked is the same as the existing mechanism added in #9846.
Are these changes tested?
NA
Are there any user-facing changes?
NA