How to Change Default Swap Settings for Proxmox Ve

How to change default swap settings for Proxmox VE

  • Check Default swap policy from value 60 to 0
1
2
cat /proc/sys/vm/swappiness
#default value is 60 , it means when the memory remain 60, the swap will be enable
  • Change swap policy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Temp to change default swap enable when memory remain 0.
sysctl vm.swappiness=0

# Permanent to change swapp
cat << EOF >> /etc/sysctl.conf
vm.swappiness=0

#apply settings
sysctl -p


# check 
 cat /proc/sys/vm/swappiness
  • Vacuum swap
1
2
swapoff -a
swapon -a
Licensed under CC BY-NC-SA 4.0
Last updated on Nov 08, 2024 12:49 UTC
Built with Hugo
Theme Stack designed by Jimmy