«

zfs降低内存使用 减少硬盘使用

学长 发布于 阅读:961 NAS


通过该文章了解到

https://zhuanlan.zhihu.com/p/571235218

DedupCache会使得内存使用严重

zfs get dedup

并没开启

zpool get cachefile

zpool set cachefile=none tank

关闭缓存,之前UFS explore莫非因为这个选项导致内存直接爆了?


开启lz4压缩

查看压缩状况

zfs get all | grep compress

zfs set compression=lz4 tank名或者zvol名

lz4是目前已知最快的,显示on的话就是lz4


zfs缓存用到的是arc_summary -s arc

限制最大使用量,写入限制2G根据你的内存状况自己设置

cat >/etc/modprobe.d/zfs.conf <<EOF
options zfs zfs_arc_max=$((2 * 2**30))
EOF


更新上去

update-initramfs -u


参考自

https://linuxhint.com/configure-zfs-cache-high-speed-io/



arc_summary -s arc



推荐阅读:


扫描二维码,在手机上阅读