[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#976054: marked as done (initramfs-tools: [RFC] Compress initramfs file with zstd)



Your message dated Sun, 10 Apr 2022 22:04:35 +0000
with message-id <E1ndfff-0006iu-2j@fasolo.debian.org>
and subject line Bug#976054: fixed in initramfs-tools 0.141
has caused the Debian Bug report #976054,
regarding initramfs-tools: [RFC] Compress initramfs file with zstd
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
976054: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976054
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initramfs-tools
Version: 0.139
Severity: normal
Tags: patch

Dear Maintainer,

Now initramfs files are compressed with gzip
But we can use other compression, i.e. LZO, LZ4 and ZSTD.
Then which one is the best?

* compression ratio
   ZSTD > GZIP > LZO > LZ4

* decompression speed
   LZ4 > LZO = ZSTD > GZIP

I suggest to choose ZSTD, instead of GZIP since
 - better compression ratio than current GZIP
 - also better decompresion speed than current GZIP


------------------------------------------------------------------------------
With gzip
------------------------------------------------------------------------------

$ file /boot/initrd.img-5.9.0-*
/boot/initrd.img-5.9.0-3-amd64: gzip compressed data, from Unix, original size modulo 2^32 197680640
/boot/initrd.img-5.9.0-4-amd64: gzip compressed data, from Unix, original size modulo 2^32 197594112

$ du -h /boot/initrd.img-5.9.0-*
59M     /boot/initrd.img-5.9.0-3-amd64
59M     /boot/initrd.img-5.9.0-4-amd64

------------------------------------------------------------------------------
With zstd
------------------------------------------------------------------------------

$ file /boot/initrd.img-5.9.0-*
/boot/initrd.img-5.9.0-3-amd64: Zstandard compressed data (v0.8+), Dictionary ID: None
/boot/initrd.img-5.9.0-4-amd64: Zstandard compressed data (v0.8+), Dictionary ID: None

$ du -h /boot/initrd.img-5.9.0-*
40M     /boot/initrd.img-5.9.0-3-amd64
40M     /boot/initrd.img-5.9.0-4-amd64
------------------------------------------------------------------------------

Yes, 59MB initramfs file becomes 40MB (2/3)! plus bonus, better decompression speed.


However, there's a problem to do so - zstd package's Priority is not standard one 
- it's "optional". 

> Package: gzip
> Version: 1.10-2
> Priority: required

> Package: zstd
> Version: 1.4.5+dfsg-4
> Priority: optional

It means there is not zstd package in every environment. And, just raise its Priority
means bloat minimal system size that is a problem we want to avoid.

Now initramfs-tools has a hack to avoid zstd (and other compression tools)
absence in mkinitramfs command.

> if ! command -v "${compress}" >/dev/null 2>&1; then
>         compress=gzip
>         echo "No ${compress} in ${PATH}, using gzip"
> fi

Set COMPRESS=zstd in /etc/initramfs/initramfs.conf and no zstd installed,
there's no problem.

> $ sudo update-initramfs -u
> update-initramfs: Generating /boot/initrd.img-5.9.0-4-amd64
> No zstd in /usr/bin:/sbin:/bin, using gzip

 (abobe message is patched with #971270)


So, just set default compression as zstd can brings better result for many users,
IMO (Not sure raising zstd package Priority (to standard) is required or not).
>From 78c4fe32a447b0dc46045f0c8a32a4b246691711 Mon Sep 17 00:00:00 2001
From: Hideki Yamane <henrich@debian.org>
Date: Sun, 29 Nov 2020 10:05:48 +0900
Subject: [PATCH] Use zstd as default compression for initramfs

---
 conf/initramfs.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/conf/initramfs.conf b/conf/initramfs.conf
index 01bdd85..a0c051b 100644
--- a/conf/initramfs.conf
+++ b/conf/initramfs.conf
@@ -41,7 +41,7 @@ KEYMAP=n
 # COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz | zstd ]
 #
 
-COMPRESS=gzip
+COMPRESS=zstd
 
 #
 # DEVICE: ...
-- 
2.29.2


--- End Message ---
--- Begin Message ---
Source: initramfs-tools
Source-Version: 0.141
Done: Ben Hutchings <benh@debian.org>

We believe that the bug you reported is fixed in the latest version of
initramfs-tools, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 976054@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ben Hutchings <benh@debian.org> (supplier of updated initramfs-tools package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 10 Apr 2022 23:39:45 +0200
Source: initramfs-tools
Architecture: source
Version: 0.141
Distribution: unstable
Urgency: medium
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: Ben Hutchings <benh@debian.org>
Closes: 911727 976054 980788 981302 992798
Changes:
 initramfs-tools (0.141) unstable; urgency=medium
 .
   [ Hideki Yamane ]
   * [742c8ee] Use zstd as default compression for initramfs (Closes: #976054)
   * [b6ccfb6] Recommends: s/pigz/zstd/
   * [1063c43] Add check whether zstd support kernel (>= 5.9) and
     CONFIG_RD_ZSTD=y or not
   * [71c29fd] As comparison, compression level 9 is better.
   * [9cee2f0] Consider SOURCE_DATE_EPOCH option for zstd
 .
   [ Alper Nebi Yasak ]
   * [db7aec4] hook-functions: Include io-domain in dw_mmc-rockchip hidden
     dependencies
 .
   [ Michael Biebl ]
   * [7ec5e26] Setup /dev/fd and /dev/std{in,out,err} after mounting devtmpfs
     (Closes: #981302)
 .
   [ Dan Streetman ]
   * [116b532] hook-functions: check for dir before running find on it
     (LP: #1927779)
 .
   [ Vagrant Cascadian ]
   * [a5d9b32] hook-functions: Add pwm-rockchip to "fb" modules for Pinebook PRO
     LCD display.
   * [7e15676] hook-functions: Add usb/typec/tcpm modules to support keyboard on
     Pinebook PRO.
   * [5f17c03] hook-functions: Add panel-edp to "fb" modules for Pinebook PRO
     LCD display.
 .
   [ Ben Hutchings ]
   * [26f2f00] Only run shellcheck in Salsa CI (Closes: #992798)
   * [bd1519b] Fix shellcheck warning "Avoid x-prefix in comparisons ..."
   * [4937118] hook-functions: Fix shellcheck warning "Expansions inside ${..}
     need to be ..."
   * [883f4ad] mkiniramfs: Log warning about missing compressor to stderr
   * [035190c] mkinitramfs: Generalise kernel compression support check
   * [58e05e4] d/salsa-ci.yml: Disable non-arch:all builds
   * [5679e26] debian/tests/control: Add zstd as dependency to avoid (fatal)
     warnings
   * [e856af4] hook-functions: Support network boot via USB Ethernet adapters
     (Closes: #980788)
   * [ec5c6c7] scripts/functions: Refactor device name logic in
     configure_networking
   * [80eddcf] scripts/functions: Make configure_networking wait for device
     specified any way (Closes: #911727)
 .
   [ Ben Love ]
   * [02dc65f] Fully-qualify modprobe calls to avoid busybox
 .
   [ Ariel D'Alessandro ]
   * [8a6f73c] hook-functions: Add nvmem-imx-ocotp driver module to network boot
Checksums-Sha1:
 c3ab8b345c611972360b746a13abaf6712b37a3f 1915 initramfs-tools_0.141.dsc
 524bf796d518fd84ee51729e6348e70bab4ff29f 96204 initramfs-tools_0.141.tar.xz
 10d88857892a41ec3f5e86b32acf5f89c43c74f9 6894 initramfs-tools_0.141_source.buildinfo
Checksums-Sha256:
 f2d52c921bd6cefa5510f83869365f3fd6bb04c1014814d15980140527c78eb7 1915 initramfs-tools_0.141.dsc
 4c0cf036c460592bfde4b8304c0ffed9df0d48518c340b769f52c6f5da6f8d7b 96204 initramfs-tools_0.141.tar.xz
 4baaab5219ec57795652cabf5d35aae8be5273402e756a223eb9b0aadc15b585 6894 initramfs-tools_0.141_source.buildinfo
Files:
 dae00d94def55b51b46b49fc79f1d11d 1915 utils optional initramfs-tools_0.141.dsc
 787170841ea2c9d8d398c4c04368cd64 96204 utils optional initramfs-tools_0.141.tar.xz
 12ba134a3200fc30f8b6329644cd2d09 6894 utils optional initramfs-tools_0.141_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAmJTUFcACgkQ57/I7JWG
EQka+w//e3QIpJDqdIMTLmVZjHvL1ZY9uN2TzveY4h60DLqVhumHfnr6KLSD51tW
FjnHkGGkVU/TBZq8YCZ1cZf+GkmRAMm5qtb9uOqugz3DqVM3t2OQ2MEIp3MVJRCf
mJGEjKWyGgawId+YNNVU9Cxdz3VnmpKJM+eD4wcqRt9L/Qr+WEzgewcVqbLpJlvM
Gist7BQwmAO3rjBLMhpMlDcSJHy9k+JKlWWr8V/sjjlY5OJj/oOUuAVGbyXB7iAT
i2WW867JW6nncX3X/OUt5PtKcW+J31k6oj/+BASGvarqtl7D5Fdwmd6Qj5AfICRo
DyI/WtPWCebJQtW0AUPKBGcXIumGJQ5eoKIb37aVcImM1p1pIrcm5QPoLX0aHL3H
NT6TdMzM4JVZe2QXp1bVRkvQJepS+5az069s6QFzM/UQqU2S7KJgmZq3O7EsmO6W
o99xQA6k3/5G5ubxcpeSbTohueaopk/ZuFE70v/uZr5HQr9n9kWq5n0j3+smLtRj
KotI9MZ/i14PYrYFqMYDGWlELmRTztIrpwAlYIYUTMLZoDFtVZFINIPQkyTxVG+E
vuw85Z1DdgDz4cXPvdNadUOYrB21nFhVmiIriiPj54qmCMVcXdl+gsoSsxQ+RMWY
8y4s150OzS/vqeJF/noCo9xppgrUNBepNZdBJPsAesFKrtWSHm8=
=FqF7
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: