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

Re: XZ compression for the initramfs



* Roger Shimizu <rogershimizu@gmail.com> [2016-01-04 00:54]:
> Size of initrd is always an issue on embedded platform. Surely XZ can
> extremely reduce the size, however as I remember, it takes MUCH more
> time to finish update-initramfs command.
> 
> Did you evaluate how long does it take to generate one initramfs image
> on QNAP box?

It goes from about 1 minute to 2 minutes and 20 seconds (without running
flash-kernel) which is a huge increase percentage wise but a minute more
is imho not a big deal, especially if it means avoiding troubles because
the ramdisk doesn't fit in flash.  [If TS-209 users cared about performance,
surely they would have upgraded to a faster machine already :-P]

This is with MODULES=dep on an Orion machine with 256 MB RAM.  XZ will
probably use swap if you only have 64 MB RAM, but all the QNAP machines
have at least 128 MB RAM.

Log:

root@debian:~# time update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.4.0-rc6-orion5x

real    1m0.610s
user    0m32.744s
sys     0m21.284s
root@debian:~# time update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.4.0-rc6-orion5x

real    0m57.074s
user    0m32.584s
sys     0m20.804s
root@debian:~# time update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.4.0-rc6-orion5x

real    0m57.700s
user    0m32.384s
sys     0m21.460s
root@debian:~# ls -l /boot/initrd.img-4.4.0-rc6-orion5x
-rw-r--r-- 1 root root 4028043 Jan  3 10:50 /boot/initrd.img-4.4.0-rc6-orion5x
root@debian:~#
root@debian:~# echo COMPRESS=xz > /etc/initramfs-tools/conf.d/compress
root@debian:~#
root@debian:~# time update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.4.0-rc6-orion5x

real    2m21.991s
user    1m52.268s
sys     0m22.736s
root@debian:~# time update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.4.0-rc6-orion5x

real    2m17.672s
user    1m51.852s
sys     0m21.884s
root@debian:~# time update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.4.0-rc6-orion5x

real    2m18.260s
user    1m52.064s
sys     0m22.184s
root@debian:~# ls -l /boot/initrd.img-4.4.0-rc6-orion5x
-rw-r--r-- 1 root root 2734748 Jan  3 10:58 /boot/initrd.img-4.4.0-rc6-orion5x
root@debian:~#

-- 
Martin Michlmayr
http://www.cyrius.com/


Reply to: