How to limit resources known to SLURM?

Viewed 127

Say I have a cluster with 1 node and 36 CPU cores, but I want SLURM to manage and allocate only 20 of these cores. Is there a way to configure SLURM so it's 'world' only consists of this subset of the total CPUs?

Note this is different from setting limits to a particular job. I want a situation where in the example above if job1 requests 20 cpus, and job2 requests 5, SLURM waits for job1 to finish before allocating job2 (as opposed to just starting job2 right away because there are 36 cpus total).

2 Answers

So after messing around a bit, this seemed to work. Posting here in case anyone else ever has the same question.

Happy know if there are any downsides to this approach.

I edited slrum.conf to specify a lower CPU count for my node, and adjusted the Sockets : CoresPerSocket : ThreadsPerCore accordingly.

NodeName=myNode CPUs=20 RealMemory=450000 Sockets=2 CoresPerSocket=5 ThreadsPerCore=2 State=UNKNOWN

The typical way of achieving this with Slurm is with core specialisation.

In the node description in slurm.conf, you set the CoreSpecCount option and write

NodeName=myNode CPUs=36 RealMemory=450000 CoreSpecCount=16 State=UNKNOWN

There an equivalent option for memory: MemSpecLimit

Related