container uses SWAP with no SWAP

fropa

Member
Dec 12, 2017
14
1
8
32
I set SWAP = 0 on every container I've on Proxmox, but they still use swap for some processes. I can check that from 'top' command. What's wrong?
 
I can't change swappiness on a container, only on the host. I set swap = 0 from web and when I check 'free -m' command there is no swap.
 
Where did you see that you are using swap?
Because maybe you see the swap of the host.
 
The problem is you can not disable swap in cgoups in version 1.
Version 2 is not supported by LXC yet.
Memory means swap + mem.
swap means only swap.
 
The problem is you can not disable swap in cgoups in version 1.
Version 2 is not supported by LXC yet.
Memory means swap + mem.
swap means only swap.

What do you mean in version 1 and version 2?


I guess I didn't explain correctly. I set swap 0 on each container separately from the web panel.

Do you mean that if I set swap 0 for the container it still would use swap?
 
You can turn off swap on the host.
swapoff <swap partition>
remove fstab swap entry.
 
@wolfgang
As setting swap to 0 seems to have no effect, does that mean that LXC Containers can use as much swap as they want ? Potentially one problematic LXC Container filling up all swap that's available ?

If yes, is there any best practice advice on this matter ?
 

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!