Should I leave the SWAP partition or remove it?

Nov 27, 2023
162
35
28
Netherlands
daniel-dog.com
Hello everyone,

I am planning to deploy my dedicated server into production at the start of next month.
Now, my hosting company by default creates a SWAP partition of 8GB with there automated Proxmox VE 8 installer.

Now I have red that using SWAP can really impact performance if it is used (given that it uses disk storage as RAM) and since my server has 256GB of RAM, I do not expected to be RAM constrained.
But I cannot find much info on weather or not it is better to leave the SWAP partition as is or the get rid of it.

So my question is if it is better for stability and performace to leave the SWAP as is and let Debian/Proxmox VE decide on weather or not to use the SWAP partition or should I disable SWAP and remove the partition?
 
There are different reasons why to use swap. One is to swap out memory in case you are running out of RAM so PVE doens't have to kill guests. Another is to help defragmenting your RAM so it won't run out of usable space while there is still free RAM left.
So I would keep it.
If you don't want it to seap out much set the swappiness to something low like 10, 1 or even 0.
 

About

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!