Summary

Improve compression ratio of SquashFS filesystem on the installation media.

Owner

Name: Bohdan Khomutskyi

Email: bkhomuts@redhat.com

Current status

Targeted release: I propose this change for Fedora 32

Last updated: Jan 5 2020

Pagure.io issue: https://pagure.io/releng/issue/9127

I was unable to create an article in Fedora wiki system.

Detailed Description

As of Fedora 31, the LiveOS/squashfs.img file on the installation image, is compressed with default settings of mksquashfs. The standard configuration is set to XZ algorithm with block size of 128k and BCJ filter enabled. Those parameters can be adjusted which will lead to a better compression ratio and/or reduction of the CPU usage at build time.

This is simple to achieve. Recently, Lorax has gotten support[1] for adjusting the compression options for mksquashfs via the configuration file. The file should be altered as following:

[compression]
bcj = yes
args = -b 1M -Xdict-size 1M -no-recovery

Where -b 1M and -Xdict-size 1M are block and dictionary sizes respectively. Could be adjusted.

Benefit to Fedora

Scope

The build environment should have support for adjusting the Lorax configuration file.. Lorax is a program that produces the LiveOS/squashfs.img file on the installation media.

One of the way to allow for such customization, is to add a feature in Pungi, to allow for passing -c option to Lorax.

Upgrade/compatibility impact

User Experience

Dependencies

Contingency Plan

Documentation

https://pagure.io/releng/issue/9127.

mksquashfs(1)

Release notes

See also

https://pagure.io/releng/issue/8646

--

Bohdan Khomutskyi

Release Configuration Management engineer
Red Hat