jupyterhub / jupyterhub/systemdspawner
Add per user swap limit
- Dominant language
- Python
- Stars
- 100
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
Currently when a user exceeds the memory limit set by systemdspawner their processes won't be killed, instead they can use swap. This is quite confusing for users as their jobs keep working but slow down a lot for no particular reason.
One example is #15 and links in it.
A comment there also points to an option that let's you limit how much swap a process can use.
The problem with this is that the current method for setting memory limits (`MemoryLimit`) is [disabled if you set a swap limit](https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#Unified%20and%20Legacy%20Control%20Group%20Hierarchies). This means we would need to build something that detects that a user specified a swap limit and then changes over the names. Or maybe we migrate to the new names only. To decide this some input from someone with more systemd experience would be needed as the differences and prevalence of the v1 vs v2 cgroup limits isn't something I know much about.
Contributor guide
Assessment
This issue has not been assessed yet.