Split compression into separate methods; use xz to compress initrd
xz compression makes the initrd 33% smaller (136M -> 90M). The extra
memory overhead at decompression time is negligible: testing showed
that any system with enough RAM to use the gzip-compressed initrd was
also able to load the xz-compressed initrd with no trouble.
Note that '--check=crc32' is needed because the kernel doesn't know
how to perform the default xz integrity check (crc64).
---
src/pylorax/constants.py | 2 ++
src/pylorax/installtree.py | 24 ++++++++++++------------
2 files changed, 14 insertions(+), 12 deletions(-)
# move modules out of the tree again
shutil.move(joinpaths(self.root, "modules", kernel.version),
--
1.7.4
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
02-26-2011, 08:55 PM
John Reiser
Split compression into separate methods; use xz to compress initrd
On 02/14/2011 10:05 AM, Will Woods wrote:
> xz compression makes the initrd 33% smaller (136M -> 90M).
Another 1.96MB can be squeezed from the kernel drivers (lib/modules/.../*.ko...).
>From a recent F15 alpha RC of install DVD:
10.608MB tree of *.ko.gz-9
23.608MB tree of *.ko
8.984MB tree of *.ko.xz-9
23.192MB cpio *.ko
7.022MB (cpio *.ko).xz-9
11.236MB tree of *.ko.gz-2
The 1.96MB is obtained from (8.98MB - 7.02MB). Build the initrd
as the xz-compressed cpio archive containing the _uncompressed_ *.ko.
The kernel applies "xz -d", "cpio --extract", and "gzip -c -2",
getting a tree of *.ko.gz-2 that is (11.236MB - 10.608MB) = 0.628MB
larger than before, at a cost of about 1 second for re-compressing
while constructing the initramfs. But in the meantime initrd.img
is about 2MB smaller.
--
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list