SLURM allows a DefMemPerCPU and a MaxMemPerCPU to be set. If a user does not set a memory limit the default will be used. This is normally set to MaxMem/NumCores. As memory is a consumable resource (SelectTypeParameters=CR_Core_Memory) MaxMemPerCPU serves not only to protect the node’s memory but will also automatically increase a job’s core count on submission where possible. Below are 5 similar jobs submited by a user, each one requiring more memory. The nodes all have 2GB of RAM per core. The initial –ntasks (cores) of each job is set to 1. However as MaxMemPerCPU is set to 2GB the number of cores is increased by the scheduler to a of multiple of each 2GB or RAM requested.
# JOBID NAME USER CPUS NODELIST ---------------------------------------------------------- 1 2043 Mem_Test_500M andy 1 srvcnthpc408 2 2044 Mem_Test_2000M andy 1 srvcnthpc408 3 2045 Mem_Test_5000M andy 3 srvcnthpc406 4 2046 Mem_Test_8000M andy 4 srvcnthpc406 5 2047 Mem_Test_10000M andy 5 srvcnthpc407