ZSTD compression-level when CONFIG_MODULE_COMPRESS_ZSTD=y

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

 



Hi,

I am a big fan of ZSTD - here version 1.5.6 on Debian/unstable AMD64.

When playing with CONFIG_MODULE_COMPRESS_ZSTD=y I observed a 35MiB
greater linux-image Debian file.

Debian: ~100MiB <--- CONFIG_MODULE_COMPRESS_XZ=y
Selfmade: ~135MiB <--- CONFIG_MODULE_COMPRESS_ZSTD=y

So, I checked the used compression-level of ZSTD in the build-process:

[ vmlinux.bin.zst ]
$ grep zstd build-log_6.10.1-1-amd64-clang18-kcfi.txt | grep vmlinux.bin.zst
 { cat arch/x86/boot/compressed/vmlinux.bin
arch/x86/boot/compressed/vmlinux.relocs | zstd -22 --ultra; printf
\370\040\157\003; } > arch/x86/boot/compressed/vmlinux.
bin.zst

[ amdgpu.ko.zst ]
$ grep zstd build-log_6.10.1-1-amd64-clang18-kcfi.txt | grep '\-T0' |
grep amdgpu
 zstd -T0 --rm -f -q
debian/linux-image-6.10.1-1-amd64-clang18-kcfi/lib/modules/6.10.1-1-amd64-clang18-kcfi/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko

Here some numbers:

[ Values in KiB ]
$ du -k amdgpu.ko*
29264   amdgpu.ko
5672    amdgpu.ko.zst <--- XXX: -T0
4264    amdgpu.ko.zst_T0-19 <--- XXX:  -T0 -19
4260    amdgpu.ko.zst_T0-22
4308    amdgpu.ko.zst_T0-22-ultra

$ time zstd -T0 -v amdgpu.ko
*** Zstandard CLI (64-bit) v1.5.6, by Yann Collet ***
Note: 2 physical core(s) detected
zstd: amdgpu.ko.zst already exists; overwrite (y/n) ? y
amdgpu.ko            : 19.38%   (  28.6 MiB =>   5.54 MiB, amdgpu.ko.zst)

real    0m2,496s
user    0m0,448s
sys     0m0,064s

$ time zstd -T0 -19 -v amdgpu.ko
*** Zstandard CLI (64-bit) v1.5.6, by Yann Collet ***
Note: 2 physical core(s) detected
amdgpu.ko            : 14.56%   (  28.6 MiB =>   4.16 MiB, amdgpu.ko.zst)

real    0m22,821s
user    0m22,759s
sys     0m0,080s

My wish is to use the zstd-option "-T0" (see vmlinux.bin.zst) everywhere.

For CONFIG_MODULE_COMPRESS_ZSTD=y: Add compress-level = -19

NOTE: -22 w/ or w/o ultra has no big effect here and increases even
more build-time.

What do you think?

Thanks.

Best regards,
-Sedat-




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux