Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

sys-kernel/coreos-modules: switch to gzip/zstd compression #1136

Merged
merged 1 commit into from Jul 28, 2021

Conversation

pothos
Copy link
Contributor

@pothos pothos commented Jul 27, 2021

sys-kernel/coreos-modules: switch to gzip/zstd compression

With the default gzip compression the 60 MB limit for the vmlinuz
bundle of kernel+initramfs was reached. The limit comes from the size
of the /boot partition which is 128 MB large and the kernel needs to
fit twice, in addition to GRUB.

Use zstd for the initramfs as it provides a similar speed but better
compression. For the kernel we can't switch yet to zstd for arm64
but for amd64 it works.

Fixes flatcar/Flatcar#438

How to use/testing done

With zstd for both on amd64 I got a reduction of 13 MB for the vmlinuz file (new size is 49 MB, Alpha 2920.0.0 is 62 MB). Since that didn't work with arm64 I changed arm64 to continue to use no compression (default) for the kernel and zstd for initramfs, this just just a 5 MB reduction (new size is 54 MB, old is 59 MB).

http://jenkins.infra.kinvolk.io:8080/job/os/job/manifest/3138/cldsv/

With the default gzip compression the 60 MB limit for the vmlinuz
bundle of kernel+initramfs was reached. The limit comes from the size
of the /boot partition which is 128 MB large and the kernel needs to
fit twice, in addition to GRUB.

Use zstd for the initramfs as it provides a similar speed but better
compression. For the kernel we can't switch yet to zstd for arm64
but for amd64 it works.
@pothos pothos changed the title sys-kernel/coreos-modules: switch to zstd/xz compression sys-kernel/coreos-modules: switch to gzip/zstd compression Jul 27, 2021
@pothos pothos requested a review from a team July 27, 2021 18:33
@pothos pothos marked this pull request as ready for review July 27, 2021 18:33
Copy link
Contributor

@jepio jepio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Contributor

@dongsupark dongsupark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Side note: I was wondering if we should do the same thing for arm64.
However, apparently arm64 still needs uncompressed Kernel, according to the discussion. https://bugs.gentoo.org/784599

@pothos pothos merged commit 9b12548 into main Jul 28, 2021
@pothos pothos deleted the kai/vmlinuz-compression branch July 28, 2021 09:29
@pothos
Copy link
Contributor Author

pothos commented Jul 28, 2021

Thanks for the correction, I assumed it uses GZIP and was confused why switching to something similarly supported didn't work

pothos added a commit that referenced this pull request Aug 9, 2021
sys-kernel/coreos-modules: switch to gzip/zstd compression
pothos added a commit that referenced this pull request Aug 9, 2021
sys-kernel/coreos-modules: switch to gzip/zstd compression
@pothos
Copy link
Contributor Author

pothos commented Aug 9, 2021

Ported to 2905 and 2942 maintenance branches

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants