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:
The swappiness value of
How can I make the container use the swap if necessary to avoid crashing my processes?
Thank you very much.
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: