Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap disk/file #4440

Open
sergelogvinov opened this issue Oct 25, 2021 · 11 comments
Open

Swap disk/file #4440

sergelogvinov opened this issue Oct 25, 2021 · 11 comments

Comments

@sergelogvinov
Copy link
Contributor

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:

# example
machine:
  swap:
     disk: /dev/sda
     # or
     size: 1Gb

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 defined size.

disk and size cannot be set in the same time(?)

@andrewrynhard
Copy link
Member

It is explicitly called out in the Kubernetes docs to disable swap.

@ammmze
Copy link
Contributor

ammmze commented Nov 30, 2021

v1.22 brings alpha support for swap...so I think there is still some validity to this request.

@smira
Copy link
Member

smira commented Dec 8, 2021

Notes from planning meeting

👍

@abckey
Copy link

abckey commented Apr 19, 2022

any update on this ?

@smira
Copy link
Member

smira commented Apr 19, 2022

any update on this ?

no plans for it so far, even though it should be relatively trivial to implement

@Max-Sum
Copy link

Max-Sum commented May 22, 2023

Are we getting this feature soon?

@samos667
Copy link

samos667 commented Nov 7, 2023

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.

@septatrix
Copy link

septatrix commented May 28, 2024

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)

@stevefan1999-personal
Copy link

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

Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 17, 2025
@pio2398
Copy link

pio2398 commented Jan 17, 2025

Still relevant

@github-actions github-actions bot removed the Stale label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants