# Compression algorithm selection
# speed: lz4 > zstd > lzo
# compression: zstd > lzo > lz4
# This is not inclusive of all that is available in latest kernels
# See /sys/block/zram0/comp_algorithm (when zram module is loaded) to see
# what is currently set and available for your kernel[1]
# [1] https://github.com/torvalds/linux/blob/master/Documentation/blockdev/zram.txt#L86
#ALGO=lz4
#推荐设置为zstd算法,有着更好的压缩比
# Specifies the amount of RAM that should be used for zram
# based on a percentage the total amount of available memory
# This takes precedence and overrides SIZE below
#PERCENT=50
# Specifies a static amount of RAM that should be used for
# the ZRAM devices, this is in MiB
#SIZE=256
#以上这两个参数取决于希望按照现有内存的比例还是绝对大小来设置zram大小,按需调整
# Specifies the priority for the swap devices, see swapon(2)
# for more details. Higher number = higher priority
# This should probably be higher than hdd/ssd swaps.
#PRIORITY=100
#不需要动
Debian系的OS也可以直接使用apt源里的
zram-toolspackage进行安装:安装完毕后可通过编辑
/etc/default/zramswap调整配置:设置完毕后重启服务应用配置:
windows有类似的功能吗?
先插个,过后学习
感谢分享
先插个,过后学习
好贴
感谢分享!
Mark