Skip to content

Swappiness

Not a percentile, but a level of aggressiveness about swapping. This setting can improve drastically performances when ZFS filesystem is in use.

More information about this can be found in Proxmox VE Wiki: Swap on ZFS

Value Behavior
0 The kernel will swap only to avoid an out of memory condition
1 Minimum amount of swapping without disabling it entirely
10 Recommended value to improve performance when sufficient memory exists in a system
60 The default value
100 The kernel will swap aggressively

Temporary Set

Run this command on a bash console:

sysctl -w vm.swappiness=10

Setting will be active until next host shutdown.

Permanent set

Add line at the end of /etc/sysctl.conf file

vm.swappiness = 10

where 10 is the chosen level of swappiness