1. Home
  2. Workload Management
  3. How do I configure SLURM Fair Shares?

How do I configure SLURM Fair Shares?

SLURM Fair Sharing can be configured using the sacctmgr tool. The following example illustrates how 50% Fair Sharing between two Users, User1 and User2, can be configured

1. create a cluster for which you’ll define accounts and users:

# sacctmgr create cluster bcm

2. create a parent account

# sacctmgr create account name=science fairshare=50 

3. create two descendants for the parent account:

# sacctmgr create account name=chemistry parent=science fairshare=30
# sacctmgr create account name=physics parent=science fairshare=20

 4. enroll two users into the physics accounts with 0.5 of the resources assigned to each user:

# sacctmgr create user name=User1 cluster=bcm account=physics fairshare=10

# sacctmgr create user name=User2 cluster=bcm account=physics fairshare=10

The fair share configurations can be reviewed for a particular cluster as follows:

# sacctmgr list associations cluster=bcm format=Account,Cluster,User,Fairshare

You can also add additional limits on a particular account and for a particular user as follows:

# sacctmgr modify user where name=User1 cluster=bcm account=physics set maxjobs=2 
The previous command limits the maximum number of running jobs at one time for User1.

You can export the created fair share policy to a file as a backup. The exported file can then be imported to other clusters: 

Export:

# sacctmgr dump cluster=bcm file=bcm.dat

Import:

# sacctmgr load bcm.dat 

The sacctmgr man pages has more on this.

Updated on October 30, 2020

Related Articles

Leave a Comment