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

FreeBSD 13.1 is EOL, switch to zstd? #2277

Open
cgull opened this issue Apr 20, 2024 · 3 comments
Open

FreeBSD 13.1 is EOL, switch to zstd? #2277

cgull opened this issue Apr 20, 2024 · 3 comments

Comments

@cgull
Copy link
Contributor

cgull commented Apr 20, 2024

FreeBSD 13.1 has been EOL for 8 months. Is it time to switch the default compression from xz to zstd on 13.x yet?

FWIW, I've been recompressing all FreeBSD dist tarballs, and all packages except pkg itself, to zstd for 13.x for a couple of years on 13.x, with no problems that I can recall.

@rilysh
Copy link
Contributor

rilysh commented Apr 24, 2024

In a quick look, zstd seems significantly faster in compression and decompression (almost) whereas xz is significantly slower in compression but on decompression it's almost as fast as zstd. The only (probably ignorable) downside seems to is that zstd compressed result is quite larger than the xz compressed result.

@cgull
Copy link
Contributor Author

cgull commented Apr 25, 2024

You need to look deeper. pkg and FreeBSD have already switched to zstd for 14.0-RELEASE.

zstd's default compression parameters produce worse compression than xz (but it's very fast). But it is not hard to select compression parameters that get similar compression times and smaller file sizes than xz. zstd decompression is always much faster than xz (around 10x), and compression parameters don't change decompression performance much.

Try zstd --19 --long, for example.

I haven't looked at the choices made for FreeBSD 14 and pkg.

@rilysh
Copy link
Contributor

rilysh commented Apr 25, 2024

I don't think overriding the default will yield anything significant for data that can't be compressed any further. Disk space isn't a vital thing nowadays so in most cases the default compression is just fine.

For decompression, it's not exactly 10x faster, and mostly depends on the archive size that it's trying to decompress. For smaller archives xz decompression speed is similar to zstd.

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

No branches or pull requests

2 participants