[SOLVED] SWAP 100% load

Oct 23, 2020
83
3
13
31
Hi guys! Few days ago I've noticed that SWAP on 1 of 5 hosts was loaded for 100%. On this host I used command swapoff -a && swapon -a and everything was OK. But today situation repeated. How to solve this situation? I can't every 3-4 days disable than again enable swap.
I use pve-manager/6.2-11/22fb4983
 
If a system swaps then I would say it is running into an 'out of memory" condition. The question for me would be: what is the source?
Are the machines under high memory pressure?
What value do you use for swappiness?
 
If a system swaps then I would say it is running into an 'out of memory" condition. The question for me would be: what is the source?
Are the machines under high memory pressure?
What value do you use for swappiness?
What do you mean by source and memory pressure?
This is my system on picture. 4 another hosts the same (They use 50MB-1500MB of swap). On this host ~13 running VM

config.JPG
 
Last edited:
OK. Looks like you have plenty of free memory.
So the question is: why does your system swap? I can see two easy reasons:
Option 1: ZFS ARC - do you use ZFS?
Option 2: VM.swapiness value is high (default is 65 IIRC) - if you have not changed it (not sure if Proxmox does this on install) your system might start to swap even if there is enough memory.
Please check this: https://askubuntu.com/questions/103915/how-do-i-configure-swappiness
I have set mine to 1 (%)
 
OK. Looks like you have plenty of free memory.
So the question is: why does your system swap? I can see two easy reasons:
Option 1: ZFS ARC - do you use ZFS?
Option 2: VM.swapiness value is high (default is 65 IIRC) - if you have not changed it (not sure if Proxmox does this on install) your system might start to swap even if there is enough memory.
Please check this: https://askubuntu.com/questions/103915/how-do-i-configure-swappiness
I have set mine to 1 (%)
1) I don't use ZFS
2) I didn't change swapiness (default 60). Am I right, that I have VM with a lot of free RAM? So Host moved this free RAM to SWAP?
 
If it is not ZFS and you still have a high swapiness value then this is it.
You ar e way above 60% free memory so it will use your swap.
Set it to 1, upgrade initramfs and reboot. I guess your behaviour will go away
 
  • Like
Reactions: lDemoNl
Thanks mate. No wonder everyon tells that wrong wisdom. The whole explanation is looooong.
Will read it though and educate myself.
Damn. It sounded so obvious...
 

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!