[slurm-users] How to enforce memory contrains?

Hermann Schwärzler hermann.schwaerzler at uibk.ac.at
Tue Oct 5 08:15:25 UTC 2021

Hi Rodrigo,

a possible solution is using


in slurm.conf.

With this settings, programs that try to allocate more memory than 
requested in the job's settings will fail.

Be aware that this puts a limit on *virtual* memory, not on RSS. This 
might or might not be what you want as a lot of programs tend to 
allocate (a lot) more virtual memory than they really use (RSS).


On 10/5/21 12:46 AM, Rodrigo Santibáñez wrote:
> Hello Slurm Users,
> I'm having a hard time configuring slurm to kill jobs when they use more 
> memory than requested. Also, I can't make jobs use only RAM, and some of 
> them starts to use SWAP.
> I don't know what I'm missing.
> Thanks for your help
> slurmd -V
> slurm 20.02.6
> slurm.conf
> TaskPlugin=task/affinity,task/cgroup
> ProctrackType=proctrack/cgroup
> cgroup.conf
> AllowedRAMSpace=100.0
> AllowedSwapSpace=0.0
> ConstrainRAMSpace=yes
> ConstrainSwapSpace=yes
> MemorySwappiness=0
> CgroupAutomount=yes
> ConstrainCores=yes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4207 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20211005/83b1537a/attachment-0001.bin>

More information about the slurm-users mailing list