Introduction
When a team needs to manage scattered compute resources, whether it is a research group’s GPU servers, batch bioinformatics analysis, or capacity scheduling for an AI training cluster, Slurm is a common choice. It has been proven at scale for resource allocation, fair scheduling, and accounting.
Slurm has plenty of documentation, but building a production-ready cluster from scratch still means stitching together the official manual, mailing lists, and various blog posts. This post connects the path from single-node validation to multi-node deployment, and focuses on the operational parts the official docs cover less: how cgroup v2 resource isolation actually behaves, how to test slurmctld failover, node health check scripts, multi-tenant QoS, and Lmod plus LDAP/SSSD for a school environment.
The setup below was validated hands-on:
- OS: Debian 12 (Bookworm), kernel 6.1.x, cgroup v2 (unified hierarchy)
- Slurm version:
22.05.8-4+deb12u3from the official Debian repository; install commands below - 2026-11 test scale: 2 controllers (primary/backup) + 2 compute nodes, with
StateSaveLocationon shared NFS. Multi-node scheduling, cgroups, accounting, QoS, failover, Lmod, LDAP/SSSD login, CephFS shared directories, andpam_slurm_adoptwere all actually run; results are in “Test Environment and Results” at the end - The 4-node and 32-node configurations in this post are extended material. GPU/GRES was tested with PVE Intel GVT-g. Slurm-web, Open OnDemand (Authentik OIDC), Teleport (local users + MFA), and the Prometheus/Grafana alert chain were also actually run. The CephFS section uses the example name
slurmfs; replace it with your filesystem name when deploying, and update the cephx caps to match
If you install 23.02+ or 24.05+ from the SchedMD repository, some parameter names may differ. Starting with 25.05, the select/cons_res plugin has been removed; use select/cons_tres instead. Check the official documentation for your version.
The post is organized as deployment, usage, multi-tenancy, operations, and test results, in that order, so it is long. Readers who only want the outcome can jump straight to “Test Environment and Results” at the end.
What is Slurm?
- An open-source job scheduling and resource management system, widely used in HPC clusters.
- Core components:
- slurmctld: controller daemon (manages queues, allocates resources).
- slurmd: compute node daemon (runs jobs).
- slurmdbd: accounting/audit database daemon (optional but recommended).
- munge: authentication component; every node shares the same key.
- Common commands: sinfo, squeue, sacct, srun, sbatch, scontrol, sacctmgr.
Deployment Overview
Architecture and Terminology
- Control node (Head/Controller): runs munge, slurmctld (optionally slurmdbd and a database).
- Compute node (Compute): runs munge, slurmd.
- Partition: a logical set of queues, for example debug, batch.
- Accounting: collects job, user, and project statistics through slurmdbd + MariaDB/MySQL.
Choosing a Deployment Shape
- Minimal single node (handy for learning or a dev machine): only slurmctld + slurmd + munge, no database.
- Small production: the control node runs slurmctld + slurmdbd + MariaDB, and compute nodes run only slurmd.
Multi-Node Cluster Architecture
The diagram below shows a typical multi-node Slurm cluster topology. Users submit jobs through a login node, slurmctld schedules them onto compute nodes, and every node shares storage so paths stay consistent:
graph TD
User["User SSH"] --> Login["Login Node<br/>Slurm Client + munged"]
Login -->|"sbatch / srun"| CTLD["slurmctld<br/>Controller"]
CTLD -->|"dispatch"| N1["node01 slurmd"]
CTLD -->|"dispatch"| N2["node02 slurmd"]
CTLD -->|"dispatch"| N3["node03 slurmd"]
CTLD -->|"dispatch"| N4["node04 slurmd"]
CTLD --- DBD["slurmdbd"]
DBD --- DB[("MariaDB")]
FS[("Shared Storage<br/>CephFS / NFS")] -.-> Login
FS -.-> N1
FS -.-> N2
FS -.-> N3
FS -.-> N4
Key design points:
- The control node carries slurmctld, slurmdbd, and MariaDB and is the cluster’s scheduling brain; in production, keep it physically separate from compute nodes so user jobs cannot affect scheduler stability.
- The login node installs only the Slurm client tools and munged. It does not run slurmd and takes no part in computation.
- Every node shares the same Munge key; a clock skew over 300 seconds will break authentication.
- Shared storage ensures scripts and data written on the login node have the same paths on compute nodes.
Roles and Network Topology
Put the management plane, identity source, storage, and compute nodes on one diagram; in a real deployment you usually split out management, storage, and compute networks:
graph TB
subgraph Users["Users / Students"]
U["SSH / sbatch / srun"]
end
subgraph Login["Login Node"]
L["slurm-client + munge + SSSD"]
end
subgraph Control["Control / Management Node"]
C["slurmctld + slurmdbd + MariaDB"]
LDAP["OpenLDAP / AD"]
end
subgraph Compute["Compute Nodes"]
N1["slurmd + cgroup v2 + Lmod"]
N2["slurmd + cgroup v2 + Lmod"]
end
subgraph Storage["Shared Storage"]
FS["CephFS / NFS / parallel filesystem"]
end
U --> L
L -->|"submit / query"| C
C -->|"dispatch"| N1
C -->|"dispatch"| N2
L -.->|"LDAP/SSSD"| LDAP
N1 -.->|"LDAP/SSSD"| LDAP
N2 -.->|"LDAP/SSSD"| LDAP
L --- FS
N1 --- FS
N2 --- FS
This is a logical topology. In production, separate the management network (Slurm/Munge/LDAP) from the storage network (CephFS/NFS), and add a compute network (MPI/RDMA) as needed. Do not mix storage and management traffic on the same 1Gb link.
Job Lifecycle
The full path of a typical batch job from submission to completion:
sequenceDiagram
participant U as User
participant L as Login Node
participant C as slurmctld
participant D as slurmdbd
participant N as Compute Node
U->>L: sbatch job.sh
L->>C: Submit Request
C->>D: Log Submission
C->>C: Backfill Schedule
C->>N: Dispatch Job
N->>N: Execute Prolog
N->>N: Run User Job
N->>N: Execute Epilog
N->>C: Report Completion
C->>D: Log Completion
U->>L: sacct -j JOBID
L->>D: Query Accounting
D-->>U: Return Statistics
Deployment Flow
The deployment proceeds in dependency order:
flowchart LR
A["OS Baseline<br/>NTP Kernel"] --> B["Munge<br/>Auth"]
B --> C["MariaDB<br/>Database"]
C --> D["slurmdbd<br/>Accounting"]
D --> E["slurm.conf<br/>Core Config"]
E --> F["cgroup.conf<br/>Isolation"]
F --> G["slurmctld<br/>Controller"]
G --> H["slurmd<br/>Compute"]
H --> I["Validation<br/>sinfo srun"]
Installing on Debian
Applies to Debian 12 (Bookworm) or later. Package names may differ slightly between releases; confirm with apt search first.
Preparation (All Nodes)
- Hostnames and /etc/hosts resolve correctly (controllers and compute nodes can resolve each other).
- Time synchronization: install chrony or enable systemd-timesyncd so every node agrees on time.
- Firewall ports (if used):
- 6817/tcp: slurmctld
- 6818/tcp: slurmd
- 6819/tcp: slurmdbd (if enabled)
Time Synchronization (Internal NTP: 192.0.2.10)
Chrony is recommended. Configure it on every node and point it at your internal time server 192.0.2.10.
Install and configure:
sudo apt update
sudo apt install -y chrony
# Back up the original configuration
sudo cp /etc/chrony/chrony.conf /etc/chrony/chrony.conf.bak
# Use only the internal NTP source (keep or remove other pool/server entries as needed)
sudo sed -i 's/^pool .*/# &/' /etc/chrony/chrony.conf
echo -e "server 192.0.2.10 iburst" | sudo tee -a /etc/chrony/chrony.conf
# Allow queries on this host (optional; adjust to your security policy)
grep -q '^allow ' /etc/chrony/chrony.conf || echo 'allow 10.0.0.0/8' | sudo tee -a /etc/chrony/chrony.conf
sudo systemctl enable --now chrony
sleep 2
chronyc sources -v
chronyc tracking
If you use a firewall, make sure UDP/123 is allowed (nodes to 192.0.2.10, in both directions if needed).
OS Baseline and Kernel Tuning (All Nodes)
HPC workloads place high demands on process counts, file descriptors, and network buffers. Apply these settings consistently on every node:
# System-wide limits (/etc/security/limits.d/99-hpc.conf)
cat | sudo tee /etc/security/limits.d/99-hpc.conf >/dev/null <<'EOF'
* soft nofile 1048576
* hard nofile 1048576
* soft nproc unlimited
* hard nproc unlimited
* soft memlock unlimited
* hard memlock unlimited
* soft stack unlimited
* hard stack unlimited
root soft nofile 1048576
root hard nofile 1048576
EOF
# Kernel parameters (/etc/sysctl.d/99-hpc.conf)
cat | sudo tee /etc/sysctl.d/99-hpc.conf >/dev/null <<'EOF'
# Network buffers - needed for MPI and large-scale parallel communication
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 1048576
net.core.wmem_default = 1048576
net.ipv4.tcp_rmem = 4096 1048576 16777216
net.ipv4.tcp_wmem = 4096 1048576 16777216
# Connection tracking and TIME_WAIT - for many short-lived connections
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 15
# Virtual memory - avoid heavy swapping before OOM on compute nodes
vm.swappiness = 10
vm.overcommit_memory = 0
vm.dirty_ratio = 40
vm.dirty_background_ratio = 10
# PID limit - needed for large-scale parallel jobs
kernel.pid_max = 4194304
# inotify - needed by some scientific software and storage clients
fs.inotify.max_user_watches = 524288
fs.inotify.max_user_instances = 8192
EOF
sudo sysctl --system
Notes:
memlock unlimitedis required for InfiniBand RDMA and HugePages; if you use neither, you can lower it.vm.swappiness = 10is usually enough on compute nodes; the setting has no effect on nodes without a swap partition.- Tune these values after load testing against your actual hardware (memory size, NIC bandwidth, storage type).
Installing Required Packages
On the control node (runs only slurmctld/slurmdbd, no jobs):
sudo apt update
sudo apt install -y slurmctld slurm-client slurmdbd mariadb-server \
munge libmunge2
# Skip slurmdbd/mariadb-server if you do not need accounting
If the control node is also a compute node (single-node example), add slurmd:
sudo apt install -y slurmd
On compute nodes:
sudo apt update
sudo apt install -y slurmd slurm-client munge libmunge2
Note: confirm actual package names with apt search slurm. slurm-wlm is a meta package that pulls in slurmd, slurmctld, and slurm-client; installing by role is cleaner.
If slurmd is installed on the control node by mistake, it will fail because the local host is not in NodeName; run systemctl disable --now slurmd. Debian 12’s munge package already provides munge, unmunge, remunge, and mungekey; there is no munge-tools package and no create-munge-key.
Configuring Munge (All Nodes)
Create the key on the control node and distribute it to every node, keeping permissions correct.
sudo /usr/sbin/mungekey --create --force # Debian 12's munge package provides mungekey
sudo chown munge:munge /etc/munge/munge.key
sudo chmod 400 /etc/munge/munge.key
# Copy /etc/munge/munge.key to the same path on every compute node, with the same owner and mode
sudo systemctl enable --now munge
sudo systemctl status munge --no-pager
Quick self-check:
munge -n | unmunge
remunge
Configuring the Database and slurmdbd (Optional but Recommended, for Accounting)
On the control node:
sudo systemctl enable --now mariadb
sudo mysql -e "CREATE DATABASE slurm_acct_db;"
sudo mysql -e "CREATE USER 'slurm'@'localhost' IDENTIFIED BY 'strong_password';"
sudo mysql -e "GRANT ALL ON slurm_acct_db.* TO 'slurm'@'localhost'; FLUSH PRIVILEGES;"
Edit /etc/slurm/slurmdbd.conf (create it if missing; owner slurm or root, mode 600):
AuthType=auth/munge
DbdHost=controller-node
DbdPort=6819
SlurmUser=slurm
LogFile=/var/log/slurm/slurmdbd.log
PidFile=/run/slurmdbd.pid
StorageType=accounting_storage/mysql
StorageHost=localhost
StoragePort=3306
StorageUser=slurm
StoragePass=strong_password
StorageLoc=slurm_acct_db
DbdHost is the address slurmdbd actually listens on. On a single machine, localhost works. If login nodes or the backup controller also need to query accounting, set DbdHost and AccountingStorageHost in slurm.conf to the controller hostname or VIP, and allow 6819/tcp. When using a hostname, make sure it resolves to the management IP, not Debian’s default 127.0.1.1, or slurmdbd will only listen on loopback.
Start slurmdbd (create the log directory first, or slurmdbd cannot open LogFile):
sudo mkdir -p /var/log/slurm
sudo chown slurm:slurm /var/log/slurm
sudo systemctl enable --now slurmdbd
sudo systemctl status slurmdbd --no-pager
Generating and Editing slurm.conf
Start from a basic template generated by the official tool, then edit it:
# Generate a sample configuration on any machine (opens a browser), or use the interactive CLI wizard
# https://slurm.schedmd.com/configurator.html
Minimal single-node example (put the same file in /etc/slurm/slurm.conf on every node; mode 644):
ClusterName=debian-cluster
SlurmctldHost=controller-node # controller hostname
SlurmUser=slurm
StateSaveLocation=/var/lib/slurm-llnl
SlurmdSpoolDir=/var/spool/slurmd
SlurmctldLogFile=/var/log/slurm/slurmctld.log
SlurmdLogFile=/var/log/slurm/slurmd.log
AuthType=auth/munge
ProctrackType=proctrack/cgroup
ReturnToService=2
SchedulerType=sched/backfill
SelectType=select/cons_res
SelectTypeParameters=CR_CPU_Memory
TaskPlugin=task/affinity,task/cgroup
# Recommended priority and accounting policy (common when QoS/Assoc limits are enabled)
PriorityType=priority/multifactor
PriorityWeightAge=1000
PriorityWeightFairshare=100000
PriorityWeightPartition=10000
PriorityWeightJobSize=0
AccountingStorageEnforce=associations,limits,qos
# Accounting (if slurmdbd is enabled)
AccountingStorageType=accounting_storage/slurmdbd
AccountingStorageHost=controller-node
JobAcctGatherType=jobacct_gather/cgroup
# Nodes and partitions (adjust CPU/Mem to your hardware)
NodeName=controller-node CPUs=8 RealMemory=32000 State=UNKNOWN
PartitionName=debug Nodes=ALL Default=YES MaxTime=INFINITE State=UP
Multi-node example:
ClusterName=debian-cluster
SlurmctldHost=controller-node
SlurmUser=slurm
StateSaveLocation=/var/lib/slurm-llnl
SlurmdSpoolDir=/var/spool/slurmd
SlurmctldLogFile=/var/log/slurm/slurmctld.log
SlurmdLogFile=/var/log/slurm/slurmd.log
AuthType=auth/munge
ProctrackType=proctrack/cgroup
ReturnToService=2
SchedulerType=sched/backfill
SelectType=select/cons_res
SelectTypeParameters=CR_CPU_Memory
TaskPlugin=task/affinity,task/cgroup
PriorityType=priority/multifactor
PriorityWeightAge=1000
PriorityWeightFairshare=100000
PriorityWeightPartition=10000
PriorityWeightJobSize=0
AccountingStorageEnforce=associations,limits,qos
AccountingStorageType=accounting_storage/slurmdbd
AccountingStorageHost=controller-node
JobAcctGatherType=jobacct_gather/cgroup
NodeName=node[01-04] CPUs=16 RealMemory=64000 State=UNKNOWN
PartitionName=batch Nodes=node[01-04] Default=YES MaxTime=7-00:00:00 State=UP
Create the required directories and set permissions (all nodes):
sudo mkdir -p /var/lib/slurm-llnl /var/spool/slurmd /var/log/slurm
sudo chown -R slurm:slurm /var/lib/slurm-llnl /var/spool/slurmd /var/log/slurm
Initialize the cluster object (sacctmgr reads /etc/slurm/slurm.conf, so do this after the configuration exists and slurmdbd is running):
sudo sacctmgr add cluster debian-cluster
Separating the Login/Submit Node from Compute Nodes
Goal: provide a “login/submit node” where students and researchers can SSH in, write scripts, and submit jobs, while the jobs actually run on compute nodes. This avoids consuming significant resources on the login node.
In 2026-11 I validated a login node on a separate Debian 12 VM (
slurm-build, 10.31.0.229, 2 vCPU / 4 GB). It is separate from the controller and compute nodes, installs only the client and munge, and has noslurmd; results are in “Standalone Login Node in Practice” below.
What Does a Login/Submit Node Need?
- The same munge key as the cluster (/etc/munge/munge.key).
- Only the Slurm client tools (slurmd is not needed):
sudo apt update
# Debian 12 has a separate slurm-client package; no need for slurmd/slurmctld
sudo apt install -y slurm-client munge libmunge2
# Copy /etc/slurm/slurm.conf from the control node to the login node (keep it identical)
# Make sure SlurmctldHost points at the controller, and NodeName and Partition list only compute nodes
# Do not run slurmd on the login node, so it cannot execute jobs
sudo systemctl disable --now slurmd 2>/dev/null || true
sudo systemctl enable --now munge
Note: the slurm-client here is 22.05 from the Debian 12 repository. This cluster has since been upgraded to 23.11.4, and the login node actually uses /opt/slurm-23.11/bin built from the same version. Do not mix client and controller protocol versions; in production, keep client and controller versions aligned.
The login node’s hostname must not appear in slurm.conf’s NodeName list; define only compute nodes. For example:
NodeName=node[01-04] CPUs=16 RealMemory=64000 State=UNKNOWN
PartitionName=batch Nodes=node[01-04] Default=YES MaxTime=7-00:00:00 State=UP
AccountingStorageHost on the login node must point at the control node (or VIP) where slurmdbd runs. Do not copy localhost from the controller, or sacct will fail to reach the database.
Standalone Login Node in Practice
The test machine slurm-build (10.31.0.229, 2 vCPU / 4 GB) serves only as a login/submit node and later also hosts OOD. It does not run slurmd and does not appear in slurm.conf’s NodeName.
Configuration steps:
- Copy
/etc/slurm/slurm.confand the controller’s/etc/munge/munge.key, then start munge. - The login node needs a
slurmsystem user with the same UID as on the controller (64030 in this test). Without it, the client fails to parse the config withInvalid user for SlurmUser slurmand exits; the user needs neither a shell nor a home directory. - Add the controller, backup controller, and compute node hostnames to
/etc/hosts, becauseSlurmctldHostuses short hostnames. - Unify user UIDs: create
stu01(20002:20000) on both the login node and compute nodes, otherwise cross-node jobs cannot find the home directory or output files due to mismatched UIDs.
On the first test, munge had already started automatically when installed by apt. Overwriting munge.key and then running systemctl enable --now munge does not reload the key. The controller log showed Munge decode failed, and scontrol ping reported both controllers DOWN; systemctl restart munge fixed it. This is easy to miss after swapping or syncing keys.
Test commands and output (as stu01):
$ sinfo
PARTITION AVAIL TIMELIMIT NODES STATE NODELIST
debug* up infinite 2 idle slurm-node[1-2]
classA up 4:00:00 1 idle node-gpu
$ srun -A classa -n1 hostname
slurm-node1
$ sbatch -A classa --chdir=/tmp --wrap 'hostname'
Submitted batch job 74
$ sacct -j 74 --format=JobID,State,NodeList
JobID State NodeList
-------- ------------ -----------
74 COMPLETED slurm-node1
sbatch inherits the current directory at submission time, not $HOME. The first submission from /home/user failed:
[73.batch] error: Could not open stdout file /home/user/slurm-73.out: Permission denied
Changing to cd ~ or adding --chdir=/tmp fixed it. The login node and compute nodes did not share /home in this test, so output went to /tmp. In production, mount NFS/CephFS as described in the next section; otherwise user scripts, output, and home directories are not visible across nodes.
Recommended: Shared Home Directories and Data Paths
To let users write scripts on the login node and run them on compute nodes, share /home and project directories (NFS, SMB, or distributed storage all work). Example (for reference only; adapt it to your existing storage):
# /etc/exports on the server (illustrative)
/home 10.0.0.0/8(rw,sync,no_root_squash)
# /etc/fstab on clients (login/compute nodes, illustrative)
nfs-server:/home /home nfs defaults,_netdev 0 0
no_root_squashlets root on compute nodes keep root privileges over NFS; use it only when you fully trust the compute nodes. Withroot_squash, a rootchownin Prolog will fail, and users need to create directories themselves or you need another mechanism.
Using Ceph Storage (No Separate NFS Server)
For deploying the Ceph cluster itself, see Deploy a Ceph Cluster with cephadm; this section only covers mounting CephFS on Slurm nodes.
If your backend is Ceph, mount CephFS directly (no extra NFS VM, one less protocol layer).
The key requirement: the login/submit node and all compute nodes use the same mount paths (for example /home and /projects), so a job sees identical paths on any node.
Option A: mount CephFS directly (kernel cephfs)
- Install the client tools on the login/submit node and all compute nodes:
sudo apt install -y ceph-common
- On the Ceph cluster, create a cephx account with minimal privileges for HPC (example: client.hpc) and restrict it to the paths you need:
Run this on a Ceph admin node (adjust the FS name, paths, and pool as needed):
# Create/get the key (example; adjust to your Ceph version and security policy)
ceph auth get-or-create client.hpc \
mon 'allow r' \
mds 'allow r, allow rw path=/home, allow rw path=/projects' \
osd 'allow rw tag cephfs data=slurmfs' \
> /etc/ceph/ceph.client.hpc.keyring
Distribute the generated keyring securely to all login/submit and compute nodes: /etc/ceph/ceph.client.hpc.keyring (mode 600). The kernel CephFS secretfile wants the key itself, not the keyring file, so export a separate copy:
ceph auth get-key client.hpc | sudo tee /etc/ceph/ceph.client.hpc.secret
sudo chmod 600 /etc/ceph/ceph.client.hpc.secret
If a node has no ceph.conf, you can also put the monitor IP list directly in fstab.
Tested: the
osdcaptag cephfs data=must use the CephFS name (the example here isslurmfs), not a data pool name. With the wrong name,touchmay succeed but writing data fails withOperation not permitted. Also,secretfilerequiresceph-commonon the node (it providesmount.ceph); otherwise the kernel treatssecretfileas an unknown option.
- Write /etc/fstab on all nodes (example using a monitor IP list and the FS name cephfs, mounted at a common /cephfs, then bind-mounted into /home and /projects):
# Mount the CephFS root directly at /cephfs (replace 10.1.1.[1-3] with your MON addresses; change fs=slurmfs to your CephFS name)
10.1.1.1,10.1.1.2,10.1.1.3:/ /cephfs ceph name=hpc,secretfile=/etc/ceph/ceph.client.hpc.secret,fs=slurmfs,_netdev,noatime 0 2
# Bind CephFS subdirectories to standard paths so paths stay consistent
/cephfs/home /home none bind 0 0
/cephfs/projects /projects none bind 0 0
You can also mount CephFS directly at /home (make sure /home already exists on the CephFS):
10.1.1.1,10.1.1.2,10.1.1.3:/ /home ceph name=hpc,secretfile=/etc/ceph/ceph.client.hpc.secret,fs=slurmfs,_netdev,noatime,ms_mode=secure 0 2
Apply the mounts:
sudo systemctl daemon-reload || true
sudo mkdir -p /cephfs /home /projects
sudo mount -a
Notes:
- Consistent paths: all nodes use the same mount points (/home, /projects, etc.).
- Consistent identities: pair this with SSSD/LDAP/SSO from above so UIDs/GIDs match on every node, or permissions will break.
- Network and time: storage traffic should use a dedicated network; Chrony is already configured to keep clocks aligned and avoid distributed filesystem errors.
- High availability: the CephFS client can connect to multiple MONs, so list several MON addresses; in production, combine this with multiple NICs and traffic isolation.
Login Node Resource Self-Protection (Optional)
- PAM limits: cap processes and memory per user to prevent accidental exhaustion.
sudo tee /etc/security/limits.d/login-node.conf >/dev/null <<'LIM'
* soft nproc 4096
* hard nproc 8192
* soft memlock 64
* hard memlock 64
LIM
- For stricter limits, use systemd resource control (for example, place user sessions in a specific slice).
Submitting and Validating from the Login Node
Run these commands on the login node to confirm scheduling happens on compute nodes:
# Show partitions/nodes
sinfo
# Allocate an interactive shell (it should land on node01/02 or another compute node)
srun -n1 --mem=1G --pty bash -l -c 'hostname; sleep 1'
# Submit a batch job
sbatch --wrap 'echo run on $(hostname); sleep 2'
squeue -u $USER
If jobs run on the login node, check:
- Whether slurmd was accidentally started on the login node (it should be disabled).
- Whether slurm.conf’s NodeName/Partition include the login node (remove it).
cgroup.conf (Recommended, cgroup v2)
Debian 12 uses cgroup v2 (unified hierarchy) by default. Slurm 22.05+ supports cgroup v2 natively, with no compatibility mode needed.
Check which cgroup version the system uses:
stat -fc %T /sys/fs/cgroup
# cgroup2fs means cgroup v2; tmpfs means cgroup v1
/etc/slurm/cgroup.conf:
CgroupMountpoint=/sys/fs/cgroup
# CPU core binding - prevents CPU contention between jobs
ConstrainCores=yes
# Memory limit - processes exceeding their allocation are OOM-killed
ConstrainRAMSpace=yes
# Device isolation - restricts GPU and other device access with GRES
ConstrainDevices=yes
# Swap control - cap the job cgroup's swap limit at 0
ConstrainSwapSpace=yes
AllowedSwapSpace=0
Notes:
ConstrainCores=yesbinds jobs to allocated CPU cores through the cgroup cpuset controller. For scientific computing and MPI, core binding avoids the performance cost of cross-NUMA access.ConstrainRAMSpace=yesenables a hard memory limit. The allocated--memvalue is enforced strictly by the cgroup memory controller, and processes that exceed it are killed. This is the key protection against one job exhausting a node’s memory in production.ConstrainSwapSpace=yesplusAllowedSwapSpace=0caps the job cgroup’s swap at 0; it does not prevent the kernel from swapping out other processes. Pair withMemorySwappinessif needed.- To use memory pressure statistics (memory.pressure) under cgroup v2, the kernel must have PSI (Pressure Stall Information) enabled; Debian 12 enables it by default.
The 22.05 + cgroup v2 environment tested here verified CPU and memory limits.
ConstrainDevicesandConstrainSwapSpacebehavior under cgroup v2 varies with Slurm version and kernel, and GPU device isolation needs separate validation on a node with a GPU.
gres.conf (Optional, GPU/Special Devices)
/etc/slurm/gres.conf (only on nodes with devices):
NodeName=node01 Name=gpu File=/dev/nvidia0
NodeName=node01 Name=gpu File=/dev/nvidia1
Add the matching settings to slurm.conf:
GresTypes=gpu
NodeName=node01 Gres=gpu:2 CPUs=32 RealMemory=128000 State=UNKNOWN
Starting Services
Control node:
sudo systemctl enable --now munge
sudo systemctl enable --now slurmctld
# If accounting is enabled: slurmdbd was already started above
Compute nodes:
sudo systemctl enable --now munge
sudo systemctl enable --now slurmd
After changing configuration:
sudo scontrol reconfigure # run on the control node to apply changes
scontrol reconfigureonly rereads some parameters. In testing, changes toAccountingStorageEnforce,HealthCheckProgram/HealthCheckInterval, andSlurmctldHostrequired aslurmctldrestart (and sometimes aslurmdrestart) to take effect.
High Availability Architecture (Production)
A single controller means the whole cluster cannot schedule new jobs when slurmctld goes down (running jobs are unaffected). In production, deploy primary and backup slurmctld instances for automatic failover.
Architecture Overview
graph TD
subgraph HA["slurmctld HA Pair"]
Primary["controller-01<br/>slurmctld Primary"]
Backup["controller-02<br/>slurmctld Backup"]
end
SharedFS[("StateSaveLocation<br/>Shared Filesystem")]
Primary --- SharedFS
Backup --- SharedFS
Primary -->|"Active"| Nodes["Compute Nodes"]
Backup -.->|"Standby Failover"| Nodes
DBD["slurmdbd"] --- Primary
DBD -.-> Backup
Configuration Points
Define two SlurmctldHost entries in slurm.conf; the first is primary, the second backup:
SlurmctldHost=controller-01(192.0.2.10)
SlurmctldHost=controller-02(192.0.2.11)
Key requirements:
- Shared StateSaveLocation: primary and backup must access the same
StateSaveLocationpath (usually an NFS or CephFS mount). When the primary fails, the backup restores scheduler state from that path. - Identical configuration files:
slurm.confmust have exactly the same contents on every node (both controllers, compute nodes, login nodes). - Same Munge key: primary, backup, and all nodes share one Munge key.
- slurmctld on both controllers: the backup’s slurmctld enters standby automatically after startup and does not create scheduling conflicts.
- Failure detection timeout: the default
SlurmctldTimeout=120seconds. In testing, takeover after stopping the primary took about 2 minutes 46 seconds; before lowering it, confirm shared storage and heartbeats are stable to avoid false failover. - slurmdbd address: both controllers’
AccountingStorageHostmust point at the same slurmdbd address (or VIP). Do not setlocalhoston both, or accounting fails after the backup takes over.DbdHostinslurmdbd.confmust also be an address other nodes can reach; withlocalhost, port 6819 is only reachable on loopback.
# Enable slurmctld on both controllers
sudo systemctl enable --now slurmctld
# Check whether the primary and backup addresses in the config are reachable
scontrol ping
# Example output:
# Slurmctld(primary) at controller-01 is UP
# Slurmctld(backup) at controller-02 is UP
scontrol pingshows the primary/backup roles fromSlurmctldHostand their reachability, not which one is currently active. After the backup takes over, it still reportsbackupas configured; do not use this output to decide who is doing the work.
Failover Test
# Simulate a failure on the primary
sudo systemctl stop slurmctld # controller-01
# Default SlurmctldTimeout=120 seconds; the backup waits for the primary to time out before taking over.
# In testing, it took about 2 minutes 46 seconds from stop to "Running as primary" in the backup log.
# You can lower SlurmctldTimeout, but not below the time heartbeats and shared storage recovery need.
sleep 180
# Check the log to confirm takeover (more reliable than scontrol ping)
sudo journalctl -u slurmctld -n 30 --no-pager | grep -E 'Running as primary|standby'
# Submit a test job to confirm scheduling works
srun -n1 hostname
# Restore the original primary
sudo systemctl start slurmctld # controller-01
# In testing, controller-01 became primary again after restart and controller-02 went back to standby;
# if you want the backup to stay primary, take over manually or adjust the start order before restoring.
slurmdbd and Database High Availability (Galera Tested)
After testing slurmctld failover, I also built out the database layer: three MariaDB 10.11 + Galera 4 instances, HAProxy as the entry point, and primary/backup slurmdbd each connecting to the same cluster.
All three instances run on
slurm-auth(10.31.0.243) on ports 3307/3308/3309. This was to validate Galera andslurmdbdfailover with the resources on hand; in production, spread the three instances across three machines and add keepalived/VIP for HAProxy.
Key settings in each instance’s my.cnf (3307 shown):
[mysqld]
port=3307
bind-address=127.0.0.1
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_name=slurm_galera
wsrep_cluster_address=gcomm://127.0.0.1:4567,127.0.0.1:4577,127.0.0.1:4587
wsrep_node_name=galera1
wsrep_node_address=127.0.0.1:4567
wsrep_provider_options="gmcast.listen_addr=tcp://127.0.0.1:4567;ist.recv_addr=127.0.0.1:4568"
wsrep_sst_method=rsync
wsrep_sst_receive_address=127.0.0.1:4444
binlog_format=ROW
innodb_autoinc_lock_mode=2
For the other two instances, change the port to 3308/3309, and change wsrep_node_address, ist.recv_addr, and wsrep_sst_receive_address in pairs. I hit a gotcha here: ist.recv_addr and wsrep_sst_receive_address used the same port, and the second node failed to start with Failed to open IST listener ... Address already in use, so SST failed; giving SST its own port fixed it.
HAProxy only does TCP forwarding:
frontend galera
bind 0.0.0.0:3306
default_backend galera_nodes
backend galera_nodes
option tcp-check
server galera1 127.0.0.1:3307 check inter 2s fall 2 rise 2
server galera2 127.0.0.1:3308 check inter 2s fall 2 rise 2
server galera3 127.0.0.1:3309 check inter 2s fall 2 rise 2
Export the existing slurm_acct_db and import it into Galera, then point slurmdbd at HAProxy:
# /etc/slurm/slurmdbd.conf
DbdHost=controller-01
DbdBackupHost=controller-02
StorageHost=10.31.0.243
StoragePort=3306
StorageUser=slurm
StorageLoc=slurm_acct_db
Specify both primary and backup DBDs in slurm.conf:
AccountingStorageHost=controller-01
AccountingStorageBackupHost=controller-02
Test results:
- All three instances reported
wsrep_cluster_size3 andwsrep_local_state_comment=Synced; after import,slurm-lab_job_tableinslurm_acct_dbhad 75 rows, andsacctcould query jobs from before and after the upgrade. - After
systemctl stop galera@1, the cluster had 2 nodes and HAProxy moved connections to 3308/3309; job 76 submitted andsacctaccounted for it normally. Aftersystemctl start galera@1, it rejoined via SST and the cluster returned to 3 nodes. - After stopping the primary
slurmdbd,slurmctldconnected to the backupslurmdbdon controller-02 perAccountingStorageBackupHost; job 77 was submitted andsacct -j 77still returned the record. The primaryslurmdbdrecovered after restart. - The backup
slurmdbd’sDbdHostmust be its own hostname, not an IP: withDbdHost=10.31.0.228it failed at startup withThis host not configured to run SlurmDBD. If the hostname resolves to IPv6, addDbdAddr=10.31.0.228to connect over IPv4. - The backup node needs
libmariadb3, and/run/slurmdbd.pidmust be writable by theslurmuser; the backupslurmdbdinitially failed to start because of this pidfile permission and the missing library. - MariaDB warns
Database settings not recommended values: innodb_buffer_pool_size innodb_lock_wait_timeout. I left them alone in the lab; in production, size them for the DBD concurrency, otherwiseslurmdbdcan wait on locks when it restarts or builds a backlog.
slurmctld caches accounting messages locally while slurmdbd is briefly unavailable and replays them after recovery; the cache is bounded, so a long outage can still lose records. Galera solves database node failure; it does not replace monitoring of the slurmdbd process and queue. If you do not use Galera, the MySQL dual-primary setup is another option; I chose Galera here because multi-primary writes and automatic membership management are more direct.
Single-Node Minimal Validation
If AccountingStorageEnforce=associations is enabled (it is in this configuration), create a default account and associate the current user first, or srun fails with Invalid account or account/partition combination specified:
sudo sacctmgr -i add account users Description="Default account" Organization=local
sudo sacctmgr -i add user "$USER" Account=users
sinfo
scontrol ping
srun -N1 -n1 hostname
cat > sleep.sh <<'EOF'
#!/usr/bin/env bash
#SBATCH -J test
#SBATCH -p debug
#SBATCH -n 1
#SBATCH -o out.%j
echo "hello from $(hostname)"
sleep 5
EOF
sbatch sleep.sh
squeue -u $USER
Post-Deployment Usage Validation
The examples below help you verify that scheduling, resources, QoS, and accounting work after installation.
1. Interactive Jobs (srun)
# Request 1 task, 1 CPU, 1G of memory, and open an interactive shell (default partition/QoS)
srun -n1 -c1 --mem=1G --pty bash -l
hostname && echo "CPU: $(nproc)" && exit
Expected: you land in a shell, hostname prints the allocated node, and resources are released when you exit.
2. Batch Jobs (sbatch)
cat > job_simple.sh <<'EOF'
#!/usr/bin/env bash
#SBATCH -J hello
#SBATCH -o hello.%j.out
echo "Hello from $(hostname)"
sleep 3
EOF
sbatch job_simple.sh
squeue -u $USER
Expected: after completion, hello.<jobid>.out contains the hostname output.
3. Multi-Node/Multi-Task MPI Example (Usable Without MPI as a Parallel Test)
cat > job_multinode.sh <<'EOF'
#!/usr/bin/env bash
#SBATCH -J multi
#SBATCH -N 2 # 2 nodes
#SBATCH -n 4 # 4 tasks
#SBATCH -o multi.%j.out
srun -N2 -n4 bash -lc 'echo HOST=$(hostname) TASK=$SLURM_PROCID'
EOF
sbatch job_multinode.sh
Expected: four lines of output, with HOST values possibly spread across 2 nodes.
If you use MPI (OpenMPI/MPICH), usually run srun <mpi-program> and let Slurm’s PMI/PMIx launch the tasks; if you must use mpirun, first confirm MPI was built with Slurm support, or the two launchers will fight.
4. Resource Constraints and Rejection (Memory/CPU)
# Request more memory than the node has (should be rejected or stay Pending)
sbatch --mem=1000G -n1 -J too-much-mem --wrap 'sleep 1'
# Request a specific CPU count and binding
sbatch -n1 -c4 -J cpu4 --wrap 'echo CPU=$(nproc); lscpu | grep -E "^CPU\(s\)|Thread|Core"'
Expected: the first stays Pending or is rejected; the second shows binding details in the out file.
5. QoS/Partition Limit Validation
# Use the short QoS, with wall time limited to 4 hours (depending on your configuration)
sbatch -J qos-short --qos=short --time=01:00:00 --wrap 'sleep 10'
# If the partition MaxTime=04:00:00, a request beyond the limit should be rejected
sbatch -p debug --time=10:00:00 --wrap 'sleep 10'
Expected: jobs exceeding the partition MaxTime are usually rejected at submission.
QoS MaxWall, MaxTRESPU, and MaxJobsPerUser violations generally do not reject the submission; the job enters PENDING with a Reason such as QOSMaxWallDurationPerJobLimit, QOSMaxCpuPerUserLimit, or QOSMaxJobsPerUserLimit. Check with scontrol show job <jobid> or sacct -j <jobid> --format=JobID,State,Reason.
6. GPU/GRES Validation (Intel GVT-g Tested)
If the node has NVIDIA, gres.conf usually uses File=/dev/nvidia0; this test environment only had an Intel iGPU, so I attached a vGPU to the compute node with PVE’s GVT-g.
I had no NVIDIA GPU on hand, so this post did not test
/dev/nvidia*, NVIDIA drivers, DCGM, or thenvidia-smipath; the results below cover only Intel GVT-g. The NVIDIA configuration comes from the Slurm documentation and is kept for reference, not as a validated result here.
If you want NVIDIA passthrough on PVE, see PVE GPU Passthrough in Practice; that path differs from GVT-g.
The PVE host (i3-6100 + HD 530) needs GVT-g enabled on the kernel command line:
i915.enable_gvt=1 i915.enable_guc=0
Check the mdev types and available instances:
ls /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/
cat /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_4/available_instances
Attach the mdev to the VM (PVE 9.2):
qm set <vmid> -hostpci0 0000:00:02.0,mdev=i915-GVTg_V5_4
On the guest, note that Debian cloud images’ default cloud-amd64 kernel does not include i915; lspci shows the HD 530 but /dev/dri does not appear. After installing linux-image-amd64 and booting the generic kernel:
sudo apt install -y linux-image-amd64 intel-opencl-icd clinfo clpeak
lspci -nnk -s 00:10.0 # 8086:1912, Kernel driver in use: i915
ls -l /dev/dri # card1 + renderD128
renderD128 is root:render 0660, and users running GPU jobs must be in the render group:
sudo usermod -aG render <user>
Group information must match on the controller and compute nodes. Restart slurmd after the change, or clinfo in the job cannot see the device because it lacks the render group.
On the Slurm side:
# slurm.conf
GresTypes=gpu
NodeName=node-gpu CPUs=2 RealMemory=1800 Gres=gpu:1 State=UNKNOWN
AccountingStorageTRES=gres/gpu
# /etc/slurm/gres.conf (GPU nodes only)
NodeName=node-gpu Name=gpu File=/dev/dri/renderD128
After restarting slurmctld and slurmd, sinfo -o "%N %G" should show gpu:1. Submit:
srun -w node-gpu --gres=gpu:1 -n1 bash -lc \
'echo $SLURM_GPUS_ON_NODE; clinfo -l; clpeak --compute-sp'
In testing, SLURM_GPUS_ON_NODE=1, and sacct’s AllocTRES included gres/gpu=1. With ConstrainDevices=yes in cgroup.conf, a job without --gres can still ls /dev/dri, but clinfo returns 0 platforms; only a job with --gres gets the OpenCL device.
VA-API did not work under GVT-g: both iHD and i965 failed during initialization with DRM_IOCTL_I915_GEM_APERTURE failed / get chip id failed, so I tested with OpenCL and do not count VA-API as validated. glmark2-drm also could not select card1 in a guest without X, so I used clpeak.
Benchmark numbers and mixed workloads are in “Test Environment and Results”.
7. Accounting Validation
# Show accounts/usage for recent jobs
sacct -u $USER --starttime today --format=JobID,JobName,Account,User,Partition,AllocTRES,Elapsed,State
# Admin view (root or privileged user):
sacctmgr show assoc format=Cluster,Account,User,Partition,FairShare
sacctmgr show qos format=Name,Priority,MaxWall,MaxJobsPU,MaxTRESPU
Expected: records are written normally, and associations and QoS policies take effect.
8. Node/Partition State and Scheduling Health
sinfo -R # Show scheduling reasons
scontrol show nodes # Detailed node state
scontrol show partition # Partition configuration
If something looks wrong, check /var/log/slurm/slurmctld.log and each node’s slurmd.log; run scontrol reconfigure if needed to reload the configuration.
Single Sign-On (SSO)
Goal: users authenticate through SSO, then SSH directly into the shared login node and use srun/sbatch there.
There are two approaches:
- Authentik LDAP Outpost + SSSD (simple and native Linux experience; recommended)
- Teleport + Authentik OIDC/SAML (auditing, short-lived certificates, zero-trust style; OIDC/SAML requires Teleport Enterprise)
The choice depends on whether you prefer traditional Linux accounts backed by LDAP/SSH public keys, or stronger session auditing and auto-expiring certificates.
The Authentik path was actually deployed with 2024.12.3, and its LDAP Outpost handled SSSD authentication, Slurm-web login, and OOD’s OIDC login. Teleport 18.10 Community was also deployed, with local users + MFA + web terminal working; the OIDC connector returns Enterprise-only in Community, as described below.
Connecting with the Authentik LDAP Outpost
Prerequisite: configure an LDAP Outpost in Authentik (providing an LDAP directory and optional SSH public key attributes) and expose LDAP(s) on the internal network.
Install and configure SSSD on the login node (Debian):
sudo apt update
sudo apt install -y sssd sssd-ldap libnss-sss libpam-sss
sudo cp /etc/sssd/sssd.conf /etc/sssd/sssd.conf.bak 2>/dev/null || true
cat | sudo tee /etc/sssd/sssd.conf >/dev/null <<'SSSD'
[sssd]
services = nss, pam, ssh
config_file_version = 2
domains = authentik
[domain/authentik]
id_provider = ldap
auth_provider = ldap
chpass_provider = ldap
ldap_uri = ldaps://authentik-ldap.internal:636
ldap_search_base = dc=example,dc=internal
ldap_default_bind_dn = uid=binduser,ou=system,dc=example,dc=internal
ldap_default_authtok = BIND_USER_PASSWORD
ldap_tls_reqcert = demand
cache_credentials = True
enumerate = False
ldap_user_ssh_public_key = sshPublicKey
access_provider = ldap
ldap_access_filter = (memberOf=cn=slurm-users,ou=groups,dc=example,dc=internal)
SSSD
sudo chmod 600 /etc/sssd/sssd.conf
sudo systemctl enable --now sssd
Enable NSS/PAM integration so the system recognizes LDAP users and allows login:
# Debian uses pam-auth-update to manage PAM; do not overwrite common-session
sudo pam-auth-update --enable mkhomedir
sudo sed -i 's/^#\?\s*UsePAM.*/UsePAM yes/' /etc/ssh/sshd_config
sudo sed -i 's/^#\?\s*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo sed -i 's/^#\?\s*PubkeyAuthentication.*/PubkeyAuthentication yes/' /etc/ssh/sshd_config
sudo systemctl reload ssh || sudo systemctl restart ssh
Only enable
PasswordAuthentication yesabove if you really need password login; if you use SSH public keys or Teleport, keepingnois safer.
Optional: allow only a specific group to log in (matching ldap_access_filter above), for example:
echo 'AllowGroups slurm-users' | sudo tee -a /etc/ssh/sshd_config
sudo systemctl reload ssh
Key points:
- Replace ldap_uri, bind DN, BaseDN, certificates, and group names in sssd.conf with your actual Authentik configuration; with a self-signed CA, install it under
/usr/local/share/ca-certificates/and runupdate-ca-certificates. - For public key login, have LDAP expose the
sshPublicKeyattribute. SSSD only provides thesss_ssh_authorizedkeysquery interface and does not writeauthorized_keys; sshd also needsAuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeysandAuthorizedKeysCommandUser nobody. - Keep the login node limited to lightweight work and configure it in Slurm as a submission entry that does not count as compute capacity.
Authentik LDAP Outpost in Practice
In 2026-11 I deployed Authentik 2024.12.3 on 10.31.0.243 (Docker static package, Debian-native PostgreSQL/Redis packages), with bootstrap admin akadmin, student user stu01, and a students group.
Authentik login page:

