Commit dd66d187 authored by James T. Lee's avatar James T. Lee
Browse files

zfs: Manage swap volume properties

parent 689a5975
...@@ -20,6 +20,7 @@ class nest::base::bootloader { ...@@ -20,6 +20,7 @@ class nest::base::bootloader {
# Physical swap is still useful for hibernation. # Physical swap is still useful for hibernation.
# #
# See: https://github.com/openzfs/zfs/issues/7734 # See: https://github.com/openzfs/zfs/issues/7734
# See also: nest::base::zfs for workarounds
'zswap.enabled=1', 'zswap.enabled=1',
'zswap.compressor=lzo-rle', 'zswap.compressor=lzo-rle',
'zswap.zpool=z3fold', 'zswap.zpool=z3fold',
......
...@@ -112,4 +112,16 @@ class nest::base::zfs { ...@@ -112,4 +112,16 @@ class nest::base::zfs {
} }
::nest::lib::systemd_reload { 'zfs': } ::nest::lib::systemd_reload { 'zfs': }
unless $facts['virtual'] == 'lxc' {
# Manage swap volume properties for experimenting with workarounds listed in
# https://github.com/openzfs/zfs/issues/7734
zfs { "${facts['rpool']}/swap":
compression => 'off',
sync => 'always',
primarycache => 'metadata',
secondarycache => 'none',
logbias => 'throughput',
}
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment