Is your feature request related to a problem? Please describe.
There is a hard-coded gzip compression at line 95:
|
args := []string{ |
|
"mksquashfs", |
|
tmpPaths[clrRootfs], |
|
tmpPaths[clrCdroot] + "/images/rootfs.img", |
|
"-b", |
|
"131072", |
|
"-comp", |
|
"gzip", |
|
"-e", |
|
"boot/", |
|
"-e", |
|
"proc/", |
|
"-e", |
|
"sys/", |
|
"-e", |
|
"dev/", |
|
"-e", |
|
"run/", |
|
} |
Lots of benchmarks shows that zstd decompresion speed is much faster than gzip even using compression level 22:
https://gist.github.com/baryluk/70a99b5f26df4671378dd05afef97fce
Describe the solution you'd like
Zstd with compression level 22 will make the rootfs.img smaller but it will consume more memory when the kernel decompress it.
args := []string{
"mksquashfs",
tmpPaths[clrRootfs],
tmpPaths[clrCdroot] + "/images/rootfs.img",
"-b",
"131072",
"-comp",
"zstd",
"-Xcompression-level",
"22",
"-e",
"boot/",
"-e",
"proc/",
"-e",
"sys/",
"-e",
"dev/",
"-e",
"run/",
}
Describe alternatives you've considered
Zstd with compression level 19 will make the rootfs.img small and fast, consuming resonable memory.
args := []string{
"mksquashfs",
tmpPaths[clrRootfs],
tmpPaths[clrCdroot] + "/images/rootfs.img",
"-b",
"131072",
"-comp",
"zstd",
"-Xcompression-level",
"19",
"-e",
"boot/",
"-e",
"proc/",
"-e",
"sys/",
"-e",
"dev/",
"-e",
"run/",
}
Additional context
Currently, zstd support for mksquashfs in ClearLinux seems broken. clearlinux/distribution#3235
But I still believe compress rootfs using zstd is good for both performance and disk usage.
Is your feature request related to a problem? Please describe.
There is a hard-coded gzip compression at line 95:
clr-installer/isoutils/isoutils.go
Lines 88 to 106 in ffb386f
Lots of benchmarks shows that zstd decompresion speed is much faster than gzip even using compression level 22:
https://gist.github.com/baryluk/70a99b5f26df4671378dd05afef97fce
Describe the solution you'd like
Zstd with compression level 22 will make the rootfs.img smaller but it will consume more memory when the kernel decompress it.
Describe alternatives you've considered
Zstd with compression level 19 will make the rootfs.img small and fast, consuming resonable memory.
Additional context
Currently, zstd support for mksquashfs in ClearLinux seems broken. clearlinux/distribution#3235
But I still believe compress rootfs using zstd is good for both performance and disk usage.