tezvyn:

Slurm: The Job Scheduler for Supercomputers

AI-drafted, machine-checkedSource: Wikipedia: Slurm Workload Managerintermediate

Slurm is the reservation system for a shared supercomputer, queuing up jobs and assigning them to available nodes. It's the backbone of high-performance computing clusters in science and ML.

WHY IT EXISTS Supercomputers and large computer clusters are enormously expensive, shared resources. Without a central manager, users would create chaos, competing for resources, crashing each other's work, and leaving hardware idle. Slurm was created to bring order, fairness, and efficiency to managing workloads on these shared systems.

THE MENTAL MODEL Think of Slurm as a restaurant's reservation system combined with a maitre d'. Users submit a 'reservation' (a job script) specifying their party size (resource needs: CPUs, memory, time). Slurm puts them in a queue and 'seats' them (runs the job) only when a suitable 'table' (compute nodes) becomes available, ensuring the restaurant (the cluster) runs smoothly.

HOW IT WORKS Slurm manages a cluster of computers, called nodes, from a central point. A user submits a script that defines the computational work and specifies the necessary resources (e.g., 16 cores, 64GB RAM, 1 GPU). Slurm adds this 'job' to a queue. Based on configured policies like priority and fairness, Slurm waits for the requested resources to become free. Once they are, it allocates the nodes to the job, executes the script, monitors its progress, and releases the resources when the job is finished or fails.

WHEN TO USE IT Use Slurm when you need to manage batch jobs for multiple users on a shared cluster of Linux machines. It is the standard for high-performance computing (HPC) environments found in universities, government research labs, and corporations performing large-scale scientific simulations or training massive machine learning models.

WHEN NOT TO USE IT Slurm is overkill for a single workstation or a small, informally shared set of computers. For managing containerized, service-oriented applications, a container orchestrator like Kubernetes is typically a better fit, as it focuses on service availability rather than batch job completion.

ONE CANONICAL EXAMPLE A climate scientist needs to run a simulation that requires 512 CPU cores and 2TB of memory for 72 hours. They submit their job script to their institution's supercomputer using Slurm's sbatch command, detailing these resource needs. The job might wait in the queue for several hours or days. When a sufficient number of nodes are free, Slurm automatically allocates them and runs the simulation, notifying the scientist upon completion.

Read the original → en.wikipedia.org

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.