Hi,
Currently the --zstd and --compressor zstd only effect on initramfs
compression, --squash-compressor only effect on squash-root.img
compression. We don't want to compress initramfs and squash-root.img
both, because it is unnecessary, if doing so the squash-root.img will
be compressed 2 times, the 2nd compression ratio will be low and waste
the cpu time for decompression in vain.
So
if squashfs avaliable, --squash-compressor zstd will be passed.
squashfs-root.img will be compressed into zstd, and initramfs will not
be compressed.
if squashfs unavaliable --compress zstd will be passed, and initramfs
will be zstd compressed.
if squashfs avaliable, but --squash-compressor option not supported by
dracut(due to dracut version < 057), squashfs-root.img will be
compressed into default format(zlib).
Thanks,
Tao Liu
On Thu, Nov 24, 2022 at 10:30 AM Coiby Xu <coxu(a)redhat.com> wrote:
On Thu, Nov 24, 2022 at 10:12:14AM +0800, Coiby Xu wrote:
>On Tue, Nov 22, 2022 at 09:24:24AM +0800, Tao Liu wrote:
>>Hi Hari,
>>
>>On Mon, Nov 21, 2022 at 8:24 PM Hari Bathini <hbathini(a)linux.ibm.com>
wrote:
>>>
>>>If available, use 'zstd' compression method to optimize the size of
>>>the initrd built with fadump support. Also, 'squash+zstd' is not
>>>preferred because more disk space is consumed with 'squash+zstd' due
>>>to the additional binaries needed for fadump with squash case.
>>>
>>>Signed-off-by: Hari Bathini <hbathini(a)linux.ibm.com>
>>>---
>>>
>>>Changes in v2:
>>>* Updated changelog with why 'zstd' is used for fadump.
>>>
>>
>>Thanks for the update, the patch looks good to me.
>>
>>Acked-by: Tao Liu <ltao(a)redhat.com>
>
>Hi Tao,
>
>When trying to learn how squash affects the memory requirement of kdump,
>I notice currently for both F36 and F37, the initramfs is no longer
>compressed,
>
> [root@ci-vm-10-0-137-168 t]# file
/boot/initramfs-6.1.0-0.rc6.46.fc38.x86_64kdump.img
> /boot/initramfs-6.1.0-0.rc6.46.fc38.x86_64kdump.img: ASCII cpio archive (SVR4 with
no CRC)
> [root@ci-vm-10-0-139-47 ~]# file /boot/initramfs-6.0.9-200.fc36.x86_64kdump.img
>/boot/initramfs-6.0.9-200.fc36.x86_64kdump.img: ASCII cpio archive (SVR4 with no
CRC)
>
>This is fc1c79ff ("Seperate dracut and dracut-squash compressor for
>zstd") disabls passing "--compress zstd" to dracut when the squashfs
>dracut module is going to be used. Is the change intentional? If not,
>maybe we should drop this patch and do it in mkdumprd instead.
>
>Btw, it seems "--compress zstd" or "--zstd" no longer compresses
the
>initramfs in rawhide (2022-11-24) whereas in f36 it works as expected. Another
>difference between rawhide and f36 is in 36 with "--zstd" not specified,
>dracut will gzip-compress the initramfs while in rawhide, it doesn't
>compress the initramfs.
After having a further look, I realize the latter issue has nothing to
do with the difference between rawhide and f36. Once the dracut squash
module is enabled, "--compress zstd" will no longer work.
--
Best regards,
Coiby