Swap usage of LXC container does not match configuration

rvdmeer

Member
May 11, 2020
19
9
23
43
Netherlands
Hi,

I'm running the latest version of Proxmox and when I configure a LXC container to use 512M of memory and 512M of swap the swap-usage of the containers shows 1G.

LXC Configuration:
Code:
arch: amd64
cores: 1
hostname: XX
memory: 512
net0: name=eth0,bridge=vmbr1,firewall=1,hwaddr=XX:XX:XX:XX:XX:XX,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local-zfs:subvol-119-disk-0,size=8G
swap: 512
unprivileged: 1

Top output in the container:
Bash:
top - 00:13:40 up 8 days, 23:11,  1 user,  load average: 0.62, 0.66, 0.64
Tasks:  18 total,   1 running,  17 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :    512.0 total,    121.5 free,     30.0 used,    360.5 buff/cache
MiB Swap:   1024.0 total,    418.1 free,    605.9 used.    482.0 avail Mem

Am I misunderstanding how this works or is this a bug? :confused:

Thanks in advance