[slurm-users] problem with AllowedSwapSpace

Charles Hedrick hedrick at rutgers.edu
Sat Aug 26 21:13:59 UTC 2023


With cgroup v2 allowedswapspace is implemented using memory.swap.max.

In v1, it is memsw.max. This applies to the total of memory and swap.
In v2, memory.swap.max is only swap.

Slurm adds the job memory size to allowedswapspace. This is appropriate for v1, since the limit is on the sum. It is not appropriate for v2.

This is a bug that can break hardware. Many systems these days are sold with SSD for root. Unless they are write-intensive SSDs, they are not appropriate for swapping. But normally boot disks are not written heavily, so I doubt many systems have SSDs that can stand up to continuous swapping.

You can minimize swap be setting allowedswapspace to -100, but there's a minimum of 30 MB. I'm fixing the code on our systems.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20230826/f9eba04b/attachment.htm>


More information about the slurm-users mailing list