Figure: the Authentik login page.
The admin user list shows stu01, whose last login was the LDAP authentication through Slurm-web just now:

Figure: the Authentik admin user list; stu01’s last login came from Slurm-web.
After Slurm-web switched to Authentik LDAP, stu01 logged in successfully:

Figure: Slurm-web logged in as Authentik’s stu01.
Key configuration and issues found in testing (create the Provider/Outpost under Applications in the Authentik admin UI):
- Set the LDAP Provider’s
base_dntodc=example,dc=edu, withbind_mode=direct,search_mode=direct, andmfa_support=false. authorization_flowmust point todefault-authentication-flow, notdefault-provider-authorization-*. With the authorization flow, LDAP binds go through a flow that does not apply to unauthenticated users; the log showsFlowNonApplicableExceptionand the client only seesInvalid credentials.- The LDAP Outpost uses
ghcr.io/goauthentik/ldap:2024.12.3, withAUTHENTIK_HOSTandAUTHENTIK_TOKEN(outpost token) environment variables, listening on 3389/6636. - SSSD uses LDAPS 6636 with
ldap_tls_reqcert=never(self-signed test certificate);ldap_id_use_start_tls=falsestill tried START TLS on this Authentik version, so I switched to LDAPS. - Authentik’s
uidis a hash, and the login name is incn/sAMAccountName; SSSD needsldap_user_name = cn, otherwisegetentreturns the hash. - The Slurm-web gateway LDAP config was changed to Authentik:
user_base=ou=users,...,group_base=ou=groups,...,bind_dn=cn=akadmin,...,user_name_attribute=cn,restricted_groups=students.
Starting the services (images can be preloaded with docker load, no online pull required):
docker run -d --name authentik-server --network host \
--env-file /opt/authentik/env -v /opt/authentik/media:/media \
ghcr.io/goauthentik/server:2024.12.3 server
docker run -d --name authentik-worker --network host \
--env-file /opt/authentik/env -v /opt/authentik/media:/media \
ghcr.io/goauthentik/server:2024.12.3 worker
# Use the service account token from the LDAP Outpost details
docker run -d --name authentik-ldap --network host \
-e AUTHENTIK_HOST=http://10.31.0.243:9000 \
-e AUTHENTIK_TOKEN=... \
ghcr.io/goauthentik/ldap:2024.12.3
Key SSSD configuration:
[domain/authentik]
id_provider = ldap
auth_provider = ldap
ldap_uri = ldaps://10.31.0.243:6636
ldap_tls_reqcert = never
ldap_default_bind_dn = cn=akadmin,ou=users,dc=example,dc=edu
ldap_default_authtok = ...
ldap_user_search_base = ou=users,dc=example,dc=edu
ldap_group_search_base = ou=groups,dc=example,dc=edu
ldap_user_object_class = posixAccount
ldap_group_object_class = posixGroup
ldap_user_name = cn
ldap_user_uid_number = uidNumber
ldap_user_gid_number = gidNumber
ldap_user_gecos = displayName
ldap_user_home_directory = homeDirectory
ldap_id_mapping = false
ldap_access_filter = (objectClass=posixAccount)
In testing, getent passwd stu01 returned uid/gid 2005, and pamtester login stu01 authenticate succeeded; the Authentik user list also showed the login time. The test environment used HTTP, a bootstrap password, and self-signed certificates; production should use TLS, a proper CA, and credential management. Do not bind LDAP with akadmin either; use a read-only service account and restrict the search scope.
Connecting with Teleport (Tested)
Teleport 18.10 Community is installed on slurm-auth (10.31.0.243); auth and proxy are the same process, TLS uses a self-signed certificate, and the login node slurm-build joins the cluster as a node.
Configuration steps:
- Create a role
slurm-loginin Teleport that allowsuserandstu01to log in, with node labels unrestricted. - Generate an invite link with
tctl users add; local users must set a password and enroll TOTP. Community cannot turn MFA off withsecond_factor: off;tctlreturnscannot disable multi-factor authentication. - Install Teleport on the login node and register it as a node with the token from
tctl tokens add --type=node. - Log in to Teleport in a browser and open
slurm-build’s web terminal under Resources.
Key commands:
# Teleport server
teleport start --config /etc/teleport.yaml
# Create the role and user
tctl users add labadmin --roles=slurm-login --logins=user,stu01
# Generate a node token, then start the node service on the login node
tctl tokens add --type=node --ttl=1h
teleport start --roles=node --token=<token> \
--auth-server=10.31.0.243:3025 --insecure
--insecure is only for lab environments with self-signed certificates; in production, use a proper certificate and remove it. After node registration, tctl nodes ls shows:
Host ID Public Address Labels Version
------------ ------------------- ---------------- ----------- ---------
slurm-build d09e2fe6-e501-42... 10.31.0.229:3022 role=login 18.10.0
Web Resources page and web terminal:

