Implement Round-Robin Scheduling
Select jobs from queues by examining the queues in round-robin fashion.
Round Robin Scheduling
Overview of round-robin scheduling.
PBS Professional can select jobs from queues by examining the queues in round-robin fashion. The behavior is round-robin only when you have groups of queues where all queues in each group have the same priority.
The order in which queues are selected is determined by each queue’s priority. If queue priorities are not set, they are undefined. If you do not prioritize the queues, their order is undefined.
When you have multiple queues with the same priority, a scheduler round-robins through all of the queues with the same priority as a group. So if you have Q1, Q2, and Q3 at a priority of 100, Q4 and Q5 at a priority of 50, and Q6 at a priority of 10, a scheduler will round-robin through Q1, Q2, and Q3 until all of those jobs are out of the way, then the scheduler will round-robin through Q4 and Q5 until there are no more jobs in them, and finally the scheduler will go through Q6.
When using the round-robin method with queues that have unique priorities, a scheduler runs all jobs from the first queue, then runs all the jobs in the next queue, and so on.
To specify that PBS Professional should use the round-robin method to select jobs, enable the Round-Robin Scheduling parameter.
The Round-Robin Scheduling parameter 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.
You can use the round-robin method as a resource allocation tool. For example, if you need to run the same number of jobs from each group, you can put each group’s jobs in a different queue, and then use round-robin to run jobs, one from each queue.
- Routing queues try destinations in round-robin fashion, in the order listed.
- The SMP cluster distribution parameter, smp_cluster_dist, can use a round-robin method to place jobs.
Round Robin Caveats
Each scheduling cycle starts with the highest-priority queue. Therefore, when using round-robin, this queue gets preferential treatment.
When enabled the Round-Robin Scheduling parameter overrides the Schedule By Queue parameter.
If round robin and strict ordering are enabled, and backfilling is disabled, and the top job cannot run, whether because of resources or rejection by MoM, no job runs. However, if round robin is enabled and strict ordering is disabled, and the top job in the current queue cannot run, the next top job is considered instead. For example, we have 3 queues, each with 3 jobs, and with the same priority:
Q1: J1 J2 J3
Q2: J4 J5 J6
Q3: J7 J8 J9
If round robin and strict_ordering are enabled, and J1 cannot run, no job runs.
If round robin is enabled and strict ordering is disabled, and J1 cannot run, job order is J4, J7, J2, J5, J8, J3, etc.
With round robin and strict ordering enabled, a job continually rejected by a runjob hook may prevent other jobs from being run. A well-written hook would put the job on hold or requeue the job with a start time at some later time to allow other jobs in the same queue to be run.
Use Round-Robin Scheduling
Specify whether the scheduler considers one job from the first queue, then one job from the second queue, and so on in a circular fashion.