[PATCH] Lower tarball compression level
Hello,
I'd like to propose the attached patch which changes "--best" to "--fast" in the lh_binary_tar helper. Using "--best" (the highest level of compression) can take 20% longer to complete but only provides 4-5% better compression. This performance impact can quickly be inflated when performing on platforms such as ARM. To put this in perspective, I did a few unscientific tests.
1138mb chroot directory, Intel(R) Core(TM)2 Duo CPU P8600
best: 3m26.249s, 534mb tar.gz (2m44.717s longer to complete, 45mb smaller tar.gz)
fast: 0m41.532s, 579mb tar.gz (2m44.717s quicker to complete, 45mb larger tar.gz)
On an ARMv7 Processor rev 1 (v7l), fast was 45 minutes faster than best for the same chroot directory.
Cheers,
--
Cody A.W. Somerville
Software Systems Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1-781-850-2087
Cell: +1-506-471-8402
Email: cody.somerville@canonical.com
=== modified file 'helpers/lh_binary_tar'
--- helpers/lh_binary_tar 2009-01-26 16:39:27 +0000
+++ helpers/lh_binary_tar 2009-07-31 21:42:48 +0000
@@ -48,7 +48,7 @@
if gzip --help | grep -qs '\-\-rsyncable'
then
tar cf binary-tar.tar binary
- gzip --rsyncable --best binary-tar.tar
+ gzip --rsyncable --fast binary-tar.tar
else
tar cfz binary-tar.tar.gz binary
fi
Reply to: