topology.conf(5)

✨ NAME ✨

okay so bestie, you've opened topology.conf(5) β€” Slurm's Configuration File β€” and honestly? it's the network-topology glow-up file, topology.conf πŸ’…


🌸 DESCRIPTION 🌸

topology.conf is an ASCII file that describes your cluster's network topology so Slurm can do optimized job resource allocation. no cap, that's the whole point.

This file always lives in the same directory as the slurm.conf. periodt.

⚠️ NOTE: this file gets completely ignored if topology.yaml(5) exists. like, it doesn't even get a second glance. 😭
  • Parameter names are case insensitive (she does not care about your Caps Lock energy 🫢).
  • Any text following a # is a comment through the end of that line. ice that whole line out.
  • Changes to the config file take effect when:
    • you restart the Slurm daemons, or
    • a daemon receives the SIGHUP signal, or
    • you run scontrol reconfigure

…unless otherwise noted. iykyk.

wanna go deeper? the topology guide lives here and it's lowkey required reading: <https://slurm.schedmd.com/topology.html>


🌳 topology/tree 🌳

This plugin requires you to use the select/cons_tres plugin. no substitutions, bestie.

The network topology configuration: each line defines a switch name and its children β€” and those children are either node names or switch names. Slurm's hostlist expression parser is doing the parsing, so your node and switch names do not need to be consecutive. for example, Nodes=tux[0-3,12,18-20] and Switches=s[0-2,4-8,12] will parse just fine, slay. ✨

You can also throw in an optional link speed if you're feeling fancy.

Now the rules, and listen up:

  • All nodes in the network must be connected to at least one switch.
  • The network must be fully connected to use TopologyParam=RouteTree.
  • Jobs can only span nodes connected by the same switch fabric β€” even if there are idle nodes just vibing in other areas of the cluster. sorry babe, that's the topology βœ‹

Also!! if you've got an Infiniband switch, your topology.conf can be auto-generated with the slurmibtopology tool, found right here: <https://github.com/OleHolmNielsen/Slurm_tools/tree/master/slurmibtopology>

The overall configuration parameters available for topology/tree include:

  • SwitchName β€” the name of a switch. This name is internal to Slurm and arbitrary β€” call it whatever, she's not judging. But each switch needs a unique name. This field must be specified and cannot be longer than 64 characters. πŸ‘‘
  • Switches β€” the child switches of the named switch. (so a switch can have switch babies πŸ₯Ή)
  • Nodes β€” the child nodes of the named leaf switch. πŸƒ
  • LinkSpeed β€” an optional value specifying the performance of this communication link. The units are arbitrary and honestly this info is currently not used. it may be used in the future to optimize resource allocations, so she's just sitting there, main character in waiting πŸ’…

🧱 topology/block 🧱

The network topology configuration here: each line defines a block name and its children node names. Again, Slurm's hostlist expression parser is on the job, so node names need not be consecutive (e.g. Nodes=tux[0-3,12,18-20]). 🌈

This plugin is obsessed (affectionate) with reducing fragmentation of the cluster. It lets jobs take advantage of lower-latency connections between smaller "blocks" of nodes β€” rather than just starting jobs as fast as possible on the first available resources. it's giving thoughtful.

Here's the tea on how it works: defined blocks of nodes are paired with other contiguous blocks, which creates a higher level block of nodes. Those larger blocks can then be paired with other blocks at the same level, building bigger and bigger blocks of contiguous nodes with optimized communication between them. πŸ¦‹

The enforced block sizes are defined by BlockSizes.

The overall configuration parameters available for topology/block include:

  • BlockName β€” the name of a block. This name is internal to Slurm and arbitrary. Each block should have a unique name. This field must be specified. no skipping.
  • Nodes β€” the child nodes of the named block. 🫢
  • BlockSizes β€” a list of the planning base block size, alongside any higher-level block sizes that would be enforced. Each block must have at least the planning base block size count of nodes. And heads up: successive BlockSizes must be a power of two larger than the prior values. math is math πŸ”’

πŸ’ topology/ring πŸ’

This plugin models the cluster as one or more ordered rings of nodes. Jobs are allocated using contiguous segments of nodes in the ring β€” and yes, those segments may wrap at the end of the ring. it's a circle, bestie πŸ”„

The network topology configuration: each line defines a ring name and its child node names. Slurm's hostlist expression parser is doing the work again, so node names need not be consecutive (e.g. Nodes=tux[0-3,12,18-20]). the order of the nodes in the list defines the ring position, starting at 0. ✨

The overall configuration parameters available for topology/ring include:

  • RingName β€” the name of a ring. This name is internal to Slurm and arbitrary. Each ring should have a unique name. This field must be specified.
  • Nodes β€” an ordered list of child nodes in the ring. A maximum of 16 nodes can be specified per ring. 16. that's the limit. don't try it πŸ’€

🍩 topology/torus3d 🍩

The torus3d plugin can only be configured via topology.yaml(5). It is not supported in topology.conf. πŸ˜”

See topology.yaml(5) for configuration details β€” that's where the torus lives now.


πŸ“ EXAMPLE πŸ“

the tree vibe 🌳:

##################################################################
# Slurm's network topology configuration file for use with the
# topology/tree plugin
##################################################################
SwitchName=s0 Nodes=dev[0-5]
SwitchName=s1 Nodes=dev[6-11]
SwitchName=s2 Nodes=dev[12-17]
SwitchName=s3 Switches=s[0-2]

the block vibe 🧱:

##################################################################
# Slurm's network topology configuration file for use with the
# topology/block plugin
##################################################################
BlockName=block1 Nodes=node[1-32]
BlockName=block2 Nodes=node[33-64]
BlockName=block3 Nodes=node[65-96]
BlockName=block4 Nodes=node[97-128]
BlockSizes=30,120

the ring vibe πŸ’:

##################################################################
# Slurm's network topology configuration file for use with the
# topology/ring plugin
##################################################################
RingName=ring0 Nodes=node[01-08]
RingName=ring1 Nodes=node[09-16]

βš–οΈ COPYING βš–οΈ

Copyright (C) 2009 Lawrence Livermore National Security. Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). Copyright (C) 2010-2023 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.


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page bestie!! πŸŽ€ this one's from Slurm 26.05, filed under Slurm Configuration File β€” the topology.conf(5) era, and she ate. go configure your switches, you gorgeous nerd πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from