Use 1m as new default squashfs block size
authorMichael Prokop <mika@grml.org>
Wed, 10 Mar 2021 08:29:41 +0000 (09:29 +0100)
committerMichael Prokop <mika@grml.org>
Wed, 10 Mar 2021 09:08:12 +0000 (10:08 +0100)
commitfada6dea0ffacc5ee41b1ae0144197f233e4ca87
treef61abe724242c3d632241041a8ac4544ed481721
parentfb26a16e6ba3deb6569dcd62adeb7cbcd23fcf05
Use 1m as new default squashfs block size

The default block size of mksquashfs is 128k, while we used 256k since 2009.
When increasing the block size further, we increase build time, but also
decrease the file size (and therefore the resulting ISO).

Nowadays rotating media (CD/DVD) aren't so much in usage anymore, while
(USB) flash drives and direct ISO boot (both from disk as well as via
OOB management) are way more common. Latency maybe is no longer so
relevant as it used to be, so let's see if this turns out to be a
problem. On the other side smaller ISOs decrease download times as well
as disk usage (esp. when used as /boot/grml via grml-rescueboot).
Overall it is a trade off that's worth consideration, let's give it a try.

Some non-scientific benchmarks give the following build times:

* block size 256k: 2min 19sec, 383MB
* block size 1m:   3min 30sec, 363MB

Buffer/cache memory usage of the booted ISO slightly increases (91MB
used and 170MB buff/cache with block size 1m, vs. 94MB used and 143MB
buff/cache with block size 256kb), but might be neglectable. (And once
again, this was another non-scientific benchmark.)

Further options that might be worth consideration are 1) -Xdict-size
(while -Xdict-size 100% is the default already, so noting really to do
for us here), and 2) `-Xbcj x86`, which further increases compression
time, but also has a bit of savings.

FTR, Jonathan Carter did some benchmarks related to squashfs in 2015, see
https://jonathancarter.org/2015/04/06/squashfs-performance-testing/.
And Fedora is considering usage of `-b 1M -Xdict-size 1M -no-recovery`
(which would be identical to what we have, note that -no-recovery
doesn't seem to influence file size), see
https://fedoraproject.org/wiki/Changes/OptimizeSquashFS

Thanks: Mihai Moldovan <ionic@ionic.de>
etc/grml/grml-live.conf
grml-live