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


New Member
Jun 6, 2024
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?


  • Proxmox_memory_utilization.jpg
    120.9 KB · Views: 13
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:
  • Like
Reactions: princedominic


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!