Updated on 2025-05-21 GMT+08:00

Job Queues

A job queue is a collection of jobs that are running or waiting for resource allocation. Each partition corresponds to a logical queue. You can set independent scheduling policies and resource limits for each partition.

Partition

For details about partitions, see Partition Management.

Managing Job Queues

  • Set the CPU and memory of a job and submit the job to a specific partition.

  • View the job statuses.

Job Templates

Create a job template to set the CPU and memory for jobs.

QoS

QoS is used to limit the resource usages (such as the number of concurrent jobs and maximum CPU and memory) for users or groups. It is used together with partitions for fine-grained control.

  1. Create a QoS policy.
    sacctmgr add qoshigh_priority set MaxJobs=50 Priority=1000
    • MaxJobs: indicates the maximum number of jobs.
    • Priority: A larger value indicates a higher priority.

  2. Apply the QoS policy to a partition.

    Jobs can only use the QoS set for the partition.

Job Functions

  • Job Dependencies
    sbatch --dependency=afterok:<job_id> job2.sh # Run job2 after job1 is successfully executed.

  • Job Array
    sbatch --array=0-4 job_array.sh  # Submit 100 similar jobs.