Skip to content

Commit

Permalink
erofs: Make smaller lzma erofs images by default
Browse files Browse the repository at this point in the history
After some experimentation these seem to be reasonable defaults:

mkfs.erofs -z lzma -Ededupe,all-fragments -C 131072 --all-time ...

Higher compression levels above the default of 6 don't make smaller
images. The dedupe and all-fragment options, while they make it run
slower, result in a smaller image size (about 75MB smaller), and
--all-time reduces it by about another megabyte.

These can always be overridden by creating a config file like this:

[compression.erofs]
type = lzma
args = -C 131072

and passing it to lorax with the '--config PATH' argument.

Related: RHEL-48606
  • Loading branch information
bcl committed Jan 20, 2025
1 parent 7a557e8 commit 7a0c301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pylorax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def configure(self, conf_file="/etc/lorax/lorax.conf"):

self.conf.add_section("compression.erofs")
self.conf.set("compression.erofs", "type", "lzma")
self.conf.set("compression.erofs", "args", "-E dedupe,all-fragments")
self.conf.set("compression.erofs", "args", "-E dedupe,all-fragments -C 131072 --all-time")

# read the config file
if os.path.isfile(conf_file):
Expand Down

0 comments on commit 7a0c301

Please sign in to comment.