Skip to content

Commit

Permalink
feat(slurmctld, slurmd): make slurm respect memory constraints on com…
Browse files Browse the repository at this point in the history
…pute nodes

* enhancement(slurmctld): enforce job level memory

These changes introduce default values for SelectTypeParameters
and MemSpecLimit.

`SelectTypeParameters=CR_CPU_Memory` to enable memory allocation
enforcement.

`MemSpecLimit=1024` to ensure systems always have 1G available
memory that jobs cannot consume.
---------

Co-authored-by: Jason Nucciarone <[email protected]>
  • Loading branch information
jamesbeedy and NucciTheBoss authored Nov 25, 2024
1 parent 70657d6 commit 46b4f17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions charms/slurmctld/src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"PluginDir": ["/usr/lib/x86_64-linux-gnu/slurm-wlm"],
"PlugStackConfig": "/etc/slurm/plugstack.conf.d/plugstack.conf",
"SelectType": "select/cons_tres",
"SelectTypeParameters": "CR_CPU_Memory",
"SlurmctldPort": "6817",
"SlurmdPort": "6818",
"StateSaveLocation": "/var/lib/slurm/checkpoint",
Expand Down
1 change: 1 addition & 0 deletions charms/slurmd/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def get_node(self) -> Dict[Any, Any]:
node = {
"node_parameters": {
**machine.get_slurmd_info(),
"MemSpecLimit": "1024",
**self._user_supplied_node_parameters,
},
"new_node": self._new_node,
Expand Down

0 comments on commit 46b4f17

Please sign in to comment.