<div dir="ltr"><div>Hello Tina and Hermann,</div><div><br></div><div>Thanks for your suggestions.</div><div><br></div><div>@Tina, I have SelectType=select/cons_res and SelectTypeParameters=CR_CPU_Memory in slurm.conf<br></div><div><br></div><div>I added TaskAffinity=no, MaxRAMPercent=100 and MaxSwapPercent=0 to cgroup.conf. I will see what happens.</div><div><br></div><div>Best!<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 5, 2021 at 1:33 AM Tina Friedrich <<a href="mailto:tina.friedrich@it.ox.ac.uk">tina.friedrich@it.ox.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Rodrigo,<br>
<br>
we do pretty much what you do - constrain via cgroups - and it works <br>
fine. So I know it's possible. (I don't think I've ever twiddled the <br>
VSizeFactor.)<br>
<br>
I think you also need<br>
<br>
SelectType=select/cons_res (or cons_tres)<br>
SelectTypeParameters=CR_Core_Memory<br>
<br>
in your slurm.conf; have you got that?<br>
<br>
My cgroup.conf is this:<br>
<br>
CgroupMountpoint="/sys/fs/cgroup"<br>
CgroupAutomount=yes<br>
CgroupReleaseAgentDir="/etc/slurm/cgroup"<br>
ConstrainCores=yes<br>
TaskAffinity=no<br>
ConstrainRAMSpace=yes<br>
ConstrainSwapSpace=yes<br>
ConstrainDevices=yes<br>
AllowedDevicesFile="/etc/slurm/cgroup_allowed_devices_file.conf"<br>
AllowedRamSpace=100<br>
AllowedSwapSpace=0<br>
MaxRAMPercent=100<br>
MaxSwapPercent=0<br>
MinRAMSpace=30<br>
<br>
Tina<br>
<br>
On 05/10/2021 09:15, Hermann Schwärzler wrote:<br>
> Hi Rodrigo,<br>
> <br>
> a possible solution is using<br>
> <br>
> VSizeFactor=100<br>
> <br>
> in slurm.conf.<br>
> <br>
> With this settings, programs that try to allocate more memory than <br>
> requested in the job's settings will fail.<br>
> <br>
> Be aware that this puts a limit on *virtual* memory, not on RSS. This <br>
> might or might not be what you want as a lot of programs tend to <br>
> allocate (a lot) more virtual memory than they really use (RSS).<br>
> <br>
> Regards,<br>
> Hermann<br>
> <br>
> On 10/5/21 12:46 AM, Rodrigo Santibáñez wrote:<br>
>> Hello Slurm Users,<br>
>><br>
>> I'm having a hard time configuring slurm to kill jobs when they use <br>
>> more memory than requested. Also, I can't make jobs use only RAM, and <br>
>> some of them starts to use SWAP.<br>
>><br>
>> I don't know what I'm missing.<br>
>><br>
>> Thanks for your help<br>
>><br>
>> slurmd -V<br>
>> slurm 20.02.6<br>
>><br>
>> slurm.conf<br>
>> TaskPlugin=task/affinity,task/cgroup<br>
>> ProctrackType=proctrack/cgroup<br>
>><br>
>> cgroup.conf<br>
>> AllowedRAMSpace=100.0<br>
>> AllowedSwapSpace=0.0<br>
>> ConstrainRAMSpace=yes<br>
>> ConstrainSwapSpace=yes<br>
>> MemorySwappiness=0<br>
>> CgroupAutomount=yes<br>
>> ConstrainCores=yes<br>
> <br>
<br>
-- <br>
Tina Friedrich, Advanced Research Computing Snr HPC Systems Administrator<br>
<br>
Research Computing and Support Services<br>
IT Services, University of Oxford<br>
<a href="http://www.arc.ox.ac.uk" rel="noreferrer" target="_blank">http://www.arc.ox.ac.uk</a> <a href="http://www.it.ox.ac.uk" rel="noreferrer" target="_blank">http://www.it.ox.ac.uk</a><br>
<br>
</blockquote></div>