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

Geert Hendrickx geert at hendrickx.be
Sat Feb 20 18:33:26 UTC 2021

On Fri, Feb 19, 2021 at 16:45:02 -0300, Giancarlo Razzolini via arch-general wrote:
> If you're using lz4 now, you might want to try zstd. It's faster to
> generate images now.

I benchmarked it on my mkinitcpio image, and zstd with mkinitcpio's
default compression level 19 (standard COMPRESSION_OPTIONS for zstd) is
several orders of magnitude slower than lz4, only to gain ~30% extra
compression.  It is slower to decompress too, but less noticeably so.

$ time lz4 -l initramfs-linux.img 
Compressed filename will be : initramfs-linux.img.lz4 
Compressed 11714560 bytes into 6595816 bytes ==> 56.30%                        

real    0m0.065s
user    0m0.043s
sys     0m0.019s

$ time zstd -19 -T0 initramfs-linux.img 
initramfs-linux.img  : 33.76%   (11714560 => 3954632 bytes,

real    0m8.173s
user    0m6.167s
sys     0m0.187s

$ rm initramfs-linux.img.zst 
$ time zstd -T0 initramfs-linux.img 
initramfs-linux.img  : 40.92%   (11714560 => 4793496 bytes,

real    0m0.127s
user    0m0.130s
sys     0m0.027s

Sticking to lz4 here.


More information about the arch-general mailing list