[TUTORIAL] How do I increase the current 8GB swap space to 32GB?

princedominic

New Member
Jun 6, 2024
1
0
1
Dear All,

Could you please provide a better solution for increasing the swap space from 8GB to 32GB.

Please find the attached screenshot of my current memory utilization.

Do I need to increase the swap space?
 

Attachments

  • Proxmox_memory_utilization.jpg
    Proxmox_memory_utilization.jpg
    120.9 KB · Views: 100
No, you don't want to swap. You have 64GB RAM on the server.

My pve has been up for a month straight sometimes and barely swaps at all with 32GB RAM and 4GB of swap.

Put this in /etc/rc.local and reboot - or just run /etc/rc.local from commandline:


# we dont want to swap much if at all possible
echo 1 > /proc/sys/vm/swappiness

# hopefully better multitasking I/O performance
echo 20 > /proc/sys/vm/dirty_ratio

# Try to keep at least 100MB of free RAM at all times
echo 100000 > /proc/sys/vm/min_free_kbytes

# Default 100 - try more aggressively to reclaim inodes, etc from cache
echo 160 > /proc/sys/vm/vfs_cache_pressure
 
Last edited: