Ticket 8158

Summary: Setting account limits per partition?
Product: Slurm Reporter: Kilian Cavalotti <kilian>
Component: AccountingAssignee: Director of Support <support>
Status: RESOLVED INFOGIVEN QA Contact:
Severity: 4 - Minor Issue    
Priority: ---    
Version: 19.05.4   
Hardware: Linux   
OS: Linux   
Site: Stanford Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: Sherlock CLE Version:
Version Fixed: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---

Description Kilian Cavalotti 2019-11-27 10:12:56 MST
Hi!

I'm looking for a way to enforce resource limits at the account level, for different partitions.

Let's say I have partitions P1 and P2, and two UNIX groups A and B mapped to Slurm accounts A and B. There are multiple users in each group.

I'd like to set limits so that:

1. all users from group A can use a maximum of say 20 CPUs at once in partition P1 (and none in P2)

2. all users from group B can use a maximum of 10 CPUs at once in P1, and 5 CPUs at once in P2.

I guess the idea of an account-partition association (without user) doesn't really exist right now, so how I can I specify different per-partition account-level limits?

Thanks!
-- 
Kilian
Comment 1 Douglas Wightman 2019-11-27 14:18:21 MST
Unfortunately you are correct that account-partition associations are not in slurm. There might be some other ways to workaround this. 

Have you considered setting up a QOS for each Account/Partition pair? You could combine that with a job-submit plugin that automatically assigns the job to the correct QOS based on the user, account, and partition specified by the user.
Comment 2 Kilian Cavalotti 2019-11-27 14:55:23 MST
Hi Douglas, 

(In reply to Douglas Wightman from comment #1)
> Unfortunately you are correct that account-partition associations are not in
> slurm. There might be some other ways to workaround this. 
> 
> Have you considered setting up a QOS for each Account/Partition pair? You
> could combine that with a job-submit plugin that automatically assigns the
> job to the correct QOS based on the user, account, and partition specified
> by the user.

Thanks for the quick response.

Yes, account+partition QOSes (plus job_submit plugin for enforcement) were second on our list of things to try. Thanks for the suggestion, we just wanted to make sure we weren't missing something obvious at the Account level.

Thanks! 
-- 
Kilian
Comment 3 Kilian Cavalotti 2019-11-27 18:42:35 MST
Forgot to close.