Proxmox and swap partition

krikey

Well-Known Member
Aug 15, 2018
115
22
58
UK
Is there a reason why the default install of Proxmox VE doesn't allocate it's own swap partition?

If not, should I be providing my VMs with access to swap space and if so, should I be providing this swap space on SSDs or HDDs?
 
If not, should I be providing my VMs with access to swap space
If you want swapping you can create swap partitions and set the swappiness. Could be usefull so that you can give VMs just enough RAM to operate (so they don't waste too much RAM for page file caching). In that case it should prevent the OOM killer from kicking in.
and if so, should I be providing this swap space on SSDs or HDDs?
SSD would be much faster so you don't slowdown the VMs that much if RAM gets full. But it causes alot of writes and will kill your SSD faster. HDDs are incredible slow and swapping might overwhelm the HDDs because they can't handle all the IOPS and the iowait will go up.
 
Is it possible to monitor a VM to see when the OOM kicks in so that I can make a decision on how much RAM/SWAP should be used?
 
You could use something like graylog/elasticstack to collect the syslogs and filter them for OOM messages.
 

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!