Change the default dictionary size to 4 times the pcluster size.
This will halve the LZMA internal dictionary size to a maximum of
4MiB per LZMA worker (one worker per CPU in the kernel implementation
unless the module parameter `lzma_streams=` is given.)
It has a very slight impact on the final image sizes, yet users can
always use `-zlzma,dictsize=` to specify a custom value.
_________________________________________________________________________
|______ Testset _____|_______ Vanilla _________|_________ After __________| Command Line
| CoreOS |
741978112 (708 MiB) |
742293504 (708 MiB) | -zlzma,6 -Eall-fragments,fragdedupe=inode -C8192
| |
687501312 (656 MiB) |
687652864 (656 MiB) | -zlzma,6 -Eall-fragments,fragdedupe=inode -
C131072
|____________________|__
658485248 (628 MiB) __|__
658698240 (629 MiB) __| -zlzma,6 -Eall-fragments,fragdedupe=inode -
C1048576
| Fedora KIWI |
2974957568 (2838 MiB) |
2977394688 (2840 MiB) | -zlzma,6 -Eall-fragments,fragdedupe=inode -C8192
| |
2684272640 (2560 MiB) |
2686750720 (2563 MiB) | -zlzma,6 -Eall-fragments,fragdedupe=inode -
C131072
|____________________|_
2550800384 (2433 MiB) _|_
2553278464 (2435 MiB) __| -zlzma,6 -Eall-fragments,fragdedupe=inode -
C1048576
| AOSP system |
432562176 (413 MiB) |
432738304 (413 MiB) | -zlzma,6 -Eall-fragments,fragdedupe=inode -C8192
| partition |
393277440 (376 MiB) |
393351168 (376 MiB) | -zlzma,6 -Eall-fragments,fragdedupe=inode -
C131072
|____________________|__
379260928 (362 MiB) __|__
379285504 (362 MiB) __| -zlzma,6 -Eall-fragments,fragdedupe=inode -
C1048576
Link: https://lore.kernel.org/r/20250212191545.580768-1-hsiangkao@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>