Ticket 18067 - RPC rate limit support: How to configure jobs per second per user?
Summary: RPC rate limit support: How to configure jobs per second per user?
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: slurmctld (show other tickets)
Version: 23.02.6
Hardware: Linux Linux
: --- 4 - Minor Issue
Assignee: Benjamin Witham
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2023-10-31 09:51 MDT by Ole.H.Nielsen@fysik.dtu.dk
Modified: 2023-11-16 01:23 MST (History)
0 users

See Also:
Site: DTU Physics
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:
CLE Version:
Version Fixed: 23.11.0
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
Description Ole.H.Nielsen@fysik.dtu.dk 2023-10-31 09:51:13 MDT
While we (the sysadmins, that is) are generally happy about the new RPC rate limit feature in 23.02, some users are complaining that legitimate job submissions have become unacceptably sluggish.  As part of workflows these users want to submit 500-1000 jobs at the same time, and the rate limiting makes them really frustrated.  I have tried to promote job arrays, but that seems to be very difficult to implement in their workflow software.

I have tried to relax the rate limiting parameters, guessing that this would allow more jobs per second:

SlurmctldParameters = enable_configless,rl_enable,rl_refill_rate=50,rl_bucket_size=100

What we're seeing in slurmctld.log is that this configuration permits only 2 jobs to be submitted every 5 seconds or so, for example:

[2023-10-31T16:28:35.425] _slurm_rpc_submit_batch_job: JobId=6807465 InitPrio=292215 usec=2702
[2023-10-31T16:28:35.475] _slurm_rpc_submit_batch_job: JobId=6807466 InitPrio=291510 usec=3413
[2023-10-31T16:28:35.512] RPC rate limit exceeded by uid 1035 with REQUEST_SUBMIT_BATCH_JOB, telling to back off
[2023-10-31T16:28:35.616] RPC rate limit exceeded by uid 1035 with REQUEST_HET_JOB_ALLOC_INFO, telling to back off
[2023-10-31T16:28:36.518] RPC rate limit exceeded by uid 1035 with REQUEST_SUBMIT_BATCH_JOB, telling to back off
[2023-10-31T16:28:36.618] RPC rate limit exceeded by uid 1035 with REQUEST_HET_JOB_ALLOC_INFO, telling to back off
[2023-10-31T16:28:37.524] RPC rate limit exceeded by uid 1035 with REQUEST_SUBMIT_BATCH_JOB, telling to back off
[2023-10-31T16:28:37.619] RPC rate limit exceeded by uid 1035 with REQUEST_HET_JOB_ALLOC_INFO, telling to back off
[2023-10-31T16:28:38.530] RPC rate limit exceeded by uid 1035 with REQUEST_SUBMIT_BATCH_JOB, telling to back off
[2023-10-31T16:28:38.621] RPC rate limit exceeded by uid 1035 with REQUEST_HET_JOB_ALLOC_INFO, telling to back off
[2023-10-31T16:28:39.536] RPC rate limit exceeded by uid 1035 with REQUEST_SUBMIT_BATCH_JOB, telling to back off
[2023-10-31T16:28:39.622] RPC rate limit exceeded by uid 1035 with REQUEST_HET_JOB_ALLOC_INFO, telling to back off
[2023-10-31T16:28:40.545] _slurm_rpc_submit_batch_job: JobId=6807467 InitPrio=292187 usec=2721
[2023-10-31T16:28:40.589] _slurm_rpc_submit_batch_job: JobId=6807468 InitPrio=291787 usec=2957

The rl_X parameters in slurm.conf are really difficult to translate into actual user experiences.  Therefore I'd like to ask for guidance:

Question: Is there a set of rl_X parameters which will give each user the ability to submit 2 jobs per second?  Or more generally N jobs per second, N being a small number?

Thanks,
Ole
Comment 1 Benjamin Witham 2023-11-01 11:59:08 MDT
The rate limiting feature was developed for a specific site, and there is no one size fits all for the settings. At this moment, there is no easy analog for your jobs-per-second request. I would suggest increasing your rl_refill_rate or the size of your buckets.

> What we're seeing in slurmctld.log is that this configuration permits only 2 
> jobs to be submitted every 5 seconds or so

Is this 2 jobs per user, or 2 jobs overall?
Comment 2 Ole.H.Nielsen@fysik.dtu.dk 2023-11-01 12:37:11 MDT
Hi Benjamin,

