GRUB_CMDLINE_LINUX_DEFAULT="... zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=20 zswap.zpool=z3fold"
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax: module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
lz4
lz4_compress
# zstd
# zstd_compress
# lz4hc
# lz4hc_compress
# https://elinux.org/images/d/d3/Z3fold.pdf
z3fold
- https://wiki.archlinux.org/title/Improving_performance#zram_or_zswap
- https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html
- https://www.kernel.org/doc/html/latest/admin-guide/mm/zswap.html
/sys/module/zswap/parameters/enabled
- enables zswap/sys/module/zswap/parameters/compressor
- configures zswap to use compression algorithm[lz4|zstd|lz4hc|...]
/sys/module/zswap/parameters/max_pool_percent
- limits zswap from using more than % of physical memory/sys/module/zswap/parameters/zpool
- memory managment allocator pages compression algorithm[zbud|zsmalloc|z3fold]
Linux zSwap LZ4 (z3fold
) sudo update-initramfs -k all -u