限制作业 CPU 使用 SLURM
Limit job CPU usage SLURM
我们正在使用 SLURM 在共享计算机上对作业进行排队,我该如何通过请求的线程数来限制作业的线程利用率?目前它是诚实的,用户一直在滥用它来插队。
您需要在 slurm.conf
中指定一个 TaskPlugin。默认情况下,它的值为 task/none
,这意味着没有约束。
如果将其设置为 task/affinity
,Slurm 将使用 CPUSETS 将进程和线程限制为为作业分配的 CPU。
如果您将其设置为 task/cgroup
,Slurm 将使用 cgroups for that purpose. This option is much more flexible than the CPUSET option (it can put limits on virtually anything) but it requires more work to configure. See the documentation。
我们正在使用 SLURM 在共享计算机上对作业进行排队,我该如何通过请求的线程数来限制作业的线程利用率?目前它是诚实的,用户一直在滥用它来插队。
您需要在 slurm.conf
中指定一个 TaskPlugin。默认情况下,它的值为 task/none
,这意味着没有约束。
如果将其设置为 task/affinity
,Slurm 将使用 CPUSETS 将进程和线程限制为为作业分配的 CPU。
如果您将其设置为 task/cgroup
,Slurm 将使用 cgroups for that purpose. This option is much more flexible than the CPUSET option (it can put limits on virtually anything) but it requires more work to configure. See the documentation。