You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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. 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.
The text was updated successfully, but these errors were encountered:
Well I managed to limit|disable swapping (at least on Debian 10 aka Buster).
I had to boot in unified cgroups and enable swap accounting with the following kernel options:
systemd.unified_cgroup_hierarchy=1
swapaccount=1
On debian, configure grub:
# in /etc/default/grug
GRUB_CMDLINE_LINUX_DEFAULT="quiet systemd.unified_cgroup_hierarchy=1 swapaccount=1"
Run /usr/sbin/update-grub2, then reboot.
Then I wrote a dedicated slice to spawn jupyter-singleuser in.
I can now move resources limitation mem_limit and cpu_limit in the slice definition, bonus, it exposes all systemd resource-control directives, not only mem and cpu limits.
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. 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.The text was updated successfully, but these errors were encountered: