Swap ram does not change inside LXC

kotakomputer

Renowned Member
May 14, 2012
464
17
83
Jakarta, Indonesia
www.komputerindo.com
In my Proxmox 5.2, a LXC with 1024 Swap. Change swap to 4096 then stop-start the LXC but swap still 1024:

Code:
# free -m
              total        used        free      shared  buff/cache   available
Mem:          18000        1675       14261          12        2062       16324
Swap:          1022           0        1022


Code:
# pveversion
pve-manager/5.2-10/6f892b40 (running kernel: 4.15.17-3-pve)
 
In my Proxmox 5.2, a LXC with 1024 Swap. Change swap to 4096 then stop-start the LXC but swap still 1024:

Code:
# free -m
              total        used        free      shared  buff/cache   available
Mem:          18000        1675       14261          12        2062       16324
Swap:          1022           0        1022


Code:
# pveversion
pve-manager/5.2-10/6f892b40 (running kernel: 4.15.17-3-pve)


Note that the container has to share the swap with the host (and all other containers). Values higher tnan the host's swap limit can be configured but have no effect.