Do not store compressed uncompressible data #209

Closed
opened 2023-04-04 11:05:24 +00:00 by fyrchik · 3 comments
Owner

Zstd does not allow calculating supposed compressed data length.
However, if compressed data is bigger than uncompressed one, we can store uncompressed, should save us storage space and CPU cycles on decoding.

Zstd does not allow calculating supposed compressed data length. However, if compressed data is bigger than uncompressed one, we can store uncompressed, should save us storage space and CPU cycles on decoding.
fyrchik added the
frostfs-node
triage
labels 2023-04-04 11:05:24 +00:00
Owner

Should we "try" compressing some amount of payload and stop doing it when we see it makes no sense?

Should we "try" compressing some amount of payload and stop doing it when we see it makes no sense?
Author
Owner

I am not sure it will be faster, our objects have maximum size ~100MiB, synchronization efforts and trying to mess with zstd internals (which is parallel) can easily make it slower and harder to maintain.

I was thinking about using sync.Pool to avoid allocations, but first benchmarks showed no improvements.

I am not sure it will be faster, our objects have maximum size ~100MiB, synchronization efforts and trying to mess with zstd internals (which is parallel) can easily make it slower and harder to maintain. I was thinking about using `sync.Pool` to avoid allocations, but first benchmarks showed no improvements.
fyrchik added this to the v0.37.0 milestone 2023-04-11 08:20:55 +00:00
fyrchik removed the
triage
label 2023-04-14 09:18:05 +00:00
Author
Owner

Closed via #297

Closed via #297
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#209
No description provided.