(In reply to Benjamin Witham from comment #1)
> The rate limiting feature was developed for a specific site, and there is no
> one size fits all for the settings. At this moment, there is no easy analog
> for your jobs-per-second request. I would suggest increasing your
> rl_refill_rate or the size of your buckets.

It's too bad that there is no approximate way even to guess at jobs-per-second.  This makes it hard to optimize the user experience, while at the same time protecting slurmctld from rogue users :-(

I already did increase rl_refill_rate and bucket size (did scontrol reconfig), but it didn't seem to improve jobs-per-second.  I wonder what the developers had in mind when they designed the rl_enable related parameters?

> > What we're seeing in slurmctld.log is that this configuration permits only 2 
> > jobs to be submitted every 5 seconds or so
> 
> Is this 2 jobs per user, or 2 jobs overall?

Well, it's the same uid 1035 being throttled while he was submitting 500 jobs from his workflow system.

Ole
Comment 4 Ole.H.Nielsen@fysik.dtu.dk 2023-11-07 15:15:54 MST
Hi Benjamin,

(In reply to Benjamin Witham from comment #3)
> The rate limits will not update without a slurmctld restart. Did you issue a
> slurmctld restart or just the scontrol reconfigure?

I only did "scontrol reconfig".  AFAICT there is no documented requirement of restarting slurmctld when modifying the rl_enable family of parameters.

If this is indeed the case, the slurm.conf manual page should have a highlighted entry in the "SlurmctldParameters" section that a restart is required.

So now I restarted slurmctld, and the rate limit is logged without giving any details:

[2023-11-07T23:11:32.184] RPC rate limiting enabled
[2023-11-07T23:11:37.191] SchedulerParameters=default_queue_depth=2000,max_rpc_cnt=50,max_sched_time=2,partition_job_depth=0,sched_max_job_start=0,sched_min_interval=50000

Maybe the logging ought to be a bit more verbose?

Thanks,
Ole
Comment 5 Benjamin Witham 2023-11-13 12:02:24 MST
My apologies, you are correct, a slurmctld restart is not needed for a rate limit change. Ignore my statement in comment 3.

The rate limit parameters are a SlurmctldParameters option, did this not print in your logs?

> Maybe the logging ought to be a bit more verbose?
What sort of more verbose logging output are you suggesting?
Comment 6 Ole.H.Nielsen@fysik.dtu.dk 2023-11-13 12:21:07 MST
(In reply to Benjamin Witham from comment #5)
> My apologies, you are correct, a slurmctld restart is not needed for a rate
> limit change. Ignore my statement in comment 3.

IMHO, you seem to be right: After I restarted slurmctld, the rate limiting was much less frequent than with my original parameters.  I'm fairly certain that "scontrol reconfig" didn't update the rl_enable parameters because up to 100.000's of rate limit lines were logged even after the reconfig.  This of course varies with user habits.

Can you confirm whether or not a slurmctld restart is really required?

> The rate limit parameters are a SlurmctldParameters option, did this not
> print in your logs?

I currently have this setting:

$ scontrol show config | grep SlurmctldParameters
SlurmctldParameters     = enable_configless,rl_enable,rl_refill_rate=10,rl_bucket_size=50

When I restart slurmctld only these lines are printed in the log:

[2023-11-13T20:15:08.988] RPC rate limiting enabled
[2023-11-13T20:15:13.995] SchedulerParameters=default_queue_depth=2000,max_rpc_cnt=50,max_sched_time=2,partition_job_depth=0,sched_max_job_start=0,sched_min_interval=50000

> > Maybe the logging ought to be a bit more verbose?
> What sort of more verbose logging output are you suggesting?

IMHO, ALL of the rl_enable family parameter values shown in the slurm.conf manual page ought to be printed to the log so that we have a log of the settings.

Thanks,
Ole
Comment 7 Benjamin Witham 2023-11-13 12:32:32 MST
Ah I understand. The rate limit parameters are currently underneath the debug log level. I'll see if this is something we're interested in promoting.
Comment 8 Benjamin Witham 2023-11-13 12:54:05 MST
Do you have a specific use-case(s) for the needing the new levels?
Comment 9 Ole.H.Nielsen@fysik.dtu.dk 2023-11-13 13:14:03 MST
(In reply to Benjamin Witham from comment #8)
> Do you have a specific use-case(s) for the needing the new levels?

In order to tune and debug rl_enable parameters, we need to know what they are!  And we need the slurmctld.log to record the settings at the normal logging level.

In the present case, I have no idea about the currently active rl_enable parameters and whether or not they were updated by "scontrol reconfig" or if a restart was necessary!

We would like to empirically experiment with rate limiting of user job submission in a trial-and-error fashion, given that rl_enable parameters have no understandable relationship to user experiences as stated in comment 1.  

Thanks,
Ole
Comment 12 Benjamin Witham 2023-11-15 10:57:29 MST
We've upgraded the log message of the rate limit parameters from debug to info. This is in ahead of 23.11.0 in commit 50cf4e284c.
Comment 13 Ole.H.Nielsen@fysik.dtu.dk 2023-11-16 01:23:30 MST
(In reply to Benjamin Witham from comment #12)
> We've upgraded the log message of the rate limit parameters from debug to
> info. This is in ahead of 23.11.0 in commit 50cf4e284c.

Thanks a lot, this will be nice to have in 23.11.  I couldn't lookup commit 50cf4e284c though, do you have a direct link?

Ole