FS#69471 - mkinitcpio: compression level not changeable for zstd-compression

Attached to Project: Arch Linux
Opened by Jonas Große Sundrup (cherti) - Saturday, 30 January 2021, 00:42 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 30 January 2021, 01:14 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I just noticed an implementation detail in mkinitcpio when used with
zstd-compression:

In contrast to other compression options, zstd has an explicit
compression level set via "-19" in line 215. Due to the implementation
of this, this level is no longer overridable by the user, because it is
appended after the user's COMPRESSION_OPTIONS and hence taking precedence over flags provided earlier in the command line.

I have run the numbers on this, for my initramfs (non-fallback), zstd
-19 will compress it down to 13MB, while the zstd-default of -3 will
compress it down to 15MB. These 2MB increase are, however, paid by an
increase of factor 70 in compression time, driving an mkinitcpio -p
linux-run reliably over one minute in runtime, without being
user-changable.

Therefore I think it would be useful to simpyl drop the -19 default for zstd
compression. This would both fix the impossibility to set a compression level as well as significantly speeding up image compression in the default configuration while barely increasing image size (and still being well below what lz4-compression yields even on its highest compression level -9).

A patch implementing this proposal is attached.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Saturday, 30 January 2021, 01:14 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#69036   FS#69409 

Loading...