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

Bug#697335: [PATCH initramfs-tools] mkinitramfs: Use default xz compression level rather than -8



xz -8 wants 370 MB VM for compression, but Debian tries to support
systems with less physical memory than that.

The benchmark results given in commit bedf1e3c0882 ('Use -8 for
compression with xz.') show only a 1% increase in size when changing
to -6, but VM usage will be reduced by 75%.

Closes: #697335
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
I notice we also use lzop -9, which seems to be slower *and* much less
efficient than gzip.  But I couldn't find any documentation of what the
different levels actually mean, so didn't change it.

Ben.

 mkinitramfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkinitramfs b/mkinitramfs
index 07190ed..25932c1 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -146,7 +146,7 @@ if dpkg --compare-versions "${version}" lt "2.6.38" 2>/dev/null; then
 fi
 
 [ "${compress}" = lzop ] && compress="lzop -9"
-[ "${compress}" = xz ] && compress="xz -8 --check=crc32"
+[ "${compress}" = xz ] && compress="xz --check=crc32"
 
 if [ -d "${outfile}" ]; then
 	echo "${outfile} is a directory" >&2

-- 
Ben Hutchings
Life is what happens to you while you're busy making other plans.
                                                               - John Lennon

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: