Absolute priority scheduling (APS)
Absolute job priority scheduling (APS) provides a mechanism to control the job dispatch order to prevent job starvation. APS provides administrators with detailed yet straightforward control of the job selection process. When configured in a queue, APS sorts pending jobs for dispatch according to a job priority value calculated based on several configurable job-related factors. Each job priority weighting factor can contain sub-factors. Factors and sub-factors can be independently assigned a weight.
- APS sorts only the jobs. Job scheduling is still based on configured LSF scheduling policies. LSF attempts to schedule and dispatch jobs by their order in the APS queue, but the dispatch order is not guaranteed.
- The job priority is calculated for pending jobs across multiple queues that are based on the sum of configurable factor values. Jobs are then ordered based on the calculated APS value.
- You can adjust the following values for APS factors:
- A weight for scaling each job-related factor and sub-factor
- Limits for each job-related factor and sub-factor
- A grace period for each factor and sub factor
- To configure absolute priority scheduling (APS) across multiple queues, define APS queue groups. When you submit a job to any queue in a group, the job's dispatch priority is calculated by using the formula that is defined with the APS_PRIORITY parameter in the group's parent queue in the lsb.queues file.
- Administrators can also set a static system APS value for a job. A job with a system APS priority is guaranteed to have a higher priority than any calculated value. Jobs with higher system APS settings have priority over jobs with lower system APS settings.
- Administrators can use the ADMIN factor to manually adjust the calculated APS value for individual jobs.
Scheduling priority factors
To calculate the job priority, APS divides job-related information into several categories. Each category becomes a factor in the calculation of the scheduling priority. You can configure the weight, limit, and grace period of each factor to get the wanted job dispatch order.
LSF uses the weight of each factor to sum the value of each factor.
- Factor weight
- The weight of a factor expresses the importance of the factor in the absolute scheduling priority. The factor weight is multiplied by the value of the factor to change the factor value. A positive weight increases the importance of the factor, and a negative weight decreases the importance of a factor. Undefined factors have a weight of zero, which causes the factor to be ignored in the APS calculation.
- Factor limit
- The limit of a factor sets the minimum and maximum absolute value of each weighted factor. Factor limits must be positive values.
- Factor grace period
- Each factor can be configured with a grace period. The factor is only counted as part of the APS value when the job was pending for a long time and it exceeds the grace period.
APS_PRIORITY syntax
APS_PRIORITY=WEIGHT[[factor, value] [sub factor, value]...]...] LIMIT[[factor, value] [sub factor, value]...]...] GRACE_PERIOD[[factor, value] [sub factor, value]...]...]
Factors and sub factors
|
Where LSF gets the job information for each factor
Factor or sub factor | Gets job information from... |
---|---|
MEM | The value for jobs that are submitted with -R "rusage[mem]" For compound resource requirements submitted with -R "n1*{rusage[mem1]} + n2*{rusage[mem2]}" the value of MEM depends on whether resources are reserved per slot.
For alternative resource requirements, use a plug-in that considers all alternatives and uses the maximum value for the resource under consideration (SWP or MEM). |
SWAP | The value for jobs that are submitted with the -R "rusage[swp]"
option For compound and alternative resource requirements, SWAP is determined in the same manner as MEM. |
PROC | The value of
n for jobs that are submitted with the bsub -n command
(min_task, max_task), or the value of the
TASKLIMIT parameter in the lsb.queues file Task limits can be specified at the job-level (bsub -n), the application-level (TASKLIMIT), and at the queue-level (TASKLIMIT). Job-level limits (bsub -n) override application-level TASKLIMIT, which overrides queue-level TASKLIMIT. Job-level limits must fall within the maximum and minimum limits of the application profile and the queue. Compound resource requirements by their nature express the number of processors a job requires. The minimum number of processors that are requested by way of job-level (bsub -n), application-level (TASKLIMIT), and queue-level (TASKLIMIT) must be equal and possibly greater than the number of processors that are requested through the resource requirement. If the final term of the compound resource requirement does not specify a number of processors, then the relationship is equal to or greater than. If the final term of the compound resource requirement does specify a number of processors, then the relationship is equal to, and the maximum number of processors that are requested must be equal to the minimum requested. LSF checks only that the default value supplied in TASKLIMIT (the first value of a pair or middle value of three values) is a multiple of a block. Maximum or minimum TASKLIMIT does not need to be a multiple of the block value. Alternative resource requirements might not specify the number of processors a job requires. The minimum number of processors that are requested by way of job-level (bsub -n command), application-level (the TASKLIMIT parameter in the lsb.applications file), and queue-level (the TASKLIMIT parameter in the lsb.queues file) must be less than or equal the minimum that is implied through the resource requirement. The maximum number of processors that are requested by way of job-level (the bsub -n command), application-level (the TASKLIMIT parameter in the lsb.applications file), and queue-level (the TASKLIMIT parameter in the lsb.queues file) must be equal to or greater than the maximum implied through the resource requirement. Any alternative that does not specify the number of processors is assumed to request the range from minimum to maximum, or request the default number of processors. |
JPRIORITY | The dynamic priority of the job, which is updated every scheduling cycle and escalated by interval that is defined in the JOB_PRIORITY_OVER_TIME parameter defined in the lsb.params file |
QPRIORITY | The priority of the job submission queue |
FS | The fair share priority value of the submission user |
APP | The priority of the application profile |
USER | The priority of the user |
UG | The priority of the user group |