Swap ram does not change inside LXC

kotakomputer

Renowned Member
May 14, 2012
414
10
83
Jakarta, Indonesia
www.proxmoxindo.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.
 

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!