Swap is Really High on One Node But Not Others

Dec 17, 2021
21
2
8
Ohio
This has been an issue for a while but it's recently become so bad that the entire host is responding slow when rebooting an LXC or VM, and it takes a little longer to load the consoles and different metrics pages (the VM metrics dashboard? (idk what it's technically called)).
I wasn't really bothered by the high usage of swap, it did make things a tad slow but it wasn't unbearable nor did it effect my VMs but it's almost completely full right now and the VMs are behaving weird because of it. I don't know what logs I need to put in this post so please let me know and I'll do it.
Memory is pretty much free, it's technically at half usage but it's always at half usage, that's what it's been at for over 3 months. The system is always at 20% utilization CPU wise too (if that helps)

Here's what I definitely know I should share

root@proxmox-3:~# cat /proc/swaps
Bash:
Filename            Type        Size            Used        Priority
/dev/dm-0         partition    7340028        6400420         -2


I'm sorry if my grammar is bad. Hope this makes sense though.
 
Last edited:
screenshot of the "metrics" will help.
is pve8 running on the two nodes ?
Sorry for the late reply, I've been quite busy with things.

Proxmox 7..2-3 is running on all three nodes. Node 1 and 2 have heavy duty VMs on them and they use a LOT of memory but rarely do I ever see the swap be used or used more than half. On node 3, I have a bunch of LXCs (which don't use a bunch of memory) and a few light VMs. But for some reason, that system in particular likes to use swap more than the other hosts even though the memory is usually around half (16-18GB being used out of 32GB).

I ended up rebooting a specific VM and that kind of fixed the issue but rebooting that VM often shouldn't be the solution or the remedy, the solution should be something that permanently fixes the issue.

In the three pictures, I have all three nodes' metrics. Node 3 is the one with the almost 4GB of swap. (for the sake of this, pretend it's a 6.55GB because that's what it was at a few days ago and it's what it's gonna be in a few days from now). It's the highest swap usage out of the three and even when I had an older host in there as node three, it never ran this high.
Could the issue be with a collection of LXCs / VMs having the ability to use the hosts' swap? or is the host putting VM/LXC data in the swap? If it's the first, can I make the VMs not use the swap on the host. If it's the latter, then I don't know what would fix this issue.
 

Attachments

  • Proxmox node 3 metrics.png
    Proxmox node 3 metrics.png
    43.4 KB · Views: 5
  • Proxmox node 2 metrics.png
    Proxmox node 2 metrics.png
    44.5 KB · Views: 5
  • Proxmox node 1 metrics.png
    Proxmox node 1 metrics.png
    43.2 KB · Views: 5

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!