[pve-devel] [PATCH pve-docs v2 1/2] Section on ZFS and swap corrected.
Fiona Ebner
f.ebner at proxmox.com
Mon Feb 3 13:23:17 CET 2025
The subject prefix is correct now. But it seems like most of the other
feedback given for v1 still applies [0].
Also, there is no need to have two separate patches if you just fix up
the changes you just introduced in the second one. Then the patches can
be squashed together into a single one.
[0]:
https://lore.proxmox.com/pve-devel/71eb4140-1e06-43ba-bbe4-76a39d5e9582@proxmox.com/
Am 03.02.25 um 12:14 schrieb Alexander Abraham:
> ---
> local-zfs.adoc | 36 +-----------------------------------
> 1 file changed, 1 insertion(+), 35 deletions(-)
>
> diff --git a/local-zfs.adoc b/local-zfs.adoc
> index c64fb27..bcd02f7 100644
> --- a/local-zfs.adoc
> +++ b/local-zfs.adoc
> @@ -627,41 +627,7 @@ You *must reboot* to activate these changes.
> SWAP on ZFS
> ~~~~~~~~~~~
>
> -Swap-space created on a zvol may generate some troubles, like blocking the
> -server or generating a high IO load, often seen when starting a Backup
> -to an external Storage.
> -
> -We strongly recommend to use enough memory, so that you normally do not
> -run into low memory situations. Should you need or want to add swap, it is
> -preferred to create a partition on a physical disk and use it as a swap device.
> -You can leave some space free for this purpose in the advanced options of the
> -installer. Additionally, you can lower the
> -``swappiness'' value. A good value for servers is 10:
> -
> -----
> -# sysctl -w vm.swappiness=10
> -----
> -
> -To make the swappiness persistent, open `/etc/sysctl.conf` with
> -an editor of your choice and add the following line:
> -
> ---------
> -vm.swappiness = 10
> ---------
> -
> -.Linux kernel `swappiness` parameter values
> -[width="100%",cols="<m,2d",options="header"]
> -|===========================================================
> -| Value | Strategy
> -| vm.swappiness = 0 | The kernel will swap only to avoid
> -an 'out of memory' condition
> -| vm.swappiness = 1 | Minimum amount of swapping without
> -disabling it entirely.
> -| vm.swappiness = 10 | This value is sometimes recommended to
> -improve performance when sufficient memory exists in a system.
> -| vm.swappiness = 60 | The default value.
> -| vm.swappiness = 100 | The kernel will swap aggressively.
> -|===========================================================
> +It is strongly recommended to not use a ZFS volume for a swap partition because this could lead to deadlocks freezing thge affected system and other unpredictable behavior. The OpenZFS documentation, which can be viewed https://openzfs.github.io/openzfs-docs/Project%20and%20Community/FAQ.html#using-a-zvol-for-a-swap-device-on-linux[here], warns against using a ZFS volume for a swap partition.
>
> [[zfs_encryption]]
> Encrypted ZFS Datasets
More information about the pve-devel
mailing list