Figure: the login node in Teleport’s web Resources page.

Figure: logging into slurm-build through Teleport’s web terminal; sinfo returns two compute nodes.
Teleport records node sessions under /var/lib/teleport/log/ by default; this session’s directory was about 76 KB, which shows recording is on. I did not open the player and inspect every frame.
OIDC limitation: running tctl create to create an OIDC connector in Community returns:
ERROR: OIDC is only available in Teleport Enterprise
So the path of using Authentik as Teleport’s OIDC IdP did not work in Community; the Teleport test here is local users + TOTP + web terminal. To use Authentik as Teleport’s SSO, you need Teleport Enterprise, or pick an older version that still includes OIDC in Community and validate it yourself.
Whichever approach you use, once the login node has a unified identity, users can interact with Slurm directly through sacct/squeue/srun/sbatch. Combined with AccountingStorageEnforce=associations,limits,qos above, only associated users/accounts/QoS can submit jobs normally.
Web Interface (Job Visualization and Management)
This section actually deployed Slurm-web 3.3.0 and Open OnDemand 4.0.11. Slurm-web logged in with an LDAP account, and Open OnDemand logged in with Authentik OIDC; both showed real node and job data.
Common web front ends and portals for viewing jobs, queues, node state, and basic management in a browser fall into a few categories:
Slurm-web (Based on slurmrestd)
Slurm-web v3 requires Slurm >=23.02; it was tested here on 23.11.4, so 22.05 cannot use this version directly. The general approach comes first; the actual configuration is in “Slurm-web 3.3.0 in Practice” below.
Slurm provides a REST API (slurmrestd), and the community has web UIs built on it (common implementations: Slurm-web, Slurm UI).
Steps overview (control node):
sudo apt install -y slurmrestd
# Generate or place the credentials slurmrestd needs (Munge-based, or Basic/OAuth behind a reverse proxy)
# For simplicity, keep it on the internal network and authenticate at the reverse proxy (e.g. Nginx+OIDC/Authentik).
# Run it on a Unix socket (recommended with a reverse proxy)
sudo mkdir -p /run/slurm
sudo chown slurm:slurm /run/slurm
sudo tee /etc/systemd/system/slurmrestd.service >/dev/null <<'UNIT'
[Unit]
Description=Slurm REST API Service
After=network.target slurmctld.service
[Service]
User=slurm
Group=slurm
ExecStart=/usr/sbin/slurmrestd unix:/run/slurm/slurmrestd.sock
Restart=on-failure
[Install]
WantedBy=multi-user.target
UNIT
sudo systemctl daemon-reload
sudo systemctl enable --now slurmrestd.service
If the distribution’s slurmrestd ships socket activation, do not enable both its .socket and the manually bound service here; they will fight over the same socket path. When Nginx runs as www-data, that user also needs read/write access to /run/slurm/slurmrestd.sock (for example, add www-data to the slurm group, or adjust the socket group).
Then:
- Put a reverse proxy in front of Nginx/Caddy and forward
/api/to the Unix socket. - Authenticate at the reverse proxy (ideally with Authentik OIDC from above) and map the user identity to an HTTP header for slurmrestd.
- Deploy the Slurm-web front end (see its project docs) to call
/api/.
Note: different Slurm-web front-end projects have slightly different configuration; pick one that is actively maintained and compatible with your Slurm version.
Example: reverse proxy slurmrestd (Unix socket) with Nginx, and use oauth2-proxy for Authentik OIDC
- Install oauth2-proxy (binary example; replace the version/path):
sudo useradd -r -s /sbin/nologin oauth2-proxy || true
sudo mkdir -p /etc/oauth2-proxy
curl -L -o /tmp/oauth2-proxy.tar.gz https://github.com/oauth2-proxy/oauth2-proxy/releases/download/v7.6.0/oauth2-proxy-v7.6.0.linux-amd64.tar.gz
tar xzf /tmp/oauth2-proxy.tar.gz -C /tmp
sudo install -m 0755 /tmp/oauth2-proxy-v7.6.0.linux-amd64/oauth2-proxy /usr/local/bin/oauth2-proxy
sudo tee /etc/oauth2-proxy/oauth2-proxy.cfg >/dev/null <<'CFG'
provider = "oidc"
oidc_issuer_url = "https://auth.example.com/application/o/your-authentik/"
client_id = "YOUR_CLIENT_ID"
client_secret = "YOUR_CLIENT_SECRET"
cookie_secret = "RANDOM_32B_BASE64=="
email_domains = ["*"]
upstreams = ["file:///dev/null"]
reverse_proxy = true
pass_authorization_header = true
set_xauthrequest = true
skip_provider_button = true
redirect_url = "https://slurm.example.com/oauth2/callback"
whitelist_domains = [".example.com"]
CFG
sudo tee /etc/systemd/system/oauth2-proxy.service >/dev/null <<'UNIT'
[Unit]
Description=oauth2-proxy
After=network-online.target
[Service]
User=oauth2-proxy
Group=oauth2-proxy
ExecStart=/usr/local/bin/oauth2-proxy --config=/etc/oauth2-proxy/oauth2-proxy.cfg
Restart=on-failure
[Install]
WantedBy=multi-user.target
UNIT
sudo systemctl daemon-reload
sudo systemctl enable --now oauth2-proxy
- Nginx site (
/apigoes straight to slurmrestd’s Unix socket; the whole site uses oauth2-proxy’s auth_request):
server {
listen 80;
server_name slurm.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name slurm.example.com;
ssl_certificate /etc/ssl/certs/your.crt;
ssl_certificate_key /etc/ssl/private/your.key;
# Integrate with oauth2-proxy
location = /oauth2/auth {
proxy_pass http://127.0.0.1:4180/oauth2/auth;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Auth-Request-Redirect $request_uri;
}
location /oauth2/ {
proxy_pass http://127.0.0.1:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
# Protect the whole site
auth_request /oauth2/auth;
error_page 401 = @error401;
location @error401 {
return 302 /oauth2/start?rd=$scheme://$http_host$request_uri;
}
# Front-end static assets (point root at your Slurm-web front-end build directory)
root /var/www/slurm-web;
index index.html;
# Forward /api to slurmrestd's Unix socket
location /api/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://unix:/run/slurm/slurmrestd.sock:/;
}
}
Notes:
- Create the oauth2-proxy issuer_url, client_id/secret, and redirect_url in the Authentik application and replace the values.
- To identify users inside Slurm, include the mapped username when the front end calls slurmrestd (see the front-end project docs); also expose slurmrestd only on the local Unix socket to reduce privilege risk.
Slurm-web 3.3.0 in Practice
In 2026-11 I deployed it on the 23.11.4 cluster: installed slurm-web-agent/slurm-web-gateway 3.3.0 from the Rackslab APT repository, used slurmrestd from the 23.11 source, and connected the gateway to OpenLDAP.
Login page:

