常见算法效能如下:常用命令cat /sys/block/zram0/comp_algorithm # 查看支持算法 zramctl # 查看当前 zram free -hBash 复制开机启动echo "zram" > /etc/modules-load.d/zram.conf echo "lz4" >> /etc/modules-load.d/zram.conf echo 'ACTION=="add", KERNEL=="zram0", ATTR{disksize}="16G", ATTR{comp_algorithm}="lz4", RUN="/sbin/mkswap -U clear /dev/%k", TAG+="systemd"' > /etc/udev/rules.d/99-zram.rules echo "/dev/zram0 none swap defaults,pri=100 0 0" >> /etc/fstabBash 复制调优加入: /etc/sysctl.d/99-vm-zram-parameters.confvm.swappiness = 180 vm.watermark_boost_factor = 0 vm.watermark_scale_factor = 125 vm.page-cluster = 0Conf 复制Refhttps://pve.proxmox.com/wiki/Zramhttps://www.bingjie.vip/index.php/archives/139/https://wiki.archlinux.org/title/Zram Last modification:February 3, 2024 © Allow specification reprint Like 4 如果觉得我的文章对你有用,请随意赞赏