Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for compressors and mksquashfs #328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

afbjorklund
Copy link
Contributor

Document --mksquashfs-args and the different compressor options...

Hopefully compatibility is less of an issue with bundled mksquashfs.

Description of the Pull Request (PR):

Documents common options to the new --mksquashfs-args backdoor.

For instance how to change processors or compressors, from -help.

This fixes or addresses the following GitHub issues:

Document --mksquashfs-args and the different compressor options...

Hopefully compatibility is less of an issue with bundled mksquashfs.

Signed-off-by: Anders F Björklund <[email protected]>
@afbjorklund
Copy link
Contributor Author

afbjorklund commented Feb 24, 2025

Note that both lz4 and zstd programs offer a "benchmark" feature.

This can be used, in combination with -no-compression compressor...

$ apptainer build --mksquashfs-args="-no-compression" python.sif docker://python

$ lz4 -b1 python.sif 
 1#python.sif        : 981495808 -> 495176737 (1.982), 628.3 MB/s ,3159.1 MB/s 
$ lz4 -b9 python.sif 
 9#python.sif        : 981495808 -> 405101750 (2.423),  34.4 MB/s ,3256.6 MB/s 

$ zstd -b1 python.sif
 1#python.sif        : 981495808 -> 377207154 (2.602), 399.3 MB/s ,1143.7 MB/s 
$ zstd -b9 python.sif
 9#python.sif        : 981495808 -> 298002825 (3.294),  32.9 MB/s ,1154.6 MB/s 

YMMV. (but note that compression levels only affects compression, not decompression)

Note: The SIF file needs to be uncompressed for the benchmark and comparison only.

Level 1 is "fast" and level 9 is "best". (level 15 is superslow, 7.13 MB/s)

mksquashfs calls lz4 level 9 with -Xhc. (HC as in "high compression")

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Feb 24, 2025

http://zstd.net/ versus gzip:

zstd

https://lz4.org/ versus gzip:

lz4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document --mksquashfs-args
1 participant