[slurm-users] Disabling SWAP space will it effect SLURM working

8 views
Skip to first unread message

John Joseph

unread,
Dec 5, 2023, 11:58:15 PM12/5/23
to Slurm User Community List
Dear All, 
Good morning 
We have 4 node   [256 GB Ram in each node]  SLURM instance  with which we installed and it is working fine. 
We have 2 GB of SWAP space on each node,  for some purpose  to make the system in full use want to disable the SWAP memory, 

Like to know if I am disabling the SWAP  partition will it efffect SLURM  functionality . 

Advice requested
Thanks 
Joseph John 

Hans van Schoot

unread,
Dec 6, 2023, 4:04:47 AM12/6/23
to slurm...@lists.schedmd.com
Hi Joseph,

This might depend on the rest of your configuration, but in general swap should not be needed for anything on Linux.
BUT: you might get OOM killer messages in your system logs, and SLURM might fall victim to the OOM killer (OOM = Out Of Memory) if you run applications on the compute node that eat up all your RAM.
Swap does not prevent against this, but makes it less likely to happen. I've seen OOM kill slurm daemon processes on compute nodes with swap, usually slurm recovers just fine after the application that ate up all the RAM ends up getting killed by the OOM killer. My compute nodes are not configured to monitor memory usage of jobs. If you have memory configured as a managed resource in your SLURM setup, and you leave a bit of headroom for the OS itself (e.g. only hand our a maximum of 250GB RAM to jobs on your 256GB RAM nodes), you should be fine.

cheers,
Hans


ps. I'm just a happy slurm user/admin, not an expert, so I might be wrong about everything :-)

Davide DelVento

unread,
Dec 11, 2023, 11:20:30 AM12/11/23
to Slurm User Community List
A little late here, but yes everything Hans said is correct and if you are worried about slurm (or other critical system software) getting killed by OOM, you can workaround it by properly configuring cgroup.

Paul Edmon

unread,
Dec 11, 2023, 11:24:35 AM12/11/23
to slurm...@lists.schedmd.com

We've been running for years with out swap on with no issues. You may want to set MemSpecLimit in your config to reserve memory for the OS, so that way you don't OOM the system with user jobs: https://slurm.schedmd.com/slurm.conf.html#OPT_MemSpecLimit

-Paul Edmon-

Reply all
Reply to author
Forward
0 new messages