Wiki - https://fedoraproject.org/wiki/Changes/InitrdZstdDefault Discussion thread https://discussion.fedoraproject.org/t/f43-change-proposal-compress-the-initrd-with-zstd-by-default-self-contained/157320
This is a proposed Change for Fedora Linux. This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee. == Summary == Use zstd to compress the initrd for all Fedora variants by default when built with dracut. == Owner == * Name/Email: [[User:Hricky | Hristo Marinov]], hri...@mail.bg * Name/Email: [[User:Siosm | Timothée Ravier]], si...@fedoraproject.org == Detailed Description == Since https://github.com/dracut-ng/dracut-ng/pull/385, dracut is now using zstd to compress the initrd by default. It does so only when the zstd binary is available (and not the library as this is a shell script), so right now on Fedora, most variants are still using xz compressed initrds by default (https://src.fedoraproject.org/rpms/dracut/blob/rawhide/f/dracut.spec#_100). This changes however as soon as users install zstd on their systems. The current zstd users are: * Fedora CoreOS which explicitly added zstd and set a compression with a specific ratio: ** https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/dracut/dracut.conf.d/60-coreos-zstd.conf ** https://github.com/coreos/fedora-coreos-config/pull/1844 * Some of the bootc images, which include zstd: ** https://gitlab.com/fedora/bootc/base-images/-/blob/main/standard/coreos-user-experience.yaml?ref_type=heads#L5 Other related issues: * https://gitlab.com/fedora/bootc/tracker/-/issues/17 * https://gitlab.com/fedora/ostree/sig/-/issues/34 * https://bugzilla.redhat.com/show_bug.cgi?id=1554931 For this change, we will replace the dependency in dracut from xz to zstd and we might configure a different compression ratio, potentially pushing that upstream, depending on feedback. == Feedback == None so far. We welcome testing for various compression ratios and comparing size of the initrd and speed of decompression (which matters on boot) on different hardware. See https://github.com/coreos/fedora-coreos-tracker/issues/1247#issuecomment-1179490347 for an example. == Benefit to Fedora == Smaller initrd and faster boots. See https://github.com/coreos/fedora-coreos-tracker/issues/1247#issuecomment-1179490347 for some measurements. We did the change in Fedora CoreOS to reduce the size of the initrd to save disk space in the `/boot` partition. == Scope == * Proposal owners: Replace dependency on `xz` by `zstd` in `dracut` to enable `zstd` by default * Other developers: Make sure that their tools still work with the new compression algorithm * Release engineering: [https://pagure.io/releng/issues #Releng issue number] TBD but nothing should be needed here * Policies and guidelines: N/A (not needed for this Change) * Trademark approval: N/A (not needed for this Change) * Alignment with the Fedora Strategy: N/A, it's a general improvement == Upgrade/compatibility impact == There should be no impact for most users as the decompression of the initrd is handled by the kernel and it has had support for zstd for a while now. Users of custom kernels should make sure this is supported in their configs. Existing installations will be updated to use zstd by default. No manual action should be required. Users that want to keep using xz for compressing the initrd can configure it in their dracut config. == Early Testing (Optional) == Do you require 'QA Blueprint' support? N == How To Test == On package mode systems: # Install zstd: `dnf install -y zstd` # Rebuild the initrd: `dracut <path to initrd>` or `dracut --regenerate-all` to do it for all kernel versions (make a backup to compare sizes, etc.) # Validate that it is zstd compressed: `LANG=C grep -aUPq "\x28\xb5\x2f\xfd" <path to initrd> && echo "using zstd" || echo "not using zstd"` # Reboot For ostree image systems, you should wait until the change lands in Rawhide or build your own, including the configuration from Fedora CoreOS as an example. For bootable container image mode systems, you can install zstd and rebuild the initrd in a Containerfile and switch/rebase your system to it. == User Experience == There should be no change in user experience beyond slightly faster boots. == Dependencies == No other dependencies as far as the authors know right now. == Contingency Plan == * Contingency mechanism: (What to do? Who will do it?) Revert the change * Contingency deadline: Final freeze * Blocks release? No == Documentation == To be written if accepted. == Release Notes == To be written if accepted. Discussion thread - This is a proposed Change for Fedora Linux. This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee. -- Aoife Moloney Fedora Operations Architect Fedora Project Matrix: @amoloney:fedora.im IRC: amoloney -- _______________________________________________ devel-announce mailing list -- devel-annou...@lists.fedoraproject.org To unsubscribe send an email to devel-announce-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel-annou...@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue -- _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue