Proxmox 4.4 lxc memory usage reporting

M-SK

Member
Oct 11, 2016
46
4
13
53
Hello,

Lately I've been noticing the discrepancy between Proxmox GUI memory reporting and what top/free reports inside of a container.
For instance, GUI reports mem usage as 5.5GB being in use (out of 8) and 700M of swap, while this is what I get inside of a container:

[root@t ~]# free -m
total used free shared buffers cached
Mem: 8192 1 8190 49 0 0
-/+ buffers/cache: 0 8191
Swap: 8191 8070 121

What is this? It looks like this container isn't using RAM at all and is using swap?
 
  • Like
Reactions: Vassilis Kipouros
Also, I'm getting OOM:

Apr 6 08:16:54 t kernel: [3598265.924631] Memory cgroup out of memory: Kill process 55734 (mysqld) score 491 or sacrifice child
Apr 6 08:16:54 t kernel: [3598265.924915] Killed process 55734 (mysqld) total-vm:13825772kB, anon-rss:8218116kB, file-rss:0kB
Apr 6 08:33:16 t kernel: [3599247.869594] httpd invoked oom-killer: gfp_mask=0x24000c0, order=0, oom_score_adj=0

The machine is having 12GB of RAM as a limit. The usage is nowhere close (from the GUI), free and top report crazy stuff above, still OOM kill is invoked. True, swap is too small on the host, but why isn't the memory perused fully before using swap?

Again, inside container top/free report only 2MB of RAM being used and 4GB of swap?? The Proxmox GUI reports 8GB of RAM and 33MB of swap being used. Why such a difference? Also, is there a way to reduce container swapiness from GUI or equivalent conf directive?
 
please post "pveversion -v" and the container configuration in question.
 
veversion -v
proxmox-ve: 4.4-76 (running kernel: 4.4.35-1-pve)
pve-manager: 4.4-1 (running version: 4.4-1/eb2d6f1e)
pve-kernel-4.4.6-1-pve: 4.4.6-48
pve-kernel-4.4.35-1-pve: 4.4.35-76
pve-kernel-4.4.8-1-pve: 4.4.8-52
lvm2: 2.02.116-pve3
corosync-pve: 2.4.0-1
libqb0: 1.0-1
pve-cluster: 4.0-48
qemu-server: 4.0-101
pve-firmware: 1.1-10
libpve-common-perl: 4.0-83
libpve-access-control: 4.0-19
libpve-storage-perl: 4.0-70
pve-libspice-server1: 0.12.8-1
vncterm: 1.2-1
pve-docs: 4.4-1
pve-qemu-kvm: 2.7.0-9
pve-container: 1.0-88
pve-firewall: 2.0-33
pve-ha-manager: 1.0-38
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u2
lxc-pve: 2.0.6-2
lxcfs: 2.0.5-pve1
criu: 1.6.0-1
novnc-pve: 0.5-8
smartmontools: 6.5+svn4324-1~pve80
zfsutils: 0.6.5.8-pve13~bpo80
root@nthl03:~# ^C
root@nthl03:~# pveversion -v
proxmox-ve: 4.4-76 (running kernel: 4.4.35-1-pve)
pve-manager: 4.4-1 (running version: 4.4-1/eb2d6f1e)
pve-kernel-4.4.6-1-pve: 4.4.6-48
pve-kernel-4.4.35-1-pve: 4.4.35-76
pve-kernel-4.4.8-1-pve: 4.4.8-52
lvm2: 2.02.116-pve3
corosync-pve: 2.4.0-1
libqb0: 1.0-1
pve-cluster: 4.0-48
qemu-server: 4.0-101
pve-firmware: 1.1-10
libpve-common-perl: 4.0-83
libpve-access-control: 4.0-19
libpve-storage-perl: 4.0-70
pve-libspice-server1: 0.12.8-1
vncterm: 1.2-1
pve-docs: 4.4-1
pve-qemu-kvm: 2.7.0-9
pve-container: 1.0-88
pve-firewall: 2.0-33
pve-ha-manager: 1.0-38
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u2
lxc-pve: 2.0.6-2
lxcfs: 2.0.5-pve1
criu: 1.6.0-1
novnc-pve: 0.5-8
smartmontools: 6.5+svn4324-1~pve80
zfsutils: 0.6.5.8-pve13~bpo80


------------------------------
cat /etc/pve/lxc/118.conf
arch: amd64
cores: 4
hostname: t
memory: 12288
nameserver: 8.8.8.8
net0: name=eth0,bridge=vmbr300,gw=xx.x.x.x,hwaddr=32:9C:8A:3C:D9:67,ip=x.x.x.x,type=veth
onboot: 1
ostype: centos
rootfs: lvm0:vm-118-disk-1,quota=1,size=200G
searchdomain: t
swap: 12288
 
please upgrade to the current version - the kernel you are running has a known OOM bug, and lxcfs also had two bug fixes related to swap/memory accounting in the meantime.
 
Okay. Since we are on 4.4 without subscriptions, will simply doing dist-upgrade get me there or will it upgrade to 5 beta?
 
Okay. Since we are on 4.4 without subscriptions, will simply doing dist-upgrade get me there or will it upgrade to 5 beta?

4.x does not upgrade to 5.x unless you manually change the repository configuration.
 

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!