mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:29:24 +08:00
modules.services.slurm: limit ram usage, record more info
This commit is contained in:
@@ -134,6 +134,10 @@ inputs:
|
||||
|
||||
# omit --mpi=pmix
|
||||
MpiDefault=pmix
|
||||
|
||||
# record more info
|
||||
JobAcctGatherType=jobacct_gather/cgroup
|
||||
AccountingStorageTRES=gres/gpu
|
||||
'';
|
||||
extraConfigPaths =
|
||||
let gpus = slurm.node.${inputs.config.nixos.model.hostname}.gpus or null;
|
||||
@@ -144,6 +148,14 @@ inputs:
|
||||
(inputs.localLib.attrsToList gpus));
|
||||
in [(inputs.pkgs.writeTextDir "gres.conf" "AutoDetect=nvml\n${gpuString}")]
|
||||
);
|
||||
extraCgroupConfig =
|
||||
''
|
||||
ConstrainCores=yes
|
||||
ConstrainDevices=yes
|
||||
ConstrainRAMSpace=yes
|
||||
ConstrainSwapSpace=yes
|
||||
AllowedSwapSpace=20
|
||||
'';
|
||||
};
|
||||
munge = { enable = true; password = inputs.config.sops.secrets."munge.key".path; };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user