stage2: squashfs blocksize tweaks
Looks like the 128k default block size is pretty well chosen: it saves ~6% of image size compared to 64k, and subsequent differences are ~3% per doubling the block size up to 1M (thanks led@ for carrying out the tests). So we'll stick with 256k for "normal" xz compression (inodes uncompressed) and get 512k back for "tight" one (compressed). The runtime performance issues are to be examined yet when bootchart or the like is deployed, nothing drastic though. With "fast" (gzip/lzo) squash compression inodes go unmolested. For the record, tight live-webkiosk builds as 95M image in 3:40, and tight live-flightgear.iso builds as 669M image in 6:34. Nice. There's no much sense going for 1M block size: e.g. live-webkiosk would drop to 93M (3:46) but its load time would increase up to 2:07 as compared to 1:48 for -b 524288 and 1:42 for -b 262144 -noI on a Duron 500/512M system given the very same DVD+RW media.
This commit is contained in:
parent
931d23e86c
commit
8d16069882
@ -3,9 +3,9 @@
|
||||
# check relevant kernel features availability
|
||||
|
||||
CONFIGS=/boot/config-*
|
||||
GZ_OPTS="-comp gzip"
|
||||
XZ_OPTS="-comp xz -b 262144 -noI"
|
||||
LZO_OPTS="-comp lzo"
|
||||
GZ_OPTS="-comp gzip -noI"
|
||||
XZ_OPTS="-comp xz"
|
||||
LZO_OPTS="-comp lzo -noI"
|
||||
|
||||
verbose() { [ -n "$GLOBAL_VERBOSE" ] && echo "** $@" >&2; }
|
||||
fatal() { echo "** error: $@" >&2; exit 1; }
|
||||
@ -30,19 +30,26 @@ done
|
||||
|
||||
verbose "GLOBAL_SQUASHFS: $GLOBAL_SQUASHFS"
|
||||
|
||||
# squashfs options: not really neccessary but better than none
|
||||
# NB: this config file should be carried over into install2
|
||||
if [ "$GLOBAL_SQUASHFS" != "fast" ] && configured "SQUASHFS_XZ=y"; then
|
||||
# NB: the decompression filter overhead might hurt
|
||||
# NB: there are arm, powerpc and some other filters too
|
||||
if [ "$GLOBAL_SQUASHFS" = "tight" ] && configured "X86"; then
|
||||
XZ_OPTS="$XZ_OPTS -Xbcj x86"
|
||||
options()
|
||||
{
|
||||
# squashfs options: not really neccessary but better than none
|
||||
# NB: this config file should be carried over into install2
|
||||
if [ "$GLOBAL_SQUASHFS" != "fast" ] && configured "SQUASHFS_XZ=y"; then
|
||||
# NB: the decompression filter overhead might hurt
|
||||
# NB: there are arm, powerpc and some other filters too
|
||||
if [ "$GLOBAL_SQUASHFS" = "tight" ] && configured "X86"; then
|
||||
XZ_OPTS="$XZ_OPTS -b 524288 -Xbcj x86"
|
||||
else
|
||||
XZ_OPTS="$XZ_OPTS -b 262144 -noI"
|
||||
fi
|
||||
echo "$XZ_OPTS"
|
||||
else # go fast, or even faster if possible
|
||||
if configured "SQUASHFS_LZO=y"; then
|
||||
echo "$LZO_OPTS"
|
||||
else # safe default
|
||||
echo "$GZ_OPTS"
|
||||
fi
|
||||
fi
|
||||
echo "PACK_SQUASHFS_OPTS=$XZ_OPTS"
|
||||
else # go fast, or even faster if possible
|
||||
if configured "SQUASHFS_LZO=y"; then
|
||||
echo "PACK_SQUASHFS_OPTS=$LZO_OPTS"
|
||||
else # safe default
|
||||
echo "PACK_SQUASHFS_OPTS=$GZ_OPTS"
|
||||
fi
|
||||
fi > /.image/squashcfg.mk
|
||||
}
|
||||
|
||||
echo "PACK_SQUASHFS_OPTS=-no-recovery `options`" > /.image/squashcfg.mk
|
||||
|
Loading…
Reference in New Issue
Block a user