Jump to content

[arch-announce] Moving to Zstandard images by default on mkinitcpio


Recommended Posts

securitybreach
Quote

As linux-lts moved to the 5.10 version, all official kernels of Arch Linux now support zstd compressed initramfs images, so mkinitcpio is switching to zstd compressed images by default with version 30,
which is currently on [testing].

If, for any reason, you are using a kernel version prior to 5.9, make sure to change mkinitcpio.conf COMPRESSION to use one of the compressors supported, like gzip, otherwise you **will not** be able to
boot images generated by mkinitcpio.


https://www.archlinux.org/news/moving-to-zstandard-images-by-default-on-mkinitcpio/

Link to post
Share on other sites
abarbarian

Well mkinitcpio.conf tells you that gzip is the default compression program used already.

 

Quote

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used.

 

I made zstd the tool to use though,

 

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
 COMPRESSION="zstd"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

 

are there any extra COMPRESSION OPTIONS needed ? 😎

Link to post
Share on other sites
securitybreach
1 hour ago, abarbarian said:

I made zstd the tool to use though,

 

Any reason why?

Link to post
Share on other sites
abarbarian
22 hours ago, securitybreach said:

 

Any reason why?

 

Well packages are made with zstd now and it is apparently very fast.

 

https://archlinux.org/news/now-using-zstandard-instead-of-xz-for-package-compression/

 

Quote

zstd and xz trade blows in their compression ratio. Recompressing all packages to zstd with our options yields a total ~0.8% increase in package size on all of our packages combined, but the decompression time for all packages saw a ~1300% speedup

 

Arch Linux plans to use zstd as the default compression method  by ddos · March 25, 2019

 

Quote

Over the past few weeks, Arch Linux maintainers have compared different compression algorithms and eventually plan to use zstd instead of the default compression algorithm in devtools.

 

Quote

 

After a series of tests, the Arch team concluded that:

the benefits of `zstd -c -T0 -18 -` over `xz -c -z -` are:
– Massive speed gain in compression
– Massive speed gain in decompression
– Stable, reproducible multithreading
The speed gain in decompression substantially increases pacman’s package installation speed.

While the trade-offs would be:
– Minimal increase in compressed package size
– Increase in memory usage during compression

The required changeset is, i think:
PKGEXT=’.pkg.tar.zst’
COMPRESSZST=(zstd -c -T0 -18 -)

 

 

So with zstd already being used and now this mkinitcpio I thought why not.

 

I wondered if I could put something like ( -T0 -19) in here,


 

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
COMPRESSION_OPTIONS=(-T0 -19)

 

to get the fastest possible result. 😎

 

Edited by abarbarian
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...