Implement Preemption
Preempt currently running jobs in order to run higher-priority work.
Preemption Scheduling
Overview of preemption and parameters.
- You can define a set of preemption priorities for all jobs. Jobs that have high preemption priority preempt those with low preemption priority. Preemption priority is mostly independent of execution priority.
- You can specify a set of preemption targets for each job. You can also set defaults for these targets at the server and queues. Preemption targets are jobs in specific queues or that have requested specific resources.
Preemption is a primetime option, meaning that you can configure it separately for primetime and non-primetime, or you can specify it for all of the time.
If preemption is enabled, a scheduler uses preemption as part of its normal pattern of examining each job and figuring out whether or not it can run now. If a job with high preemption priority cannot run immediately, a scheduler looks for jobs with lower preemption priority. A scheduler finds jobs in the lowest preemption level that have been started the most recently. A scheduler preempts these jobs and uses their resources for the higher-priority job. A scheduler tracks resources used by lower-priority jobs, looking for enough resources to run the higher-priority job. If a scheduler cannot find enough work to preempt in order to run a given job, it will not preempt any work.
A job running in a reservation cannot be preempted.
A job’s preemption priority is determined by its preemption level.
Parameters
- Enable Job Preemption
- Enables job preemption. Default is enabled for both prime and non-prime time.
- Sort Preemption Jobs by Start Time
- Whether jobs most eligible for preemption will be sorted according to their start times. Allowable values: “min_time_since_start”, or no preempt_sort setting. If set to “min_time_since_start”, first job preempted will be that with most recent start time. If not set, preempted job will be that with longest running time. Default is Default "min_time_since_start".
Use Preemption
Preempt currently running jobs in order to run higher-priority work.