resources.yaml(5)
π NAME π
resources.yaml β the Slurm configuration file for Hierarchical Resources (HRES), aka the YAML file that lets you stack your resources in layers like the absolute icon you are π
β¨ DESCRIPTION β¨
okay so, <pink>resources.yaml</pink> is a YAML-formatted config file that defines your Hierarchical Resources (HRES). No cap. It has to live in the same directory as slurm.conf β they're roommates, they don't do long distance π«Ά
And the comment rules? Literally so simple: any text following a # in this file is treated as a comment through the end of that line. That's it, that's the whole vibe π¬
Want even more tea? There are additional details on the Hierarchical Resource (HRES) Scheduling page: https://slurm.schedmd.com/hres.html π¦
πΈ PARAMETERS πΈ
Each Hierarchical Resources definition is a YAML object, and every one of them contains these attributes:
resourceβ the unique name for the resource, bestie. This name is howslurmctldidentifies it. And heads up: this must be the first attribute in the object. Not second, not "somewhere in there". First. πmodeβ the planning mode for the resource. It has to be one of these three, pick your fighter:MODE_1β sufficient resources are required on only one layer that overlaps with the job's allocated nodes.MODE_2β sufficient resources must be available on all layers that overlap with the job's allocated nodes.MODE_3β resources are allocated on a per-node basis. The scheduler calculates total consumption from the most granular layer and sums it up into the successively higher layers, making sure the count is not exceeded at any layer. This mode is designed for consumable resources like power π and can be mapped to a block topology using thetopologyparameter. It's giving very main character energy, ngl.
topologyβ (Optional) the name of a topology/block definition to map to this resource. Only valid forMODE_3resources, so don't try it anywhere else π The HRes layers must have the same layout as the specified block topology. What does that buy you? The scheduler can simultaneously optimize both the HRes and block topology allocations. Slay β¨variablesβ (Optional) a list of name/value pairs that map arbitrary text strings to administratively-defined resource counts. Then your users can use those strings in job submissions (like--resources=power:full_node) instead of typing a numeric value, because numbers are lowkey exhausting. Each entry in the list contains:nameβ the string alias for the value (e.g.,"full_node").valueβ the numeric resource count (e.g.,1000).
layersβ a list of layers that define the resource hierarchy. Each layer is a YAML object containing:nodesβ a list of node names or hostlist expressions that are part of this layer.countβ the total number of resources available in this specific layer.baseβ (Optional) a list of name/value pairs describing non-job-related (static) resource consumption in this layer. This is particularly relevant forMODE_3. Each entry contains:nameβ the name of the static resource consumer (e.g.,"storage","network1").valueβ the numeric resource count this consumer uses.
π EXAMPLE π
Here's the whole thing in its natural habitat, verbatim, don't touch a character π
---
- resource: flat
mode: MODE_2
layers:
- nodes: # highest level
- "node[01-32]"
count: 24
- nodes: # middle levels
- "node[01-16]"
count: 16
- nodes:
- "node[17-32]"
count: 16
- nodes: # lowest levels
- "node[01-08]"
count: 12
- nodes:
- "node[09-16]"
count: 12
- nodes:
- "node[17-24]"
count: 12
- nodes:
- "node[25-32]"
count: 12
- resource: natural
mode: MODE_1
layers:
- nodes: # highest level
- "node[01-32]"
count: 50
- nodes: # lowest levels
- "node[01-16]"
count: 100
- nodes:
- "node[17-32]"
count: 100
- resource: power
mode: MODE_3
topology: blok1
variables:
- name: full_node
value: 1000
- name: full_gpu_node
value: 2000
layers:
- nodes:
- "node[01-32]"
count: 130000
base:
- name: acUnit1
value: 10000
- name: acUnit2
value: 8000
- nodes:
- "node[01-16]"
count: 60000
base:
- name: network1
value: 3000
- nodes:
- "node[17-32]"
count: 80000
base:
- name: network2
value: 2000
- nodes:
- "node[01-08]"
count: 40000
base:
- name: storage
value: 5000
- nodes:
- "node[09-16]"
count: 40000
- nodes:
- "node[17-24]"
count: 40000
- nodes:
- "node[25-32]"
count: 40000
π COPYING π
Copyright (C) 2025 SchedMD LLC.
This file is part of Slurm, a resource management program. For details, see https://slurm.schedmd.com/.
Slurm is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Slurm is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
fr fr, read the license, it's not that long and it's literally protecting you π«Ά
π¦ SEE ALSO π¦
and that's the whole page, bestie π
β¨ this was resources.yaml(5) from the Slurm 25.11 release, filed under Slurm Configuration File β go forth and layer your resources, you've got this ππ
π¦ where this page comes from
- arch rolling: slurm-llnl 26.05.5.1-1 Β· GPL-2.0-or-later
- epel 10: slurm 26.05.5-1.el10_3 Β· GPL-2.0-or-later AND BSD-2-Clause AND BSD-1-Clause
- nixos 26.05: slurm 25-11-8-1
- nixpkgs unstable: slurm 26-05-5-1
- ubuntu resolute: slurm-client 25.11.2-1ubuntu2 Β· GPL-2.0-or-later WITH OpenSSL exception
- ubuntu stonking: slurm-client 26.05.4-1ubuntu1 Β· GPL-2.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms