Skip to main content

Queue Setup

Slurm FairShare & Queue Position 

This guide explains:

  • what FairShare is

  • how to check your FairShare status

  • how to understand your job’s position in the queue


What FairShare is

FairShare is how the cluster balances usage across users.

Key idea:

  • Users who have used fewer resources recently get higher scheduling priority.

  • Users who have used more resources get lower priority until usage evens out.

FairShare does not guarantee strict queue order — the scheduler also considers:

  • job size

  • age (how long a job has waited)

  • partition limits

  • reservations

  • backfill opportunities

But FairShare is one of the biggest factors on shared partitions (e.g. grit_nodes).


How to check your FairShare status

View your FairShare factor

sshare -u $USER -l

Important columns:

  • RawUsage → how many resources you’ve used recently

  • NormUsage → usage normalized against the cluster

  • FairShare → your scheduling advantage

How to interpret FairShare

FairShare value Meaning
> 1.0 You have low recent usage → higher priority
≈ 1.0 Balanced usage
< 1.0 You’ve used more than your share recently → lower priority

Example:

Account      User     RawUsage   NormUsage   FairShare
slurm_users  alice    200000     0.8         0.62
slurm_users  bob      10000      0.2         1.25

Bob will typically get scheduled sooner than Alice for identical jobs.


How to check your jobs

View your jobs

squeue -u $USER

See why a job is pending

squeue -j <JOBID> -o "%.18i %.8T %.30R"

Common reasons:

  • Priority → waiting behind higher priority jobs

  • Resources → waiting for nodes to free

  • Dependency → waiting on another job

  • QOSMax* → hitting limits

  • AssocGrp* → account usage limits


Understanding your position in the queue

Slurm does not show an exact numeric “position,” because scheduling changes continuously.
However, you can see your relative rank by priority order.


Show pending jobs sorted by priority

squeue -p grit_nodes -t PD --sort=-P \
  -o "%.18i %.10Q %.12P %.10u %.8T %.10M %.20R"

Columns:

  • Q = job priority

  • Highest priority jobs appear first → effectively “front of queue”


Show only your pending jobs by priority

squeue -u $USER -t PD --sort=-P \
  -o "%.18i %.10Q %.12P %.8T %.10M %.20R"

Optional: estimate how many jobs are ahead of you

This gives a rough count of pending jobs with higher priority in the same partition.

JOBID=<JOBID>
PART=$(squeue -j $JOBID -h -o %P)
MYP=$(squeue -j $JOBID -h -o %Q)
squeue -p "$PART" -t PD -h -o %Q | awk -v p="$MYP" '$1 > p {c++} END{print c+0}'

Note: backfill scheduling may allow lower-priority jobs to start sooner if they fit.


Tips for getting scheduled sooner

  • Avoid submitting many large jobs at once

  • Use appropriate resource requests (CPU, memory, GPU)

  • Shorter jobs often start sooner due to backfill

  • Watch FairShare — heavy usage lowers priority temporarily