Scheduling policies

更新时间:
复制 MD 格式

A scheduling policy determines the order in which queued jobs are dequeued. Selecting the right policy can improve job throughput and maximize your computing resource utilization.

Background

Each job submitted to a resource quota in Platform for AI (PAI) has a priority value from 1 to 9. A higher value indicates a higher priority. When multiple jobs request computing resources at the same time, they are placed in a queue and wait for execution based on their priority.

To improve computing resource utilization, PAI provides several scheduling policies at the resource quota level. The policy you choose affects the execution order of pending jobs but does not affect jobs that are already running.

Scheduling policies

When you configure a resource quota, you can choose from the following scheduling policies. The following sections describe how each policy works.

FIFO policy

If the first job in the queue cannot be dequeued, the system repeatedly attempts to dequeue it. The system does not skip the job to process subsequent jobs.

image

Round-robin policy

If the first job in the queue cannot be dequeued, the system skips it and attempts to dequeue subsequent jobs.

image

Balance policy

  • If the first job in the queue cannot be dequeued, the system repeatedly attempts to dequeue it without skipping it.

  • If the first job waits longer than a predefined timeout period, which is typically a few minutes, the system applies the round-robin policy to the first and second jobs.

  • If the second job also exceeds the timeout period, the system expands the round-robin policy to include the first three jobs. This pattern continues for subsequent jobs in the queue.

image

Intelligent policy

When you select the intelligent policy, the system automatically applies a scheduling strategy based on each job's assigned priority:

  • For jobs with a priority from 7 to 9, the system uses the FIFO policy.

  • For jobs with a priority from 1 to 6, the system uses the round-robin policy. As these jobs wait in the queue, they are gradually promoted. However, they cannot be promoted to a priority higher than 6.

image

In the preceding diagrams, Item1 and Item2 have a priority of 7 or higher. Items 3 through N have a priority lower than 7.

Related topics

When you create a resource quota, select a scheduling policy based on the principles described in this topic. For detailed instructions, see Resource quota overview.