Improve compression ratio of SquashFS filesystem on the installation media.


Name: Bohdan Khomutskyi


Current status

Targeted release: I propose this change for Fedora 32

Last updated: Jan 5 2020 issue:

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:

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


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


Contingency Plan



Release notes

See also


Bohdan Khomutskyi

Release Configuration Management engineer
Red Hat