Figure: the Slurm-web login page.
Dashboard after logging in as student1 (LDAP, Students group):

Figure: the Dashboard after an LDAP user logs in.
The Jobs page shows the --gres=gpu:1 job in RUNNING:

Figure: the GPU job in the Jobs list.
The job details show --gres=gpu:1 in the submit command, with gres: 1 under both Requested and Allocated:

Figure: --gres=gpu:1 and the gres allocation in job details.
Issues found in testing:
slurmrestdused the default local auth; do not add-a rest_auth/jwt. The v3 agent connects over the Unix socket as theslurmuser; with JWT the page reportsUnsupported Content-Type for slurmrestd response ... text/plain.- Slurm-web 3.3 is incompatible with Debian’s
python3-racksdb 0.7, and the agent reportsProperty types is required in schema for object Schema_content; in testing I used the RacksDB 0.5 Python package and 0.5 schema, configuredPYTHONPATHfor the agent, and supplied a minimalracksdb.yml. - The gateway LDAP config uses
uri=ldap://...,user_base,group_base,bind_dn,bind_password, andrestricted_groups=students; in production, switch to LDAPS and protect the bind password. - The agent and gateway run Flask’s development server by default; in production, put them behind a WSGI/HTTPS reverse proxy.
- If
AuthAltTypes=auth/jwtis enabled, sync the JWT key to bothslurmctldinstances; in testing, ctl2 lacked/var/spool/slurm/jwt_hs256.keyand failed fatally, so the backup controller would not start.
Actual configuration (excerpt):
# /etc/slurm-web/agent.ini
[service]
cluster=slurm-lab
[slurmrestd]
socket=/run/slurmrestd/slurmrestd.socket
version=0.0.39
[racksdb]
schema=/opt/racksdb05/schema/racksdb.yml
db=/var/lib/racksdb/racksdb.yml
# /etc/slurm-web/gateway.ini
[service]
interface=0.0.0.0
[ui]
host=http://10.31.0.225:5011
[agents]
url=http://localhost:5012
[authentication]
enabled=yes
[ldap]
uri=ldap://10.31.0.225
user_base=ou=people,dc=example,dc=edu
group_base=ou=groups,dc=example,dc=edu
bind_dn=cn=admin,dc=example,dc=edu
bind_password=...
restricted_groups=students
The slurmrestd unit tested:
[Service]
User=slurm
Group=slurm
Environment=SLURMRESTD_SECURITY=disable_user_check
ExecStart=/usr/sbin/slurmrestd unix:/run/slurmrestd/slurmrestd.socket
For a source install, replace /usr/sbin/slurmrestd with the path under your prefix (the test used /opt/slurm-23.11/sbin/slurmrestd).
Open OnDemand (Tested)
Open OnDemand 4.0.11 is installed on slurm-build (10.31.0.229), with Debian 12, and the Slurm adapter calls /opt/slurm-23.11/bin directly. Login uses Authentik OIDC, and both Dashboard and Active Jobs show real jobs.
Install (Debian 12 / bookworm):
wget -O /tmp/ondemand-release-web_4.0.0-bookworm_all.deb \
https://apt.osc.edu/ondemand/4.0/ondemand-release-web_4.0.0-bookworm_all.deb
sudo apt install /tmp/ondemand-release-web_4.0.0-bookworm_all.deb
sudo apt update
sudo apt install ondemand libapache2-mod-auth-openidc
sudo a2enmod ssl
sudo a2enmod auth_openidc
This OOD test used HTTPS 443 with a self-signed certificate; production should use a proper certificate. /etc/ood/config/ood_portal.yml:
servername: "10.31.0.229"
port: 443
ssl:
- 'SSLCertificateFile "/etc/ssl/certs/ood.crt"'
- 'SSLCertificateKeyFile "/etc/ssl/private/ood.key"'
auth:
- "AuthType openid-connect"
- "Require valid-user"
oidc_uri: "/oidc"
oidc_provider_metadata_url: "http://10.31.0.243:9000/application/o/ood/.well-known/openid-configuration"
oidc_client_id: "YOUR_CLIENT_ID"
oidc_client_secret: "YOUR_CLIENT_SECRET"
oidc_remote_user_claim: "preferred_username"
oidc_scope: "openid profile email"
user_map_match: ".*"
When creating the OAuth2/OpenID Provider in Authentik, the redirect URI must be https://10.31.0.229/oidc, not /oidc/callback. OOD’s oidc_uri itself acts as the callback path; in testing OOD sent redirect_uri as /oidc, so a Provider configured with /oidc/callback would not match and login would fail. This differs from many OIDC examples.
Slurm cluster configuration /etc/ood/config/clusters.d/debian.yml:
v2:
metadata:
title: "Debian Slurm"
login:
host: "10.31.0.229"
job:
adapter: "slurm"
cluster: "slurm-lab"
bin: "/opt/slurm-23.11/bin"
Apply the configuration:
sudo /opt/ood/ood-portal-generator/sbin/update_ood_portal
sudo a2dissite 000-default
sudo apache2ctl configtest
sudo systemctl restart apache2
OOD’s local users must match the OIDC preferred_username. In this test stu01 was a local user on the OOD host (20002:20000), and Authentik’s preferred_username was also stu01, so the mapping worked.

Figure: the Open OnDemand 4.0.11 Dashboard, logged in as stu01.
After submitting jobs, Active Jobs shows the job ID, user, account, queue, and state:

