Size

This is an old revision of the document!


Kernel compression methods: GZIP, bzip2, LZMA, XZ, LZO,LZ4,ZSTD

ls -s bzImage 

XZ:

4276 bzImage

LZO:

5988 arch/x86/boot/bzImage

LZMA:

4584 arch/x86/boot/bzImage
[easto@cupcake][/opt/snacklinux_rootfs]$ find . -print | cpio -o -H newc --quiet | gzip -9 > rootfs.gz
cpio: File ./rootfs.gz grew, 1048576 new bytes not copied
[easto@cupcake][/opt/snacklinux_rootfs]$ ls -s rootfs.gz 
7812 rootfs.gz
[easto@cupcake][/opt/snacklinux_rootfs]$ find . -print | cpio -o -H newc --quiet | gzip > rootfs.gz
cpio: File ./rootfs.gz grew, 1064960 new bytes not copied
[easto@cupcake][/opt/snacklinux_rootfs]$ ls -s rootfs.gz 
7852 rootfs.gz

rootfs compression: xz vs gzip

[easto@cupcake][~/snacklinux]$ make TARGET=i486 iso
cd /opt/snacklinux_rootfs/; find . -print | cpio -o -H newc --quiet | xz > /home/easto/snacklinux/rootfs.xz
wait
mv rootfs.xz boot/isolinux
/usr/bin/genisoimage -l -J -R -input-charset utf-8 -b isolinux/isolinux.bin -c isolinux/boot.cat  -no-emul-boot -boot-load-size 4 -boot-info-table -o   iso/snacklinux_i486_`date +'%d.%m.%y'`.iso boot
Size of boot image is 4 sectors -> No emulation
 92.50% done, estimate finish Mon Dec 19 02:44:43 2022
Total translation table size: 2048
Total rockridge attributes bytes: 954
Total directory bytes: 2408
Path table size(bytes): 26
Max brk space used 0
5414 extents written (10 MB)  

gzip [easto@cupcake][~/snacklinux]$ make TARGET=i486 iso cd /opt/snacklinux_rootfs/; find . -print | cpio -o -H newc –quiet | gzip > /home/easto/snacklinux/rootfs.gz wait mv rootfs.gz boot/isolinux /usr/bin/genisoimage -l -J -R -input-charset utf-8 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o iso/snacklinux_i486_`date +'%d.%m.%y'`.iso boot Size of boot image is 4 sectors → No emulation 86.54% done, estimate finish Mon Dec 19 02:47:41 2022 Total translation table size: 2048 Total rockridge attributes bytes: 954 Total directory bytes: 2408 Path table size(bytes): 26 Max brk space used 0 5787 extents written (11 MB)

Speed:

[easto@cupcake][~/snacklinux]$ cd /opt/snacklinux_rootfs/; time find . -print | cpio -o -H newc –quiet | gzip > /home/easto/snacklinux/rootfs.gz

real 0m0.661s user 0m0.607s sys 0m0.052s

[easto@cupcake][/opt/snacklinux_rootfs]$ cd /opt/snacklinux_rootfs/; time find . -print | cpio -o -H newc –quiet | xz > /home/easto/snacklinux/rootfs.xz

real 0m4.697s user 0m4.521s sys 0m0.162s

kernel-compression.1671418305.txt.gz · Last modified: 2022/12/19 02:51 by snacsnoc
CC Attribution-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International