[SOLVED] SWAP not used by LXC?

landei

New Member
Jan 7, 2020
24
3
3
35
Hi,

I have some questions regarding swap memory.

Did I understand it correct that whenever the RAM is full the swap memory, which is "hard drive memory", can be used to extend the ram?
I also understood that the usage of swap makes everything slow.

However, I have a LXC-container doing a lot of calculations. It already happened several times that all ram was used by the container and the processes of the container were out of memory and crashed.

The allowed swap is twice as big as the real memory, but the swap seems never being used.
It is also visible in the LXC-container using: sudo swapon --show.
The swappiness value of cat /proc/sys/vm/swappiness is 60.

How can I make the container use the swap if necessary to avoid crashing my processes?

Thank you very much.
 
Last edited:

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!