Hey there,
I have several hosts running with around 70 - 100 LXC's each. On 2 of the Hosts, I am seeing the swap of 6/8 GB being used almost 100%. I reduced swappiness to 0 on two of the systems and used swapoff -a to kill the swap. This fails, The system is reducing the swap to a certain point where its no longer able to do so and ill end up with a swap usage of like 1GB out of 6GB. Which was fine for me. After 24h I figured this is causing stalling daemons on some of the LXC's. So having no swap on the host is no solution for me.
I tried to increase the swap the usual way I am used to it from "normal" distros, but this fails as well. I have noticed the existing swapfile is symlinked for at least two locations. I am now unsure how to do this correctly. Is there any sort of guide to follow or am I missing something? I can NOT reboot the systems and having no swap is NOT a solution for me. Any downsides like loss of performance won't matter as I wouldn't notice them anyways as long as everything is running stable.
The Hosts have 128GB RAM where around 50GB are in use. So it's not an issue of running out of RAM
This is what i usually do to add more swap:
Googled it and tried a lot of suggestions, still not working.
Any help appreciated!
I have several hosts running with around 70 - 100 LXC's each. On 2 of the Hosts, I am seeing the swap of 6/8 GB being used almost 100%. I reduced swappiness to 0 on two of the systems and used swapoff -a to kill the swap. This fails, The system is reducing the swap to a certain point where its no longer able to do so and ill end up with a swap usage of like 1GB out of 6GB. Which was fine for me. After 24h I figured this is causing stalling daemons on some of the LXC's. So having no swap on the host is no solution for me.
I tried to increase the swap the usual way I am used to it from "normal" distros, but this fails as well. I have noticed the existing swapfile is symlinked for at least two locations. I am now unsure how to do this correctly. Is there any sort of guide to follow or am I missing something? I can NOT reboot the systems and having no swap is NOT a solution for me. Any downsides like loss of performance won't matter as I wouldn't notice them anyways as long as everything is running stable.
The Hosts have 128GB RAM where around 50GB are in use. So it's not an issue of running out of RAM
This is what i usually do to add more swap:
- Create the file. This command creates a 1 gigabyte file: dd if=/dev/zero of=/swap bs=1M count=1000
- Format the swap file: mkswap /swap
- Add the new swap file to /etc/fstab: /swap swap swap defaults 0 0
- Run swapon -a to activate the new swap.
Googled it and tried a lot of suggestions, still not working.
Any help appreciated!
Last edited: