Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZSTD Decompression Speed vs Compression Level #4091

Closed
VipulGarg869 opened this issue Jul 5, 2024 · 3 comments
Closed

ZSTD Decompression Speed vs Compression Level #4091

VipulGarg869 opened this issue Jul 5, 2024 · 3 comments
Assignees
Labels

Comments

@VipulGarg869
Copy link

I have been benchmarking the decompression speed of ZSTD at various compression levels. The documentation states that the decompression speed doesn't change much with the compression level. While that is roughly the case, I was still able to find that the decompression speed decreases up till compression level 6. Beyond level 6, it increases. What is the reason for this?

@Cyan4973 Cyan4973 self-assigned this Jul 5, 2024
@Cyan4973
Copy link
Contributor

Cyan4973 commented Jul 5, 2024

A variation in the number of sequences produced.

Best decompression speed is typically achieved at level 15, though some sources may prefer level 1.

@VipulGarg869
Copy link
Author

Thanks for your reply.
How does the compression level affect the number of sequences produced? I believe that the parameters that compression levels affect increase/decrease in a monotonic manner as we increase the compression level. What then leads to the decompression being slowest at level 5/6?

@Cyan4973
Copy link
Contributor

This is more complex than that, and is difficult to summarize in one sentence.
libzstd produces one format, but actually consists of a collection of different algorithms, each with their own speed / ratio trade offs to occupy their slot in the curve.
One would have to look at the implementation details of each variant to understand why the nb of produced sequences differ per algorithm, and in the end, it makes sense. But it's way more complex than a simple monotonic increase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants