Proxmox 4 Swap Issue

adamb

Famous Member
Mar 1, 2012
1,329
77
113
We have a 3 node Proxmox 4 cluster which was upgraded from Proxmox 3.

We are running into an issue on one the hosts that is driving me nuts. It keeps using all the swap even though there are 100 or so GB free. If we run the VM on another node the issue doesn't exist. Both nodes are identical in versions,kernel and hardware.

This pretty much says it all.

Code:
root@supprox1:~# free -m
             total       used       free     shared    buffers     cached
Mem:        386857     291079      95778        103         79        227
-/+ buffers/cache:     290772      96084
Swap:        35711      35711          0

On the other host we end up roughly 58G of free with no swap use.

These are brand new HP gen9 servers, maybe I have some bad ram, but I have never seen symptoms of bad ram like this.

Code:
root@supprox1:~# pveversion -v
proxmox-ve: 4.0-22 (running kernel: 4.2.3-2-pve)
pve-manager: 4.0-57 (running version: 4.0-57/cc7c2b53)
pve-kernel-4.1.3-1-pve: 4.1.3-7
pve-kernel-4.2.3-2-pve: 4.2.3-22
lvm2: 2.02.116-pve1
corosync-pve: 2.3.5-1
libqb0: 0.17.2-1
pve-cluster: 4.0-24
qemu-server: 4.0-35
pve-firmware: 1.1-7
libpve-common-perl: 4.0-36
libpve-access-control: 4.0-9
libpve-storage-perl: 4.0-29
pve-libspice-server1: 0.12.5-2
vncterm: 1.2-1
pve-qemu-kvm: 2.4-12
pve-container: 1.0-21
pve-firewall: 2.0-13
pve-ha-manager: 1.0-13
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u1
lxc-pve: 1.1.4-3
lxcfs: 0.10-pve2
cgmanager: 0.39-pve1
criu: 1.6.0-1
zfsutils: 0.6.5-pve6~jessie
 
Let memtest run all night on the node having issue. No bad memory. This has me really stumped.

I am really half tempted to just turn swap off all together on the host. Anyone here turn off swap on the host?

It would be great if I could replicate the same behavior on both hosts, or any other host for that matter.
 
Last edited:
I disable swap on my hosts. (370G ram hosts)

(but I really monitor carefully memory to avoid oom killer)

you can also try to change swapiness

sysctl vm.swappiness=10

(default is 60%, so with 370G ram, i'll begin to swap even if you have 100G free memory)
 
I disable swap on my hosts. (370G ram hosts)

(but I really monitor carefully memory to avoid oom killer)

you can also try to change swapiness

sysctl vm.swappiness=10

(default is 60%, so with 370G ram, i'll begin to swap even if you have 100G free memory)

Yea I messed with swappiness a bit but it didn't help. The only thing that corrects the issue is disabling swap all together. I only run one VM within these hosts. Each host has 386G I can't think of any reason it would ever need swap. I give the VM 340G and leave the rest dedicated for the hosts, I would think the host would never need to swap with 46G of ram to itself.
 
Last edited:

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!