On Sun, Jan 5, 2020 at 5:24 AM Bohdan Khomutskyi <bkhom...@redhat.com> wrote:
>
> Summary
>
> Improve compression ratio of SquashFS filesystem on the installation media.

On the issues of Fedora ISOs using excessive CPU, related to lzma decompression:
https://bugzilla.redhat.com/show_bug.cgi?id=1717728
https://pagure.io/releng/issue/8581

Create images using plain squashfs (without nested ext4)
https://pagure.io/releng/issue/8646

And koji issue to enhance it so it can accept configurable rootfs
types (plain squashfs and configurable compression)
https://pagure.io/koji/issue/1622

I'm wondering if you can relate this feature proposal to those issues
and feature requests?

In my testing, xz does provide better compression ratios, well suited
for seldom used images like archives. But it really makes the
installation experience worse by soaking the CPU, times thousands of
installations (openQA tests on every single nightly, every human QA
tester for nightlies, betas, and then the final released product used
by Fedora end users).

Has zstandard been evaluated? In my testing of images compressed with
zstd, the CPU hit is cut by more than 50%, and is no longer a
bottleneck during installations. Image size does increase, although I
haven't tested mksquashfs block size higher than 256K. Using zstd with
Fedora images also builds on prior evaluation, testing, and effort
moving RPM from xz to zstd.

My testing with mksquashfs block size suggests compression ratio
improves but latency gets worse, and becomes somewhat pathological
with a nested ext4 in it: my best guess is the random access nature of
ext4, many 4KiB seeks turn into larger 128KiB seeks; and also squashfs
and ext4 probably have different localities (where data is placed in
relation to their metadata, in attempt to optimize). Dropping the
nested ext4 image also improved performance quite a bit, independent
of compression algorithm. I forget how much exactly but it may be
~30%.

I've pretty much concluded Fedora is best off dropping the nested ext4
in favor of plain squashfs, and using zstd. It's not required to do
both, but the benefit is additive and significant. The work in dracut
and lorax to support plain squashfs, assembling it using overlayfs
instead of device-mapper is already done, and tested.

-- 
Chris Murphy
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to