Repository navigation
QOS limits and flex
Kasper Skytte Andersen edited this page Oct 15, 2026
·
7 revisions
With [limits] mode set (and enforce), sjp helps jobs pending only on
QOSMaxCpuPerUserLimit or MaxCpuPerAccount when:
- the job fits one node's free CPUs and memory now, and
- at least
min_idle_share(25%) of placeable capacity is idle; withcount_pending, after counting the CPUs of jobs waiting for room (Resources, Priority) as taken.
Raises both caps of the job's QOS to ceiling (2×), for everyone, for pulse_seconds (60 s).
- starts after
hysteresis(5) consecutive checks, ~75 s; - ends early below
lower_below(10%) idle; thencooldown_seconds(5 min) at base; - base caps are read from the QOS before each pulse; manual changes during a pulse are kept;
- base caps are saved in
state_fileduring a pulse and restored after a crash or stop.
Moves held jobs to the QOS flex_qos_name (flex), highest priority first, only as many
as fit now (unstarted moves count).
- not started within
flex_revert_after(60 s) → moved back; after a restart, all pending flex jobs move back; - a job is moved at most once per
cooldown_seconds; - the move is recorded in
AdminComment(;qos=normal>flex); - each array task on its own; not GPU, pinned or multi-node jobs.
Setup:
sacctmgr add qos flex
sacctmgr modify qos flex set MaxTRESPU=cpu=864 MaxTRESPA=cpu=1760 # the extra allowed
sacctmgr -i modify account root set qos+=flex # inherited by allUsers without access to flex are skipped and named in the log; sjp never changes
associations. Give flex the same priority and usage factor as your normal QOS if
fair-share should not change.
In both modes, jobs started over the cap run to completion. To make the extra use
temporary, make flex preemptible:
# slurm.conf
PreemptType=preempt/qos
PreemptMode=REQUEUE
sacctmgr modify qos normal set preempt=flex