What is best swap configuration ?

Morphushka

Active Member
Jun 25, 2019
49
5
28
35
Syberia
Hello. How do you configure swap on porxmox host machine ? I read different recommendations from: turn off swap at all to keep asa it is.
I have 64 Gb RAM and 16 is used by containers and 1Gb swap in the same time. Is it good or not ? What do you advice to do or not with swap ?
 
Hi,

in case off performance, it is best to avoid swap.
Generall if you use more and more swap your system performance will decrease.
I personally use swap only as Out Of Memory Killer protection and for this is 1 GB enough.
 
As a first layer, I always recommend using zram. Just install this package and reboot (or manually start the service).

@wolfgang Unfortunately, zram-config is still not in Debian. Any chance it'll be integrated into PVE?
 
@wolfgang Unfortunately, zram-config is still not in Debian. Any chance it'll be integrated into PVE?
I guess no. We discussed it, but as far I remember we will not include it.
 
Is zram-tools a full replacing package for Proxmox/Debian now? There's no zram-config in repos, but
apt-get install zram-tools -- and all zswap things just work, no need to reboot.
 
  • Like
Reactions: elmacus
Is zram-tools a full replacing package for Proxmox/Debian now? There's no zram-config in repos, but
apt-get install zram-tools -- and all zswap things just work, no need to reboot.

Good to know. I was not aware of that!

setting up zram is always the same, just the stuff around it is different, I'd always use the Debian if there is one, otherwise fall back to the Ubuntu way (zram-config), but that is history now.
 

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!