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.

Reply via email to