Have a Question?
QOS – Quick Guide
QoS (Quality of Service) in Slurm is a tool used to prioritize and allocate resources within a cluster based on different jobs specific to requirements of user groups. The primary function of QoS is to track resource usage and manage billing information specfic to lab groups. QoS allows for efficient and effective resource allocation, especially in large and busy clusters, where multiple users may be submitting jobs concurrently. Also, the it allows users or user groups to augment job priority if the resources are busy.
We can set up and configure different QoS levels, and then assign each job or user to a specific QoS based on their priorities or requirements.
Specifying QoS in a batch file
To specify the QoS in a Slurm batch file, you can use the #SBATCH –qos=<qos_name> directive in the header of your batch file. For example:
#!/bin/bash
#SBATCH --qos=proj-xx
#SBATCH --job-name=my_job
#SBATCH --output=my_job.out
# Your commands here
In this example, the #SBATCH --qos=high directive sets the job’s QoS to “high”. Note that the QoS name specified here must be defined by the Slurm administrator and recognized by the cluster’s Slurm configuration. Additionally, the user must have permission to use the specified QoS, as defined by the Slurm administrator.