Figure: OOD Active Jobs reading the slurm-lab cluster; job 80 was submitted through Job Composer and completed.
Job Composer returns 422 InvalidAuthenticityToken over HTTP: myjobs has its session cookie configured as secure: Rails.env.production?, and browsers do not store a Secure cookie on an HTTP page, so the CSRF check fails on POST. After switching to HTTPS, the cookie is stored and both creating a workflow and submitting work succeed. The default template directory contains no script, so I added main_job.sh manually (with #SBATCH -A classa); after clicking Submit, job 80 completed.

Figure: after OOD Job Composer submits main_job.sh, job 80 enters the queue.
Grafana/Prometheus (Monitoring and Visualization, Tested)
This monitoring stack runs on a separate VM (slurm-auth, 10.31.0.243): Prometheus 2.42.0, Alertmanager 0.25.0, and Grafana 13.3.1; Slurm metrics come from SckyzO’s slurm_exporter 1.8.6, and node metrics from Debian’s prometheus-node-exporter.
On tool choice: the earlier ubccr/slurm-exporter in this post fetches data through slurmrestd’s REST API, and its latest release generates a client for Slurm REST API v0.0.44; the test cluster is Slurm 23.11.4, whose REST API only goes to v0.0.39, so using it directly would not match the API version. I switched to sckyzo/slurm_exporter: it calls commands like sinfo, squeue, and sdiag directly, does not depend on the REST API version, and needs no extra compilation on Debian 12.
Install the exporter on the control node:
curl -L -o /tmp/slurm_exporter.tar.gz \
https://github.com/sckyzo/slurm_exporter/releases/download/v1.8.6/slurm_exporter-1.8.6-linux-amd64.tar.gz
tar -xzf /tmp/slurm_exporter.tar.gz -C /tmp
sudo install -m 755 /tmp/slurm_exporter /usr/local/bin/slurm_exporter
systemd unit:
[Unit]
Description=Prometheus Slurm exporter
After=network.target munge.service
[Service]
User=slurm
Group=slurm
ExecStart=/usr/local/bin/slurm_exporter \
--slurm.bin-path=/opt/slurm-23.11/bin \
--web.listen-address=0.0.0.0:9341
Restart=on-failure
[Install]
WantedBy=multi-user.target
Prometheus scrape configuration:
global:
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
- /etc/prometheus/rules/slurm-lab.yml
alerting:
alertmanagers:
- static_configs:
- targets: ["127.0.0.1:9093"]
scrape_configs:
- job_name: "slurm-exporter"
static_configs:
- targets: ["10.31.0.225:9341"]
- job_name: "node"
static_configs:
- targets:
- "10.31.0.225:9100"
- "10.31.0.226:9100"
- "10.31.0.227:9100"
Alerting rules (I shortened for to 30 seconds in testing; relax as needed in production):
groups:
- name: slurm-lab
rules:
- alert: SlurmNodeDown
expr: sum(slurm_nodes_down + slurm_nodes_drain) > 0
for: 30s
labels:
severity: warning
annotations:
summary: "Slurm node DOWN or DRAIN"
description: "{{ $value }} nodes are unavailable."
Point Alertmanager at a webhook:
route:
receiver: webhook
group_wait: 5s
group_interval: 10s
repeat_interval: 1m
receivers:
- name: webhook
webhook_configs:
- url: "http://127.0.0.1:9099/alerts"
send_resolved: true
Triggering it in testing:
scontrol update NodeName=node-gpu State=DRAIN Reason=alert-pipeline-test
After about 30 seconds, Prometheus’s SlurmNodeDown enters firing and Alertmanager POSTs the notification to the webhook; restore the node:
scontrol update NodeName=node-gpu State=RESUME
The webhook received both firing and resolved records in /var/log/alertmanager-webhook.log. I also hit a gotcha here: I first tried State=DOWN, but ReturnToService=2 makes the node return to IDLE automatically after re-registration, so the alert did not fire stably; switching to DRAIN kept the state, and the test worked.
Prometheus alerts page:

Figure: Prometheus’s Alerts page with SlurmNodeDown firing.
Import the exporter project’s 01-slurm-overview.json into Grafana and select Prometheus as the data source:

Figure: Grafana’s Slurm Cluster Overview; the GPU node was in DRAIN during testing.
Debian’s prometheus-alertmanager package does not include a web UI; visiting 9093 shows “The Debian package … does not include a web application”. Use amtool/the HTTP API or the official binary; I validated the alert chain with the API and webhook logs and did not treat an Alertmanager UI screenshot as a result.
Multi-User and Project Quotas (QoS)
The examples below show how to configure accounts (projects), user associations, and QoS limits with sacctmgr. slurmdbd and AccountingStorageEnforce=associations,limits,qos must be enabled.
Concept Cheat Sheet
- Account (project): a logical unit for aggregating accounting/quotas, such as projA.
- User: can submit only after being associated with an Account (when enforce=associations is on).
- QoS: defines resource and time constraints, assignable to users/accounts/partitions.
Creating Accounts and User Associations
# Create an account (project)
sudo sacctmgr add account projA Description="Project A" Organization=orgA
# Associate users with the account (assuming system users alice and bob exist)
sudo sacctmgr add user alice Account=projA
sudo sacctmgr add user bob Account=projA
# Optional: set Fairshare weights (affects scheduling priority fairness)
sudo sacctmgr modify account projA set fairshare=100
sudo sacctmgr modify user alice set fairshare=50
sudo sacctmgr modify user bob set fairshare=50
sudo sacctmgr show assoc format=Cluster,Account,User,Partition,FairShare
Defining QoS and Limits
Common fields:
- MaxJobsPerUser, MaxJobs, MaxSubmitJobs: parallel/queued job limits.
- MaxWall, MaxTRESPU, MaxTRESPA: limits per resource type (cpu, mem, gres/gpu).
- GrpCPUs, GrpNodes, GrpWall: aggregate limits scoped to an account.
Example 1: create two QoSs
normalmay be a default QoS that Slurm creates automatically. Check withsacctmgr show qosfirst; usemodifyif it exists,addif not. Runningaddon an existing QoS reports “Nothing new added” and the limits are not applied.
# A short-job QoS: max 4 hours, max 10 concurrent jobs per user
sudo sacctmgr add qos short MaxWall=04:00:00 MaxJobsPerUser=10 Priority=100
# If normal already exists, use modify: max 2 days, max 3 jobs per user, max 64 CPUs
sudo sacctmgr modify qos normal set MaxWall=2-00:00:00 MaxJobsPerUser=3 MaxTRESPU=cpu=64 Priority=50
sudo sacctmgr show qos format=Name,Priority,MaxWall,MaxJobsPU,MaxTRESPU
For QoS time/resource limits to take effect,
AccountingStorageEnforcemust includelimits, andslurmctldmust be restarted after the change (scontrol reconfiguredoes not always refresh this part).
Example 2: assign default and allowed QoS lists to accounts/users
# QoSs available to account projA: short, normal; use normal by default
sudo sacctmgr modify account projA set qos=normal,short defaultqos=normal
# For finer control at the user level:
sudo sacctmgr modify user alice set qos=short,normal defaultqos=short
sudo sacctmgr modify user bob set qos=normal
Example 3: account-level aggregate resource limits (prevent one project from monopolizing the cluster)
# Limit projA to 256 CPUs, 4 nodes, and 3 days of total wall time in aggregate
sudo sacctmgr modify account projA set GrpCPUs=256,GrpNodes=4,GrpWall=3-00:00:00
In 22.05,
GrpCPUs=256lands inGrpTRES=cpu=256; you can also writeGrpTRES=cpu=256directly.
GPU (GRES) QoS limits:
# Limit each user to 2 GPUs (assuming the GRES name is gpu)
sudo sacctmgr modify qos normal set MaxTRESPU=gres/gpu=2
# Or set an aggregate GPU cap of 8 for an account
sudo sacctmgr modify account projA set GrpTRES=gres/gpu=8
Working with Partitions
QoS can be combined with partition policy, for example:
# Set partition quotas/limits in slurm.conf (illustrative)
PartitionName=debug Nodes=ALL Default=YES MaxTime=04:00:00 State=UP QOS=short
Note: some sites prefer not to pin QoS to a partition, and instead assign QoS lists to users/accounts via sacctmgr for more flexible control.
Applying and Troubleshooting
sudo scontrol reconfigure
sudo sacctmgr show qos -n
sudo sacctmgr show assoc -n
Multi-Tenancy: School/Lab Scenarios
The typical requirement in a school or lab: one account per class/project, students log in via LDAP/SSSD, jobs are isolated by account, QoS, and partition, software environments are managed with Lmod, and storage is quota’d by user/project. Slurm does not provide LDAP or a module system; these pieces have to be combined.
Accounts, Partitions, and Fair Scheduling
# One account per class/project
sudo sacctmgr -i add account classA Description="Class A" Organization=school
sudo sacctmgr -i add account classB Description="Class B" Organization=school
# Associate students with accounts; a user can belong to multiple accounts
sudo sacctmgr -i add user alice Account=classA
sudo sacctmgr -i add user bob Account=classB
# Fair-share weights
sudo sacctmgr -i modify account classA set fairshare=100
sudo sacctmgr -i modify account classB set fairshare=50
# Account-level resource caps: classA max 64 CPUs, classB max 32 CPUs
sudo sacctmgr -i modify account classA set GrpTRES=cpu=64
sudo sacctmgr -i modify account classB set GrpTRES=cpu=32
Slurm account names are case-insensitive and are stored lowercase;
AllowAccounts=classAshows asclassainscontrol show partition, which does not affect matching.
Split partitions by class and restrict the allowed accounts:
# slurm.conf
PartitionName=classA Nodes=node[01-02] AllowAccounts=classA MaxTime=04:00:00 State=UP
PartitionName=classB Nodes=node[03-04] AllowAccounts=classB MaxTime=08:00:00 State=UP
AllowAccounts / AllowGroups rejection does not necessarily happen at sbatch submission. In testing, submitting a job with -A classB to the classA partition still returned a job ID, and the job later ended or was rejected with Job's account not permitted to use this partition (...). When troubleshooting, look at scontrol show job’s Reason, not just the submission return value.
If a partition’s MaxTime is shorter than Slurm’s default job time and a student script does not set --time, the job stays Pending with PartitionTimeLimit (tested). Either set DefaultTime on student partitions or fix #SBATCH --time=... in the job template.
Usage reports by class/project:
# CPU minutes for a month by account and user
sreport cluster AccountUtilizationByUser Start=2026-11-01 End=2026-12-01
# Fair share and current usage
sshare -a
Lmod Software Environments
Debian 12 ships lmod (8.6.x), so install it directly:
sudo apt install -y lmod
Put modulefiles in a shared directory (must be identical across nodes), for example /opt/modulefiles/hello/1.0.lua:
graph LR
J["Student job"] --> M["module load"]
M --> MF["modulefiles<br/>gcc / openmpi / cuda"]
MF --> SW["Shared software directory /opt"]
SW --> C["Compute nodes"]
help([[hello 1.0]])
whatis("Name: hello")
whatis("Version: 1.0")
prepend_path("PATH", "/opt/hello/1.0/bin")
setenv("HELLO_VERSION", "1.0")
Add a line on both login and compute nodes so Lmod finds the local modulefiles:
echo 'module use /opt/modulefiles' | sudo tee /etc/profile.d/zz-local-modules.sh
Load it through a login shell in jobs:
srun -N2 -n2 bash -lc 'module load hello/1.0; hello; echo VERSION=$HELLO_VERSION'
Test output:
hello 1.0 on slurm-node2
hello 1.0 on slurm-node1
VERSION=1.0
VERSION=1.0
Lmod practices:
- Keep modulefiles on shared storage or sync them to every node with configuration management, so module versions do not drift between nodes.
- Use
bash -lcin job scripts or explicitlysource /etc/profile.d/lmod.sh; non-login shells do not load themodulefunction automatically. - To pin a default environment, use
LMOD_SYSTEM_DEFAULT_MODULESormodule save; do not put a student’s ownmodule loadstack into system defaults. - Avoid hardcoding node-local paths in modulefiles; install software on shared paths, or use
module useto point at shared modulefiles.
LDAP/SSSD and Slurm Accounts
LDAP/SSSD handles system user login, UID/GID, home directories, and SSH public keys; Slurm’s Account/User associations live in the slurmdbd database and are a separate system. Configure both, then sync them. The login node’s Authentik LDAP/Teleport setup is in “Single Sign-On” above; this section adds multi-tenant details: UID/GID, home directories, and Slurm associations.
graph LR
subgraph Identity["Identity Source"]
LDAP["LDAP / AD<br/>users / groups / UID/GID / SSH key"]
end
subgraph Linux["Linux Nodes"]
SSSD["SSSD<br/>nss + pam + ssh"]
LOGIN["Login node / sshd"]
COMPUTE["Compute node / slurmd"]
end
subgraph Slurm["Slurm Control Plane"]
DBD["slurmdbd / MariaDB<br/>account association"]
CTLD["slurmctld<br/>account / QoS / partition"]
end
LDAP --> SSSD
LDAP --> SYNC["Sync script<br/>LDAP class -> sacctmgr"]
SSSD --> LOGIN
SSSD --> COMPUTE
LOGIN -->|"submit / query"| CTLD
SYNC --> DBD
DBD --- CTLD
Install SSSD and PAM modules on Debian 12:
sudo apt install -y sssd sssd-ldap libnss-sss libpam-sss libpam-slurm-adopt
sudo pam-auth-update --enable mkhomedir
Debian does not have
authselect(that is a RHEL-family tool), and you should not overwrite PAM configuration withecho ... > /etc/pam.d/common-session; usepam-auth-updateorpam-auth-update --enable mkhomedir.
SSSD LDAP configuration example:
[sssd]
services = nss, pam, ssh
config_file_version = 2
domains = school
[domain/school]
id_provider = ldap
auth_provider = ldap
ldap_uri = ldaps://ldap.example.edu:636
ldap_search_base = dc=example,dc=edu
ldap_default_bind_dn = uid=binduser,ou=system,dc=example,dc=edu
ldap_default_authtok = BIND_USER_PASSWORD
ldap_tls_reqcert = demand
ldap_id_mapping = false
cache_credentials = True
enumerate = False
ldap_user_ssh_public_key = sshPublicKey
access_provider = ldap
ldap_access_filter = (memberOf=cn=students,ou=groups,dc=example,dc=edu)
Key points:
ldap_id_mapping = falseonly applies when LDAP already has POSIX UID/GID values; otherwise keep the default mapping and make sure every node uses the same SSSD configuration, or the same user may get different UIDs on the login node and compute nodes.- When
ldap_access_filterusesmemberOf, OpenLDAP must load the memberof overlay and maintain group attributes; plain OpenLDAP does not have this overlay, so you can first verify login with(objectClass=posixAccount)and then switch to group membership filtering. - Put home directories on shared storage and use
pam_mkhomedir; otherwise/homediffers between the node where a student first logs in and the node running the job. - If LDAP provides SSH public keys,
ldap_user_ssh_public_keylets SSSD find them; sshd still needsAuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys(AuthorizedKeysCommandUser nobody), or the keys will not take effect. If LDAP has no keys, distributeauthorized_keyswith configuration management. - On compute nodes, add
libpam-slurm-adoptandaccount required pam_slurm_adopt.soto/etc/pam.d/sshd;slurm.confmust also setPrologFlags=Contain, or jobs have noexternstep and users with jobs are still denied. The session stack must also disablepam_systemd, or systemd puts the session in its own scope outside the job cgroup. Tested: with no job, access is denied; with a batch job, the SSH session entersjob_<id>/step_externcgroup. Details are in “Security Hardening”.
To enroll new students, do not useradd on every node; add a posixAccount entry to LDAP. Here is a minimal LDIF (uidNumber and gidNumber must match your school’s allocation):
dn: uid=stu01,ou=people,dc=example,dc=edu
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: stu01
cn: Student 01
sn: 01
givenName: Student
uidNumber: 20002
gidNumber: 20000
homeDirectory: /home/stu01
loginShell: /bin/bash
mail: [email protected]
userPassword: {SSHA}...
Generate userPassword with slappasswd -s 'initial password', paste it in, and import with an admin DN:
LDAPTLS_REQCERT=never ldapadd -x -H ldaps://ldap.example.edu:636 \
-D cn=admin,dc=example,dc=edu -W -f stu01.ldif
-W prompts interactively for the bind password; do not put the admin password in a script or shell history. LDAPTLS_REQCERT=never is only for a test environment with self-signed certificates; in production, install the CA in the system trust store and remove this variable.
After adding the entry, nodes configured with SSSD can see the user with getent passwd stu01; on first SSH login, pam_mkhomedir creates the home directory from /etc/skel. In the 2026-11 test, after creating stu01 (uid 20002), I did not run useradd on any node; SSH with the LDAP password to the controller succeeded, and the home directory was created with owner stu01:students.
If getent does not see the new user yet, SSSD may have cached the earlier failed lookup; run sudo sss_cache -E or wait for the cache to expire.
Compute nodes need shared storage (NFS or CephFS) to see the same home directory. The test cluster initially created the home directory only on the login node, and srun to node1 failed with couldn't chdir to /home/stu01, falling back to /tmp.
Slurm has no built-in LDAP backend; LDAP users do not automatically become sacctmgr associations. A common approach is a script that exports user-class relationships from LDAP/the student system and calls sacctmgr to sync them:
# Example: sync associations from CSV (user,account); existing entries are reported and can be ignored
while IFS=, read -r user account; do
sudo sacctmgr -i add user "$user" Account="$account"
done < users.csv
Tested: right after creating
stu01in LDAP,srunfailed withInvalid account or account/partition combination specified(becauseAccountingStorageEnforce=associationsis enabled); aftersacctmgr -i add user stu01 Account=classA, submission worked immediately. In production, put “create LDAP user” and “add sacctmgr association” in the same enrollment script, and remove both when the student leaves.
In 2026-11 I validated the whole path end to end on the test cluster with OpenLDAP + LDAPS self-signed certificates: after creating a user in LDAP,
getent passwd,pamtester login(LDAP password authentication), SSH login, automatic home directory creation,srun/sbatch, andsacctall worked. The test environment usedldap_tls_reqcert = neverfor convenience; production should usedemandand install a proper CA certificate.
Storage Quotas
Slurm QoS only limits CPU, memory, GPU, and job counts; it does not limit disk. Student environments need separate handling:
- Put home/project directories on shared storage (CephFS, NFS, or a parallel filesystem) and limit usage with filesystem or project quotas.
- Clean scratch directories periodically by job or user; do not mix them with home directories.
- Feed quota alerts into monitoring; a full quota makes jobs fail in ways that “look like Slurm problems”, so check
df -h,quota, or CephFS quota first when troubleshooting.
Student Onboarding/Offboarding Checklist
- Create the user and group in LDAP/the student system; confirm UID/GID, home directory, and SSH public key.
- Create the account and association with
sacctmgr; set fairshare, QoS, andGrpTRES. - Create home/project directories on shared storage and set quotas.
- Run
sinfo,srun, andsbatchwith a test account; confirm partition and account permissions. - On departure, disable LDAP, remove the association, and archive/clean up the home directory and quotas.
Prolog and Epilog Scripts
Prolog and Epilog are scripts Slurm runs automatically on compute nodes before and after each job, for environment setup and cleanup. This is the key mechanism for keeping node state clean and preventing jobs from affecting each other in production.
Configure them in slurm.conf:
Prolog=/etc/slurm/prolog.sh
Epilog=/etc/slurm/epilog.sh
# PrologSlurmctld and EpilogSlurmctld run on the control node for cluster-level pre/post processing
# PrologSlurmctld=/etc/slurm/prolog_ctld.sh
# EpilogSlurmctld=/etc/slurm/epilog_ctld.sh
Prolog Example (Before Job Start)
#!/usr/bin/env bash
# /etc/slurm/prolog.sh - runs as root on compute nodes
set -euo pipefail
JOBID="${SLURM_JOB_ID:-unknown}"
# Create an isolated temporary directory for this job
JOB_TMPDIR="/tmp/slurm-job-${JOBID}"
mkdir -p "${JOB_TMPDIR}"
chown "${SLURM_JOB_UID}:${SLURM_JOB_GID}" "${JOB_TMPDIR}"
chmod 700 "${JOB_TMPDIR}"
# Check that key filesystems are mounted
if ! mountpoint -q /home; then
logger -t slurm-prolog "ERROR: /home not mounted for job ${JOBID}"
exit 1
fi
# Check GPU driver state (if GPUs are present)
if command -v nvidia-smi &>/dev/null; then
if ! nvidia-smi &>/dev/null; then
logger -t slurm-prolog "ERROR: nvidia-smi failed for job ${JOBID}"
exit 1
fi
fi
logger -t slurm-prolog "Prolog completed for job ${JOBID} user ${SLURM_JOB_USER}"
exit 0
Epilog Example (After Job Ends)
#!/usr/bin/env bash
# /etc/slurm/epilog.sh - runs as root on compute nodes
set -euo pipefail
JOBID="${SLURM_JOB_ID:-unknown}"
# Clean up only the temporary directory created for this job
rm -rf "/tmp/slurm-job-${JOBID}" 2>/dev/null || true
# Job processes are cleaned up by proctrack/cgroup; do not pkill -9 -u here,
# that would kill other jobs from the same user on this node.
logger -t slurm-epilog "Epilog completed for job ${JOBID}"
exit 0
Notes:
- A non-zero Prolog exit prevents the job from running on that node, and the node is marked
DRAIN. This can be used for node-level admission checks. - Script permissions must be 755, owned by root:root.
- Avoid slow operations (such as network requests) in the scripts; a slow Prolog delays job startup.
- In production, write Prolog/Epilog logs to syslog or a dedicated log file for later troubleshooting.
- Epilog should clean up only by job ID; do not
pkill -u $SLURM_JOB_USERor delete the entire user’s/dev/shm, or you will kill other jobs from the same user on the node. Leave orphan processes toproctrack/cgroup. mountpoint -q /homein Prolog assumes/homeis a shared mount; if home directories are on the root filesystem, this check is a false positive. Check your actual mount point or remove it.- Use
SLURM_JOB_UID:SLURM_JOB_GIDin Prolog, notuser:user. An LDAP user’s primary group may bestudentsrather than a same-named group; in testing, a same-named group madechownfail, Prolog failed, and the node was DRAINed.
Node Health Checks
Slurm can run a health check script periodically on compute nodes. Note that it only runs the script; it does not automatically DRAIN a node when the script returns non-zero. The script must change node state itself with scontrol update. Configure it in slurm.conf:
HealthCheckProgram=/etc/slurm/health_check.sh
HealthCheckInterval=300
HealthCheckNodeState=ANY
HealthCheckInterval=300: run the check every 5 minutes.HealthCheckNodeState=ANY: check nodes in all states; you can also setIDLEto check only idle nodes.
After changing
HealthCheckProgram/HealthCheckInterval, testing showed thatslurmctldneeds a restart for the new configuration to take effect;scontrol reconfigureis not always enough for this set of parameters.
Health Check Script Example
#!/usr/bin/env bash
# /etc/slurm/health_check.sh
set -euo pipefail
HOSTNAME=$(hostname -s)
ERRORS=()
# 1. Check key filesystems
for mp in /home /projects; do
if [[ -d "${mp}" ]] && ! mountpoint -q "${mp}" 2>/dev/null; then
ERRORS+=("${mp} not mounted")
fi
done
# 2. Check disk space (root filesystem usage above 95% is abnormal)
for mp in / /tmp; do
usage=$(df --output=pcent "${mp}" 2>/dev/null | tail -1 | tr -d '% ')
if [[ -n "${usage}" ]] && (( usage > 95 )); then
ERRORS+=("${mp} disk usage ${usage}%")
fi
done
# 3. Check memory (available memory below 512MB is abnormal)
avail_kb=$(awk '/MemAvailable/ {print $2}' /proc/meminfo)
if (( avail_kb < 524288 )); then
ERRORS+=("available memory ${avail_kb}KB too low")
fi
# 4. Check GPU state (if present)
if command -v nvidia-smi &>/dev/null; then
if ! nvidia-smi --query-gpu=gpu_bus_id --format=csv,noheader &>/dev/null; then
ERRORS+=("nvidia-smi query failed")
fi
# Check uncorrectable ECC errors
ecc_errors=$(nvidia-smi --query-gpu=ecc.errors.uncorrected.aggregate.total \
--format=csv,noheader,nounits 2>/dev/null | awk '{s+=$1}END{print s}')
if [[ -n "${ecc_errors}" ]] && (( ecc_errors > 0 )); then
ERRORS+=("GPU uncorrected ECC errors: ${ecc_errors}")
fi
fi
# 5. Check Munge authentication
if ! munge -n 2>/dev/null | unmunge &>/dev/null; then
ERRORS+=("munge auth failed")
fi
# 6. Check network connectivity (to the controller)
if ! timeout 3 bash -c 'echo > /dev/tcp/controller-node/6817' 2>/dev/null; then
ERRORS+=("cannot reach slurmctld on port 6817")
fi
if (( ${#ERRORS[@]} > 0 )); then
reason=$(IFS='; '; echo "${ERRORS[*]}")
# Key point: HealthCheckProgram does not auto-DRAIN; scontrol must be called explicitly
scontrol update NodeName="${HOSTNAME}" State=DRAIN Reason="${reason}"
logger -t slurm-health "UNHEALTHY ${HOSTNAME}: ${reason}"
echo "UNHEALTHY: ${reason}"
exit 1
fi
exit 0
The example assumes /home and /projects are separate mount points; if they are on the root filesystem, mountpoint fails and DRAINs the node, so change or remove that section to match your actual mounts.
A non-zero script exit does not change node state by itself; the example explicitly runs scontrol update NodeName=... State=DRAIN before returning, which is what removes the node from the scheduling pool. After fixing the problem, restore it manually:
sudo scontrol update NodeName=node01 State=RESUME Reason=""
Daily Management
This section covers operations an administrator uses every day. The commands below were run on the Debian 12 + Slurm 22.05 test cluster; replace node and partition names with your environment.
Node Maintenance: DRAIN and Resume
# Remove a node from the scheduling pool and record the reason
sudo scontrol update NodeName=node01 State=DRAIN Reason="kernel upgrade"
# Show node state and reason
sinfo -R
scontrol show node node01
# Wait for jobs on the node to finish (use scancel/requeue in a hurry)
squeue -w node01
# Maintenance done, resume scheduling
sudo scontrol update NodeName=node01 State=RESUME Reason=""
In testing, after State=DRAIN new jobs no longer landed on the node, and RESUME returned it to IDLE. If a node put itself into IDLE+DRAIN because of a Prolog or health check failure, check Reason first.
Partition Maintenance
sudo scontrol update PartitionName=debug State=DOWN
sudo scontrol update PartitionName=debug State=UP
After a partition goes DOWN it accepts no new jobs; running jobs are unaffected. This is good for a whole-partition maintenance window.
Job Management
# Show the queue and wait reasons
squeue
squeue -t PD -o "%.10i %.9P %.12j %.8u %.2t %.10M %.20R"
# Hold, release, requeue, cancel
sudo scontrol hold <jobid>
sudo scontrol release <jobid>
sudo scontrol requeue <jobid>
sudo scancel <jobid>
sudo scancel -u <user>
In testing, after hold on a running job the state stayed RUNNING with Reason=JobHeldAdmin; release restored it; requeue put it back in the queue, possibly showing PENDING BeginTime. Regular users can cancel only their own jobs.
Accounts and Users
sudo sacctmgr show assoc format=Cluster,Account,User,QOS,GrpTRES
sudo sacctmgr add user <user> Account=<account>
sudo sacctmgr remove user where name=<user> account=<account>
sudo sacctmgr modify account <account> set GrpTRES=cpu=64
On graduation/departure, remove the association first, then disable LDAP; do not delete only the system user, as an association may remain in Slurm.
Adding and Removing Nodes
Add a compute node:
- Install
slurmd slurm-client munge libmunge2, and sync/etc/slurm/slurm.confand the munge key. - Add the node to
NodeName/PartitionNameinslurm.conf. - Run
scontrol reconfigure; structural changes may require restartingslurmctldandslurmd. - Run
systemctl enable --now slurmdand confirm the node becomes IDLE withsinfo.
Remove a node: DRAIN first, wait for jobs to drain, systemctl stop slurmd, remove it from the configuration, and run scontrol reconfigure. Do not just power it off.
Maintenance and Upgrades
Slurm upgrades are not just apt upgrade and a restart; the slurmdbd database schema, slurmctld state files, and slurmd version compatibility all matter. Here is a conservative maintenance-window procedure.
Maintenance Window Checklist
- Notify users in advance, set partitions DOWN or nodes DRAIN, and stop new jobs.
- Let running jobs finish; use
scontrol requeueorscancelif urgent. - Back up the
slurmdbddatabase,/etc/slurm,/etc/munge/munge.key, andStateSaveLocation. - Upgrade
slurmdbd, start it, and confirm the schema upgrade succeeded. - Upgrade
slurmctld, thenslurmd; do not reverse the order. - Validate with
sinfo,scontrol ping, andsrun, then restore partitions and nodes.
Debian Package Upgrade
# Back up the database and configuration first
sudo mysqldump --single-transaction slurm_acct_db | gzip > /backup/slurm-acct-$(date +%F).sql.gz
sudo tar czf /backup/slurm-etc-$(date +%F).tar.gz /etc/slurm /etc/munge/munge.key
# Control node
sudo apt update
sudo apt install --only-upgrade slurmdbd slurmctld slurm-client
sudo systemctl restart slurmdbd
sleep 3
sudo systemctl restart slurmctld
# Compute nodes
sudo apt install --only-upgrade slurmd slurm-client
sudo systemctl restart slurmd
Follow SchedMD’s upgrade notes for version compatibility:
slurmdbdbeforeslurmctld, andslurmctldbeforeslurmd. If unsure, upgrade a test cluster first.
Cross-Major-Version Upgrades: Check the Database Conversion Version First
apt install --only-upgrade is only safe within the same major version. For a cross-major upgrade, first check the conversion version in the slurmdbd database:
sudo mysql -N -e "select version from convert_version_table" slurm_acct_db
Debian 12’s 22.05.8 is 12. A newer slurmdbd only accepts old databases at or above its MIN_CONVERT_VERSION; 25.05.9’s MIN_CONVERT_VERSION is 14, so starting directly on a 22.05 database is fatal:
fatal: Database schema is too old for this version of Slurm to upgrade.
You have to go through 23.11 (CONVERT_VERSION=14, MIN_CONVERT_VERSION=11): 22.05(v12) → 23.11(v14) → 25.05(v16). At each hop, start only slurmdbd, let it finish converting the schema, then stop it and switch to the next binary. Back up the database before conversion; schema upgrades are irreversible, and rollback means restoring the backup. In testing, the three steps reported convert_version_table 12, 14, and 16, and the 23.11 and 25.05 slurmdbd logs both printed Conversion done: success!. Debian 12 only has 22.05; 23.11 has to come from source or another repository, and in testing I built it on a separate build VM.
SelectType=select/cons_res was removed in 25.05, so change it to select/cons_tres before upgrading; SelectTypeParameters=CR_CPU_Memory can stay. slurmctld refuses to start when it cannot read the old StateSaveLocation, with incompatible version, got 9728 need >= 10240 <= 11008 in the log; after confirming no jobs are running, use slurmctld -i to ignore unreadable state files (-c skips recovery entirely).
Configuration Checks
# On a compute node, validate that slurmd can parse the configuration and print node info
sudo /usr/sbin/slurmd -f /etc/slurm/slurm.conf -C
# Compare configuration across all nodes
md5sum /etc/slurm/slurm.conf
22.05 has no slurmctld -t mode that only checks configuration; after changes, start it on a test node or test cluster, or check slurmctld.log / slurmd.log after scontrol reconfigure.
Rollback
- Keep the old
.debpackages or apt cache; if needed,apt install slurm-wlm=<version>. slurmdbddatabase schema upgrades are usually irreversible; confirm you have a backup before rolling back. The safest path is restoring the database backup plus the old binaries.- Back up
StateSaveLocationtoo, or the controller may not be able to read the new state after a rollback.
Monitoring and Alerting
Slurm’s built-in status commands are fine for manual checks; long-term monitoring should connect to Prometheus/Grafana. Separate three layers first: nodes, scheduler, and jobs/accounts.
Common Status Commands
# Queues and nodes
sinfo
sinfo -R
squeue -t PD -o "%.10i %.9P %.12j %.8u %.2t %.10M %.20R"
scontrol show node
scontrol show partition
# Scheduler
sdiag
scontrol show daemons
sacctmgr show stats
# Jobs and accounts
sacct -a -X --format=JobID,JobName,User,Account,State,Elapsed,AllocTRES
sreport cluster AccountUtilizationByUser Start=2026-11-01 End=2026-12-01
sshare -a
sprio
In testing, sdiag, sacctmgr show stats, and scontrol show daemons worked; scontrol show stats does not exist in 22.05 and reports invalid entity:stats, so do not put it in monitoring scripts.
Metrics and Alerts
| Layer | Metric | Suggestion |
|---|---|---|
| slurmctld | process, port 6817, scontrol ping, sdiag scheduling cycle |
Alert when the controller is unreachable or the scheduling cycle keeps rising |
| slurmd | node state, sinfo -R, scontrol show node |
Alert on a spike in DOWN/DRAIN |
| Queue | pending job count, oldest pending time, Reason distribution | Alert when queue time exceeds baseline |
| Accounting | slurmdbd 6819, sacctmgr show stats, database disk |
Alert when DBD is unavailable or the queue backs up |
| Nodes | CPU, memory, disk, network (node_exporter) | Routine capacity alerts |
| GPU | DCGM exporter: temperature, ECC, memory | Alerts for GPU device loss and ECC errors |
| Identity | LDAP/SSSD, munge, SSH | Alert on a spike in login/auth failures |
Prometheus/Grafana
- Use
node_exporterfor node metrics;dcgm-exporterfor GPUs (no NVIDIA hardware on hand, so DCGM was not tested). - For Slurm metrics, use
sckyzo/slurm_exporter(calls the CLI directly) orubccr/slurm-exporter(REST, watch the API version); this cluster’s tested combination is the former + node_exporter, feeding Prometheus and Grafana, as shown in “Web Interface”. - Use Alertmanager with a webhook for alerts; Debian’s alertmanager package has no web UI, so use
amtoolor the HTTP API. - Collect
slurmctld.log,slurmd.log, andslurmdbd.logwith Promtail/Loki or Filebeat, and at least alert onerror/fatal. - Do not watch only GPU utilization; queue wait times, node DRAIN reasons, and
slurmdbdqueue backlogs often surface problems earlier.
Logs and Debugging
sudo tail -f /var/log/slurm/slurmctld.log
sudo tail -f /var/log/slurm/slurmd.log
sudo tail -f /var/log/slurm/slurmdbd.log
sudo scontrol setdebug debug2 # temporary
sudo scontrol setdebug info # restore
Leaving SlurmctldDebug / SlurmdDebug at debug2 long-term grows logs quickly; cap size with logrotate or journald and restore info after troubleshooting.
Configuration Management
Slurm configuration files must be identical across all nodes; manual scp will drift sooner or later. Keep /etc/slurm in Git and distribute it with Ansible or a script; do not put keys and database passwords in Git.
Single Source of Configuration
- Put
slurm.conf,cgroup.conf,prolog.sh,epilog.sh, andhealth_check.shin one repository. gres.confcan differ per node, so template it separately; keepslurm.confexactly identical.- Use Ansible Vault, SOPS, or an external credential manager for
munge.key,StoragePassinslurmdbd.conf, and the LDAP bind password; do not commit plaintext.
Distribution and Validation
# Compare md5 across all nodes; mismatches trigger a slurmctld warning
md5sum /etc/slurm/slurm.conf
# Validate on a compute node that slurmd can parse the configuration
sudo /usr/sbin/slurmd -f /etc/slurm/slurm.conf -C
# After configuration changes
sudo scontrol reconfigure
# Restart slurmctld/slurmd for structural changes (nodes, partitions, SlurmctldHost)
If slurmctld logs “appears to have a different slurm.conf”, diff the configuration first; if it is intentional, add DebugFlags=NO_CONF_HASH, but do not use that flag to hide drift.
Change Process
- Edit the configuration in Git and validate with
slurmd -Cor a test cluster. - Back up the current
/etc/slurmand database. - Distribute to all nodes in a maintenance window, then
scontrol reconfigureor restart. - Validate with
sinfo,scontrol ping, andsrun; roll back from the backup on failure.
Backup and Disaster Recovery
Data to Back Up
| Data | Path/Source | Frequency | Notes |
|---|---|---|---|
| slurm.conf and related config | /etc/slurm/ | after every change | keep in version control (Git) |
| Munge Key | /etc/munge/munge.key | once after initialization | if lost, redistribute to all nodes |
| slurmdbd database | MariaDB slurm_acct_db | daily | includes all accounting, user associations, QoS |
| StateSaveLocation | /var/lib/slurm-llnl/ | real time (shared FS) | slurmctld relies on it to recover state on restart |
Database Backup Script
#!/usr/bin/env bash
# /etc/cron.daily/slurm-db-backup
set -euo pipefail
BACKUP_DIR="/backup/slurm"
KEEP_DAYS=30
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p "${BACKUP_DIR}"
# Logical backup (suitable for small to medium clusters)
mysqldump --single-transaction --routines --triggers \
slurm_acct_db | gzip > "${BACKUP_DIR}/slurm_acct_db_${DATE}.sql.gz"
# Back up configuration files
tar czf "${BACKUP_DIR}/slurm_config_${DATE}.tar.gz" \
/etc/slurm/ /etc/munge/munge.key 2>/dev/null || true
# Remove expired backups
find "${BACKUP_DIR}" -name "*.gz" -mtime +${KEEP_DAYS} -delete
logger -t slurm-backup "Backup completed: ${BACKUP_DIR}/slurm_acct_db_${DATE}.sql.gz"
Recovery Procedure
# 1. Stop the controller and accounting services first
sudo systemctl stop slurmctld slurmdbd
# 2. Drop and restore the database (verify the backup file first)
sudo mysql -e "DROP DATABASE IF EXISTS slurm_acct_db; CREATE DATABASE slurm_acct_db;"
gunzip < /backup/slurm/slurm_acct_db_YYYYMMDD.sql.gz | sudo mysql slurm_acct_db
# 3. Restore configuration
sudo tar xzf /backup/slurm/slurm_config_YYYYMMDD.tar.gz -C /
# 4. Restart services (in order)
sudo systemctl restart munge
sudo systemctl restart slurmdbd
sleep 3
sudo systemctl restart slurmctld
Configuration Version Control
Keep /etc/slurm/ in Git:
cd /etc/slurm
sudo git init
# slurmdbd.conf contains StoragePass, do not commit it; same for key files
printf 'slurmdbd.conf\n*.key\n' | sudo tee .gitignore >/dev/null
sudo git add -A
sudo git commit -m "initial slurm config"
# After each change
sudo git add -A && sudo git commit -m "description of change"
sudo git log --oneline
Use Ansible/Puppet or similar configuration management to distribute it to all nodes and keep them consistent.
Security Hardening
Basic Principles
- Least privilege: the login node does not run slurmd; compute nodes do not expose SSH to regular users (or allow it only while the user has a running job).
- Network isolation: separate the management network (Slurm traffic) from storage; if possible, isolate the compute network (MPI) too.
- Authentication hardening: Munge key mode 400, readable only by the munge user; rotate it periodically.
Munge Key Rotation
Rotate the key in a maintenance window: stop
slurmctldandslurmdon every node first, swap the key, then start them, so running jobs do not fail authentication.
# Generate a new key on the control node
sudo /usr/sbin/mungekey --force
# Distribute to all nodes (use configuration management or scp)
for node in node01 node02 node03 node04 login-node; do
sudo scp /etc/munge/munge.key "${node}":/etc/munge/munge.key
ssh "${node}" 'sudo chown munge:munge /etc/munge/munge.key && sudo chmod 400 /etc/munge/munge.key && sudo systemctl restart munge'
done
# Finally restart munge on the control node
sudo systemctl restart munge
Restricting SSH Access on Compute Nodes
You can use Slurm’s PAM module to allow SSH only for users with a running job on that node. Debian 12 needs the module installed separately:
sudo apt install -y libpam-slurm-adopt
Add this to /etc/pam.d/sshd on compute nodes:
account required pam_slurm_adopt.so
The PAM line alone is not enough. pam_slurm_adopt looks for the job’s extern step when registering the session; if containers are not enabled in slurm.conf, a batch job only has a batch step and no extern step, and the module treats a user with a running job as having “no active jobs” and denies them. You also need:
ProctrackType=proctrack/cgroup
PrologFlags=Contain
LaunchParameters=use_interactive_step
Contain creates a job container on allocated nodes with the ProcTrack plugin at allocation time and implicitly enables Alloc. Restart slurmctld and all slurmd after the change; only newly submitted jobs will have an extern step. LaunchParameters=use_interactive_step only affects srun --pty interactive steps and does not replace Contain.
pam_systemd conflicts with pam_slurm_adopt: at login it puts the session in user.slice/user-<uid>.slice/session-<n>.scope, and even if the module allows access, the process is not in the job cgroup. Per the Slurm docs, comment it out of the sshd or common-session session stack:
# /etc/pam.d/common-session
# session optional pam_systemd.so
If you need /run/user/$UID or linger, run loginctl enable-linger / disable-linger for that user in Prolog/Epilog and export XDG_* yourself.
In production, tighten the failure policy; the default configuration may allow an unrestricted session when the module itself errors:
account required pam_slurm_adopt.so action_adopt_failure=deny action_generic_failure=deny
The module version must match slurmd. In testing, Debian’s 22.05 pam_slurm_adopt.so against a 25.05 slurmd reported “no active jobs” even when the job had an extern step; only a module built from the 25.05 source contribs/pam_slurm_adopt worked. When upgrading Slurm, upgrade libpam-slurm-adopt too, or build it from the same source version.
Tested (Debian 12, 22.05.8 and 25.05.9): with only the PAM line, SSH without a job was denied, but users with a batch job were also denied; after adding PrologFlags=Contain and restarting, scontrol show step <jobid> showed <jobid>.extern. On 25.05 with pam_systemd kept, SSH worked but the cgroup was user.slice/.../session-<n>.scope; after commenting out pam_systemd, the session landed in .../job_<id>/step_extern/user/task_0. After the job ended, the same user’s SSH returned Access denied by pam_slurm_adopt: you have no active jobs on this node.
File Permission Audit Checklist
| File/Directory | Mode | Owner |
|---|---|---|
| /etc/munge/munge.key | 0400 | munge:munge |
| /etc/slurm/slurm.conf | 0644 | root:root |
| /etc/slurm/slurmdbd.conf | 0600 | slurm:slurm |
| /etc/slurm/cgroup.conf | 0644 | root:root |
| /etc/slurm/prolog.sh | 0755 | root:root |
| /etc/slurm/epilog.sh | 0755 | root:root |
| /etc/slurm/health_check.sh | 0755 | root:root |
| /var/lib/slurm-llnl/ | 0755 | slurm:slurm |
| /var/spool/slurmd/ | 0755 | slurm:slurm |
| /var/log/slurm/ | 0755 | slurm:slurm |
Performance Tuning
Scheduler Parameters
Key scheduling parameters you can tune in slurm.conf:
# Scheduler interval and backfill policy
SchedulerParameters=default_queue_depth=128,bf_continue,bf_interval=30,bf_max_job_test=1200,bf_resolution=600,bf_window=4320
Parameter descriptions:
| Parameter | Default | Suggested | Notes |
|---|---|---|---|
| default_queue_depth | 100 | 128 | max jobs evaluated per scheduling cycle |
| bf_continue | disabled | enabled | backfill does not stop after finding one runnable job |
| bf_interval | 30 | 30 | backfill scheduling interval (seconds) |
| bf_max_job_test | 500 | 1200 | max jobs tried per backfill cycle |
| bf_resolution | 60 | 600 | backfill time resolution (seconds) |
| bf_window | 1440 | 4320 | backfill look-ahead window (minutes) |
Controller Performance
When a cluster exceeds 50 nodes or concurrent jobs frequently exceed 1000, the control node needs tuning:
# Increase message timeout (default 10 seconds)
MessageTimeout=30
# Batch job start timeout
BatchStartTimeout=30
# Wait time after job completion (seconds; avoids inconsistency from fast recycling)
CompleteWait=10
Database Maintenance
slurmdbd’s MariaDB tables grow over time; archive and optimize regularly:
# Archive job records older than 6 months. Events/Jobs/Steps must be listed explicitly,
# or Purge* calls delete data without archiving it.
sacctmgr archive dump Directory=/backup/slurm/archive/ Events Jobs Steps \
PurgeEventAfter=6months \
PurgeJobAfter=6months \
PurgeStepAfter=6months
# Table names are prefixed with the cluster name; list the actual names before optimizing (run in a low-load window)
mysql -N -e "SHOW TABLES FROM slurm_acct_db LIKE '%job_table';"
mysql -e "OPTIMIZE TABLE \`slurm_acct_db\`.\`debian-cluster_job_table\`, \`slurm_acct_db\`.\`debian-cluster_step_table\`;"
NUMA-Aware Scheduling
For multi-socket servers, NUMA-aware scheduling usually benefits compute-intensive jobs:
# slurm.conf
SelectType=select/cons_tres
SelectTypeParameters=CR_Core_Memory
TaskPlugin=task/affinity,task/cgroup
Use binding options when submitting jobs:
# Bind to socket (each NUMA domain)
srun --cpu-bind=socket -n4 ./my_app
# Bind to cores
srun --cpu-bind=cores -n4 ./my_app
Common Issues and Troubleshooting
Quick Troubleshooting Flow
flowchart TD
A["Problem Detected"] --> B{"scontrol ping OK?"}
B -->|"No"| C["Check slurmctld service<br/>and logs"]
B -->|"Yes"| D{"Node State?"}
D -->|"DOWN/DRAIN"| E["scontrol show node<br/>check Reason field"]
D -->|"IDLE but job pending"| F["Check partition state<br/>sinfo, scontrol show part"]
D -->|"UNKNOWN"| G["Check slurmd + munge<br/>DNS/hosts resolution"]
E --> H{"Munge OK?"}
H -->|"No"| I["Verify munge.key<br/>time sync, permissions"]
H -->|"Yes"| J["Check slurm.conf<br/>node definition match"]
F --> K{"Resources available?"}
K -->|"No"| L["Wait or adjust<br/>resource limits"]
K -->|"Yes"| M["Check QoS/association<br/>sacctmgr show assoc"]
Troubleshooting by Symptom
Munge authentication failure
# Check key consistency (run on both nodes and compare md5)
md5sum /etc/munge/munge.key
# Check permissions
ls -la /etc/munge/munge.key
# Expected: -r-------- 1 munge munge
# Check clock skew (over 300 seconds fails)
date +%s # compare UNIX timestamps across nodes
# Check the munge log
journalctl -u munge --no-pager -n 50
Abnormal node state (DOWN/DRAIN/UNKNOWN)
# Show node details and reason
scontrol show node node01
# Common causes and fixes:
# "Not responding" -> check whether slurmd is running and the network is reachable
# "Low RealMemory" -> RealMemory in slurm.conf is larger than the node's actual memory; lower it
# "Kill task failed" -> Epilog or cgroup cleanup failed; check the Epilog script
# Restore the node
sudo scontrol update NodeName=node01 State=RESUME Reason=""
Jobs stay Pending and never run
# Show the job's wait reason
scontrol show job <jobid> | grep Reason
# Common Reasons:
# Priority -> higher-priority jobs are queued; wait
# Resources -> requested resources are currently unavailable
# QOSMaxJobsPerUserLimit -> exceeded the QoS concurrent job limit
# AssocMaxJobsLimit -> exceeded the account association job limit
# InvalidAccount -> the user is not associated with a valid Account
# InvalidQOS -> the user may not use the requested QoS
# Check user associations
sacctmgr show assoc user=$USER format=Cluster,Account,User,QOS
Accounting/slurmdbd unavailable
# Check slurmdbd service state
sudo systemctl status slurmdbd --no-pager
# Check the database connection
mysql -u slurm -p -e "SELECT 1;" slurm_acct_db
# Check the listening port
ss -tlnp | grep 6819
# Check the slurmdbd log
sudo tail -100 /var/log/slurm/slurmdbd.log
Configuration changes not taking effect
# Reload configuration on the control node
sudo scontrol reconfigure
# If reconfigure is not enough (for structural changes such as node count), restart
sudo systemctl restart slurmctld
# Verify the configuration is loaded
scontrol show config | grep '<parameter>'
Log File Summary
| Component | Log Path | Notes |
|---|---|---|
| slurmctld | /var/log/slurm/slurmctld.log | main scheduler log; first place to look |
| slurmd | /var/log/slurm/slurmd.log | compute node log for job execution issues |
| slurmdbd | /var/log/slurm/slurmdbd.log | accounting daemon log |
| munge | /var/log/munge/munged.log | authentication-related issues |
Raise the log level temporarily when debugging:
# Raise slurmctld log level temporarily (no restart needed)
sudo scontrol setdebug debug2
# Restore the default level
sudo scontrol setdebug info
Test Environment and Results
The results below were actually produced in 2026-11 on a PVE 9.2 cluster.
| Node | Role | Configuration |
|---|---|---|
| slurm-ctl | slurmctld primary + slurmdbd + MariaDB | 2 vCPU / 2 GB, Debian 12.6 |
| slurm-ctl2 | slurmctld backup + slurmdbd backup | 2 vCPU / 2 GB, Debian 12.6 |
| slurm-node1 | slurmd | 2 vCPU / 2 GB, Debian 12.6 |
| slurm-node2 | slurmd + GVT-g vGPU | 2 vCPU / 2 GB, Debian 12.6 |
| slurm-build | standalone login node + OOD | 2 vCPU / 4 GB, Debian 12.6 |
| slurm-auth | Authentik + Teleport + Prometheus/Grafana + 3×Galera | 2 vCPU / 3 GB, Debian 12.6 |
Slurm started as 22.05.8-4+deb12u3 from the Debian 12 repository, cgroup v2 (cgroup2fs), primary and backup sharing StateSaveLocation on NFS, with Munge and slurm.conf consistent across nodes. For the cross-version upgrade I built 23.11.4 and 25.05.9 on a separate build VM; Web UI and Authentik integration were tested after upgrading to 23.11.4. For GPU tests I attached a GVT-g vGPU to slurm-node2; the login node/OOD ran on slurm-build; Authentik, Teleport, Prometheus/Grafana, and the three Galera instances ran on slurm-auth. The three Galera instances ran on one VM to validate failover with the resources on hand; production should spread them across three machines.
Validated points:
- Multi-node scheduling:
srun -N2 -n4 hostnameran 2 tasks each onslurm-node1/slurm-node2. - cgroup v2 memory limit: a job with
--mem=100Mtried to allocate 300 MB, ended withOUT_OF_MEMORY,ExitCode=0:125. - CPU binding: inside
srun -c1,Cpus_allowed_list: 0; with-c2,0-1, showingConstrainCores=yesworks. - Accounting and reports:
sacctcould query JobID, State, NodeList, Elapsed for completed jobs;sreport cluster AccountUtilizationByUserandsshare -aproduced usage/fair-share by account. - QoS: when
MaxWall,MaxTRESPU, orMaxJobsPerUserwas exceeded, jobs enteredPENDINGwith ReasonsQOSMaxWallDurationPerJobLimit,QOSMaxCpuPerUserLimit,QOSMaxJobsPerUserLimit; not a submission-time error. - Necessity of
limits: with onlyAccountingStorageEnforce=associations,qos, a 5-hour job bypassed a 4-hour QoSMaxWall; only after addinglimitsand restartingslurmctlddid it go Pending. - Failover: default
SlurmctldTimeout=120; about 2m46s from stopping the primary toRunning as primaryin the backup log;scontrol pingstill shows primary/backup per configuration and cannot determine the active role. The original primary becomes primary again after restart. - Prolog/Epilog:
/tmp/slurm-job-<id>created by job ID existed during the job and was removed after Epilog; nopkill -uthat would kill other jobs from the same user. - Health checks: a non-zero script exit alone does not DRAIN; after the script explicitly ran
scontrol update NodeName=$(hostname -s) State=DRAIN Reason=..., the node enteredIDLE+DRAIN. - Lmod: Debian 12’s
lmod 8.6.19worked;srun -N2 -n2 bash -lc 'module load hello/1.0; hello'loaded the same module on both compute nodes. - Multi-tenancy:
classA/classBaccounts,AllowAccountspartitions, andGrpTRESlimits worked; a job with the wrong account submitted to a partition ended withJob's account not permitted to use this partition (...); jobs exceeding accountGrpTRESwent Pending with ReasonAssocGrpCpuLimit. - LDAP/SSSD: OpenLDAP + LDAPS self-signed; created
stu01in LDAP (nouseraddon nodes);getent passwd,pamtester login(LDAP password authentication), SSH password login,pam_mkhomedirauto home creation,srun/sbatch, andsacctall passed. Right after LDAP user creation,srunreportedInvalid account or account/partition combination specified; aftersacctmgr add user stu01 Account=classAit worked. Prolog had to useSLURM_JOB_UID/GIDto match LDAP’s primary groupstudents. - CephFS: the test cluster’s CephFS (example name
slurmfs) hadclient.slurm, three nodes mounted/cephfsvia fstab, andsrun -N2wrote to the same directory across nodes.secretfileneedsceph-common; the OSD cap usestag cephfs data=<filesystem name>; with the wrong value small files could be created but data writes returnedEPERM. - GPU/GRES and benchmarks: PVE 9.2 Intel GVT-g attached the HD 530 to
slurm-node2asi915-GVTg_V5_4; Slurm showedGres=gpu:1; a--gres=gpu:1job’sAllocTRESincludedgres/gpu=1; without--gres,clinfosaw no OpenCL device.clpeak,sysbench,mbw,stress-ng, and HPCC data and mixed workloads are in “CPU, GPU, and Mixed-Workload Benchmarks”. - Slurm-web: Slurm 23.11.4 + Slurm-web 3.3.0 from the Rackslab repository, auth via OpenLDAP; Dashboard, Jobs, and job details showed nodes, jobs, and
--gres=gpu:1Requested/Allocated; screenshots are in “Slurm-web 3.3.0 in Practice” under “Web Interface”. - Authentik: Authentik 2024.12.3 LDAP Outpost tested; SSSD with LDAPS +
ldap_user_name=cncouldgetentandpamtester; after Slurm-web pointed at Authentik LDAP,stu01logged in and Authentik’s user list showed the login. Key gotcha: LDAP Providerauthorization_flowmust be the authentication flow, not the authorization flow. - Standalone login node:
slurm-build(10.31.0.229) installed only the client and munge;stu01ransinfo,srun -A classa -n1 hostname(returnedslurm-node1), andsbatch --chdir=/tmp(job 74 COMPLETED). Default submission from/home/usermade job 73 fail due to output file permissions; the client version must match the controller, and this test used the 23.11 client. - Galera + slurmdbd primary/backup: 3 MariaDB 10.11/Galera 4 instances + HAProxy; after stopping
galera@1, the cluster had 2 nodes and job 76 still accounted; after recovery it returned to 3. After stopping the primaryslurmdbd,slurmctldusedAccountingStorageBackupHostand job 77 was recorded by the backup DBD;sacct -j 77found it. - Teleport: Teleport 18.10 CE, local user
labadmincompleted password + TOTP,slurm-buildregistered as a node; the web terminal logged in asstu01and ransinfo, with session logs under/var/lib/teleport/log/. Teleport 18 CE’s OIDC connector returnsOIDC is only available in Teleport Enterprise; Authentik OIDC did not work. - Open OnDemand: OOD 4.0.11 + Authentik OIDC,
stu01logged into the Dashboard, Active Jobs showed Job Composer’s job 80 (COMPLETED). Job Composer returned 422 over HTTP because the Secure session cookie was not saved; after HTTPS, creation and submission worked; the default template directory had no script, somain_job.shwas added manually. - Prometheus/Grafana/Alertmanager: SckyzO
slurm_exporter1.8.6 + node_exporter, Prometheus 2.42 + Alertmanager 0.25 + Grafana 13.3.1; after DRAINing the GPU node,SlurmNodeDownfired, the webhook received firing/resolved, and Grafana showed 2 nodes, 1 running job, 1 DRAIN.State=DOWNreturns to IDLE due toReturnToService=2, so the test used DRAIN. pam_slurm_adopt: with only the PAM account line, users with batch jobs were also denied; after addingPrologFlags=Containand restarting, jobs had an.externstep. On 25.05, the PAM module must be built from the same version, andpam_systemdmust be disabled, or the session lands insession-<n>.scopeinstead ofjob_<id>/step_extern; after job cancellation, the same user’s SSH returns “no active jobs”.- Cross-version upgrade: 22.05.8’s
convert_version_tablewas 12; starting 25.05.9’sslurmdbddirectly reportedDatabase schema is too old for this version of Slurm to upgrade.(25.05’sMIN_CONVERT_VERSION=14). Used 23.11.4’sslurmdbdto convert to 14, then 25.05.9 to 16. 25.05’sslurmctldreading 22.05’sStateSaveLocationreportedassoc_usage state ... got 9728 need >= 10240 <= 11008; starting with-idiscarded old state and recovered 0 nodes/0 jobs; afterwardssinfo,srun -N2 -n2,sbatch, andsacctworked and old accounting records remained. 22.05’ssrunagainst a 25.05 controller reportsInvalid Protocol Version 11008, so clients must be upgraded too;SelectType=select/cons_resmust be changed toselect/cons_tres, as 25.05 no longer provides thecons_resplugin. - Daily management: node DRAIN/RESUME, partition DOWN/UP, and
scontrol hold/release/requeuewere all verified; afterhold,Reason=JobHeldAdmin, and afterrequeue,PENDING BeginTime. - Monitoring/configuration:
sdiag,sacctmgr show stats,scontrol show daemons, andslurmd -Cworked;scontrol show statsdoes not exist in 22.05.
CPU, GPU, and Mixed-Workload Benchmarks
Tools and inputs come from Debian 12 packages or the projects’ standard inputs, with fixed versions and parameters:
clpeak 1.1.2: OpenCL device bandwidth, single/double/half-precision and integer throughput, kernel latency.sysbench 1.0.20: CPU prime calculation, memory write bandwidth.mbw: memcpy / dumb / mcblock memory copies.stress-ng 0.15.06: bogo ops/s for 2 CPU stressors.hpcc 1.5.0: HPL, STREAM, DGEMM, FFT, and other HPC Challenge tests; input from/usr/share/doc/hpcc/examples/_hpccinf.txtchanged toN=2048, NB=64, P=2, Q=1, run with 2 MPI processes.
Single-node CPU results:
| Test | Result |
|---|---|
| sysbench CPU, 1 thread | 429.07 events/s |
| sysbench CPU, 2 threads | 797.57 events/s |
| sysbench memory, 1 MiB block, 10 GiB write | 17085.28 MiB/s |
| mbw MEMCPY / DUMB / MCBLOCK | 6245.9 / 9234.2 / 12643.6 MiB/s |
| stress-ng, 2 CPU, 20s | 2589.90 bogo ops/s |
HPCC (N=2048, 2 MPI processes):
| Test | Result |
|---|---|
| HPL | 3.501 Gflops |
| STREAM Copy / Scale / Add / Triad | 17.97 / 14.18 / 15.62 / 17.16 GB/s |
| Single DGEMM | 2.053 Gflop/s |
| Single FFT | 3.302 Gflop/s |
GVT-g vGPU (i915-GVTg_V5_4, 512 MB aperture, 23 compute units, 1050 MHz):
| Test | Result |
|---|---|
clpeak single precision |
323.09 GFLOPS |
| Half precision | 638.76 GFLOPS |
| Double precision | 81.39 GFLOPS |
| Integer | 107.73 GIOPS |
| Global memory bandwidth float / float4 | 18.43 / 19.04 GB/s |
| transfer write / read | 10.01 / 9.12 GB/s |
| kernel launch latency | 1209.86 us |
Multi-node CPU and mixed workloads:
srun -N2 -n2 -c1ran sysbench on both nodes: slurm-node1 429.27 events/s, slurm-node2 433.06 events/s.sbatch -c2 --gres=gpu:1ran sysbench (1 thread) andclpeak --global-bandwidth --compute-sptogether: CPU dropped from 429.07 solo to 233.46 events/s, while the GPU still did 322.68 GFLOPS and 19.43 GB/s; the job’sAllocTRESwascpu=2,gres/gpu=1,mem=1800M, showing both CPU and GPU resources were allocated as requested.- A GPU-only
clpeak --all-testsjob ran for 2 minutes 49 seconds, andsacct’sAllocTRESincludedgres/gpu=1; a job on the same node without--gressaw no platform inclinfo.
These numbers are from a 2 vCPU VM + 512 MB vGPU and are small-scale; HPCC’s N=2048 is far below a real HPL tuning size, so do not use them to infer physical-machine peaks. They are enough to verify GRES allocation, device isolation, and relative changes under CPU/GPU concurrency.
Not validated end to end:
- NVIDIA GPU path: no NVIDIA hardware on hand;
/dev/nvidia*, NVIDIA drivers, DCGM, andnvidia-smiwere not tested, and the NVIDIA configuration in the post is for reference only. - Teleport’s Authentik OIDC/SAML: Teleport 18.10 Community returns
OIDC is only available in Teleport Enterprise; local users + TOTP + web terminal were tested, but OIDC did not work. - OOD interactive apps (Jupyter, VS Code, etc.) were not configured; Dashboard, Active Jobs, and Job Composer submission were tested.
References
- Slurm documentation
- Configuration wizard (interactive slurm.conf generator)
- slurm.conf parameter reference
- cgroup integration guide
- Accounting and slurmdbd configuration
- High availability configuration
- QoS and resource limits
- Prolog/Epilog scripts
- Scheduler parameter tuning
- Slurm REST API
- Slurm-web documentation
- Authentik documentation
- Open OnDemand documentation
- Teleport documentation
- SckyzO slurm_exporter
- Prometheus
- Grafana
- clpeak
- sysbench
- mbw
- stress-ng
- HPC Challenge (HPCC)
- Proxmox documentation: Mediated Devices (vGPU, GVT-g)
Comments