Skip to content

[Parquet] Over memory consumation for writer page v1 compressed #8526

@lilianm

Description

@lilianm

Describe the bug
High memory use

To Reproduce
Writer with compressed page with parquet v1

Expected behavior
Less memory use

Additional context

Buffer is not shrink after compression and Bytes don't change memory layout

let mut compressed_buf = Vec::with_capacity(uncompressed_size);
cmpr.compress(&buffer[..], &mut compressed_buf)?;
buffer = compressed_buf;

In my case uncompressed page ~1M and after compression ~20k It's lot of memory wasted

Before change

(3,639,172,424B) 0x41C901F: parquet::column::writer::GenericColumnWriter<E>::add_data_page (mod.rs:1070)
(876,240,384B) 0x41D2F36: parquet::column::writer::GenericColumnWriter<E>::add_data_page (mod.rs:1070)

For output file ~550M

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions