Closed alamb closed 2 months ago
BTE there is already https://docs.rs/parquet/latest/parquet/arrow/arrow_writer/struct.ArrowWriter.html#method.in_progress_size but that only accounts for the actual parquet data in progress, not any internal buffering structures in the writer itself
can I take it?
That would be amazing -- thank you @Rachelint
I'll be on the lookout for a PR -- please ping me when you are ready for feedback
I'll be on the lookout for a PR -- please ping me when you are ready for feedback
ok!
@wiedld made a PR for this feature: https://github.com/apache/arrow-rs/pull/5967 as well
@wiedld made a PR for this feature: #5967 as well
ok, planned to code it in weekend, so still no codes
@wiedld made a PR for this feature: #5967 as well
ok, planned to code it in weekend, so still no codes
Thanks @Rachelint -- maybe you could help review https://github.com/apache/arrow-rs/pull/5967 if you are still interested
Draft PR is up and undergoing code review. Please assign to me.
Is your feature request related to a problem or challenge? Please describe what you are trying to do. When writing parquet files, depending on the writer settings and the data being written, we have observed the ArrowWriter consuming large amounts of memory (10s of GB) -- see https://github.com/apache/arrow-rs/issues/5828
The memory usage of parquet writers also often comes up in the context of proposals for new parquet formats
There is already a discussion about how to limit memory when writing here https://docs.rs/parquet/latest/parquet/arrow/arrow_writer/struct.ArrowWriter.html#memory-limiting
However there is now way currently to get a measurement of actual current use (that we could use to abort the write, for example).
Describe the solution you'd like
I would like some way to get to have some visibility on the current memory usage of the internal buffering in the parquet writer
Describe alternatives you've considered I propose adding a function to ArrowWriter modeled on Array::get_array_memory_size
Additional context Here is one ticket that describes one non trivial source of memory usage https://github.com/apache/arrow-rs/issues/5828 so the indices should be included.