Open sergelogvinov opened 3 years ago
It is explicitly called out in the Kubernetes docs to disable swap.
v1.22 brings alpha support for swap...so I think there is still some validity to this request.
:+1:
any update on this ?
any update on this ?
no plans for it so far, even though it should be relatively trivial to implement
Are we getting this feature soon?
https://kubernetes.io/blog/2023/08/24/swap-linux-beta/
It would be really great to be able to do that, with the possibility of using ZRAM in the best of all worlds.
I also like to advocate for ZRAM as it offers many of the advantages of swap (move out barely used pages, better OOM handling) without any of the disadvantages (slow, many disk writes)
This is also now needed for specific scenario of using budget VPSes to deploy Talos, even just as a worker, #9037 is a particular case where image pulling can cause OOM and eventually kill containerd, making the whole installation process stuck
Feature Request
Make possible to add swap disk/file to the system at boot time.
Description
When memory is not enough or memory pressure, system processes need a few extra memory to finish some jobs/gracefully stop pods etc. A small swap disk can help with that.
Proposal:
The swap can be disk/partition (azure has special disk for swap) or file in ephemeral storage. Swap has to be alway encrypted. The encryption key is auto generated at boot time. Sysctl param sets to
vm.swappiness=1
If
disk
param is not set - Talos creates a swap-file with definedsize
.disk
andsize
cannot be set in the same time(?)