<div dir="ltr"><div>Alexandre,  you have made a very good point here.  <span lang="EN-US">"Oftentimes users only input 1G as they really have no idea of the memory requirements,"</span></div><div><span lang="EN-US">At my last job we introduced cgroups.  (this was in PBSPro). We had to enforce a minumum request for memory.</span></div><div><span lang="EN-US">Users then asked us how much memory their jobs used - so that they could request an amoutn of memory next time which would let the job run to completion.</span></div><div><span lang="EN-US">We were giving users information manually regarding how much memory their jobs used.</span></div><div><span lang="EN-US"><br></span></div><div><span lang="EN-US">I realise tha tthe tools are there for users to get the information on memory usage after a job, but I really do not expec tusrs to have to figure this out.</span></div><div><span lang="EN-US">What do other sites do in this case?<br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 29 May 2018 at 12:57, PULIDO, Alexandre <span dir="ltr"><<a href="mailto:alexandre.pulido@ariane.group" target="_blank">alexandre.pulido@ariane.group</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="FR">
<div class="m_-1635612127832957102WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello John, this behavior is needed because the memory usage of the codes executed on the nodes are particularly hard to guess. Usually, when exceeded the ratio is between 1.1 and 1.3 more than expected. Sometimes much
 larger.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="m_-1635612127832957102MsoListParagraph"><u></u><span lang="EN-US"><span>A)<span style="font:7.0pt "Times New Roman"">    
</span></span></span><u></u><span lang="EN-US">Indeed there is a partition running only exclusive jobs, but a large amounts of nodes are also needed working on an nonexclusive allocation. That’s why the exact amount of available memory is required in this
 configuration. Tasks are not killed if they take more than allocated.<u></u><u></u></span></p>
<p class="m_-1635612127832957102MsoListParagraph"><u></u><span lang="EN-US"><span>B)<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span lang="EN-US">Yes currently cgroup is configured and working as expected (I believe), but as I said tasks need to grow larger.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Oftentimes users only input 1G as they really have no idea of the memory requirements, and with the high demand of HPC time a lower memory requirement is set so the job will start.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">So a job cannot be started on a node where another job would be filling up the RAM, and would start on another node.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Would this behavior cause problems in the scheduling/allocation algorithms ? The way I see it the actual free memory would be just another consumable resource.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">But the only way I can see this working is by tweaking the plugin, correct ?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you for your inputs.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De :</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> slurm-users [mailto:<a href="mailto:slurm-users-bounces@lists.schedmd.com" target="_blank">slurm-users-bounces@<wbr>lists.schedmd.com</a>]
<b>De la part de</b> John Hearns<br>
<b>Envoyé :</b> mardi 29 mai 2018 12:39<br>
<b>À :</b> Slurm User Community List<br>
<b>Objet :</b> Re: [slurm-users] Using free memory available when allocating a node to a job<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Also regarding memory, there are system tunings you can set for the behaviour of the OurOfMemory Killer and also the VM overcommit.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I have seen the VM overcommit parameters being discussed elsewhere, and generally for HPC people advise to disable overcommit<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://www.suse.com/support/kb/doc/?id=7002775" target="_blank">https://www.suse.com/support/<wbr>kb/doc/?id=7002775</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">This of course is very dependent on what your environment and applications are. Would you be able to say please what the problems you are having with memory?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On 29 May 2018 at 12:26, John Hearns <<a href="mailto:hearnsj@googlemail.com" target="_blank">hearnsj@googlemail.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Alexandre,   it would be helpful if you could say why this behaviour is desirable.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">For instance, do you have codes which need a large amount of memory and your users are seeing that these codes are crashing because other codes running on the same nodes are using memory.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I have two thoughts:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">A) enable job exclusive - ie run one job on one compute node. Then that job has all the memory.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">This is a very good way to run HPC in my experience.  Yes I know it is inefficient if there are lots of single core jobs.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">SO this depends on what your mix of jobs is.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">B) Have you considered implementing cgroups?  Then each job will be allocated memory and cpu cores.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Jobs will not be able to grow larger than their allocated cgroup limits.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I would really ask you to consider cgroups.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On 29 May 2018 at 11:34, PULIDO, Alexandre <<a href="mailto:alexandre.pulido@ariane.group" target="_blank">alexandre.pulido@ariane.group</a><wbr>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi,</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">in the cluster where I'm deploying Slurm the job allocation has to be based on the actual free memory available on the node, not just the allocated by Slurm.
 This is nonnegotiable and I understand that it's not how Slurm is designed to work, but I'm trying anyway.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Among the solutions that I'm envisaging:</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">1) Create and update periodically a numerical node feature, with a string and a special character separating the wanted value (memfree_2048). This definitely
 seems like a mess to implement and too hacky, but is there an equivalent to PBS' numerical complexes and sensors in Slurm?</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">2) Modifying the select cons_res pluging to compare against the actual free memory instead of the allocated memory. Is it as simple as editing the "_add_job_to_res"
 (<a href="https://github.com/SchedMD/slurm/blob/master/src/plugins/select/cons_res/select_cons_res.c#L816" target="_blank">https://github.com/SchedMD/<wbr>slurm/blob/master/src/plugins/<wbr>select/cons_res/select_cons_<wbr>res.c#L816</a>) function and using the real left
 memory ? I don't want to break anything else so that's my main question here, if you can guide me towards the solution or other thoughts on its feasibility.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Thanks a lot in advance!</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<table class="m_-1635612127832957102MsoNormalTable" style="width:423.75pt" width="565" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal">Best regards,<u></u><u></u></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm" valign="top"></td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"> <u></u><u></u></p>
<table class="m_-1635612127832957102MsoNormalTable" style="width:423.75pt" width="565" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<table class="m_-1635612127832957102MsoNormalTable" style="width:423.75pt" width="565" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="width:33.75pt;padding:0cm 0cm 0cm 0cm" width="45">
<p class="MsoNormal"><span style="color:#1f497d"><img id="m_-1635612127832957102m_-299635788708544835m_6621646543627534914Image_x0020_13" src="cid:image001.png@01D3F74C.9442FE70" alt="px" width="55" height="1" border="0"></span><u></u><u></u></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm" valign="top">
<table class="m_-1635612127832957102MsoNormalTable" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr style="height:4.5pt">
<td style="width:174.8pt;padding:0cm 0cm 0cm 0cm;height:4.5pt" width="233">
<p class="MsoNormal" style="line-height:4.5pt">
<span style="font-size:1.0pt;color:#1f497d"><img id="m_-1635612127832957102m_-299635788708544835m_6621646543627534914Image_x0020_12" src="cid:image002.png@01D3F74C.9442FE70" alt="px" width="1" height="6" border="0"></span><u></u><u></u></p>
</td>
</tr>
<tr>
<td style="width:174.8pt;padding:0cm 0cm 0cm 0cm" width="233">
<p class="MsoNormal" style="line-height:12.0pt">
<b><span style="font-size:10.5pt;font-family:"Arial","sans-serif";color:#2d3a44" lang="EN-US">Alexandre PULIDO</span></b><u></u><u></u></p>
</td>
</tr>
<tr style="height:15.0pt">
<td style="width:174.8pt;padding:0cm 0cm 0cm 0cm;height:15.0pt" width="233">
<p class="MsoNormal"><span style="font-size:1.0pt;color:#1f497d"><img id="m_-1635612127832957102m_-299635788708544835m_6621646543627534914Image_x0020_11" src="cid:image003.png@01D3F74C.9442FE70" alt="px" width="1" height="20" border="0"></span><u></u><u></u></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm" valign="top">
<p class="MsoNormal"><span style="color:#1f497d"><img id="m_-1635612127832957102m_-299635788708544835m_6621646543627534914Image_x0020_10" src="cid:image004.jpg@01D3F74C.9442FE70" alt="arianegroup" width="170" height="29" border="0"></span><u></u><u></u></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<table class="m_-1635612127832957102MsoNormalTable" style="width:446.05pt" width="595" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="width:42.5pt;padding:0cm 0cm 0cm 0cm" width="57">
<p class="MsoNormal"><span style="color:#1f497d"><img id="m_-1635612127832957102m_-299635788708544835m_6621646543627534914Image_x0020_9" src="cid:image001.png@01D3F74C.9442FE70" alt="px" width="55" height="1" border="0"></span><u></u><u></u></p>
</td>
<td style="width:403.55pt;padding:0cm 0cm 0cm 0cm" width="538" valign="top">
<table class="m_-1635612127832957102MsoNormalTable" style="width:405.35pt" width="540" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr style="height:9.0pt">
<td style="width:405.35pt;padding:0cm 0cm 0cm 0cm;height:9.0pt" width="540">
<p class="MsoNormal" style="line-height:9.0pt">
<span style="font-size:1.0pt;color:#1f497d"><img id="m_-1635612127832957102m_-299635788708544835m_6621646543627534914Image_x0020_8" src="cid:image005.png@01D3F74C.9442FE70" alt="px" width="1" height="12" border="0"></span><u></u><u></u></p>
</td>
</tr>
<tr style="height:4.0pt">
<td style="width:405.35pt;padding:0cm 0cm 0cm 0cm;height:4.0pt" width="540">
<p class="MsoNormal" style="line-height:4.0pt">
<span style="font-size:1.0pt;color:#1f497d"><img id="m_-1635612127832957102m_-299635788708544835m_6621646543627534914Image_x0020_1" src="cid:image003.png@01D3F74C.9442FE70" alt="px" width="1" height="20" border="0"></span><u></u><u></u></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<p class="MsoNormal">Ce courriel (incluant ses éventuelles pièces jointes) peut contenir des informations confidentielles et/ou protégées ou dont la diffusion est restreinte ou soumise aux règlementations relatives au contrôle des exportations ou ayant un caractère
 privé. Si vous avez reçu ce courriel par erreur, vous ne devez ni le reproduire, ni l'utiliser, ni en divulguer le contenu à quiconque. Merci d'en avertir immédiatement l'expéditeur et de supprimer de votre système informatique ce courriel ainsi que tous les
 documents qui y sont attachés. Toute exportation ou réexportation non autorisée est interdite. ArianeGroup SAS décline toute responsabilité en cas de corruption par virus, d'altération ou de falsification de ce courriel lors de sa transmission par voie électronique.
 This email (including any attachments) may contain confidential or proprietary and/or privileged information or information otherwise protected from disclosure or may be subject to export control laws and regulations. If you are not the intended recipient,
 please notify the sender immediately, do not reproduce this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Unauthorized export or re-export is
 prohibited. ArianeGroup SAS disclaims any and all liability if this email transmission was virus corrupted, altered or falsified. ArianeGroup SAS (519 032 247 RCS PARIS) - Capital social : 265 904 408 EUR - Siège social : Tour Cristal,
<a href="https://maps.google.com/?q=7-11+Quai+Andr%C3%A9+Citro%C3%ABn,+75015+Paris&entry=gmail&source=g" target="_blank">
7-11 Quai André Citroën, 75015 Paris</a> - TVA FR 82 519 032 247 - APE/NAF 3030Z <u></u>
<u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div><div><div class="h5">
Ce courriel (incluant ses éventuelles pièces jointes) peut contenir des informations confidentielles et/ou protégées ou dont la diffusion est restreinte ou soumise aux règlementations relatives au contrôle des exportations ou ayant un caractère privé. Si vous avez reçu ce courriel par erreur, vous ne devez ni le reproduire, ni l'utiliser, ni en divulguer le contenu à quiconque. Merci d'en avertir immédiatement l'expéditeur et de supprimer de votre système informatique ce courriel ainsi que tous les documents qui y sont attachés. Toute exportation ou réexportation non autorisée est interdite. ArianeGroup SAS décline toute responsabilité en cas de corruption par virus, d'altération ou de falsification de ce courriel lors de sa transmission par voie électronique.
This email (including any attachments) may contain confidential or proprietary and/or privileged information or information otherwise protected from disclosure or may be subject to export control laws and regulations. If you are not the intended recipient, please notify the sender immediately, do not reproduce this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Unauthorized export or re-export is prohibited. ArianeGroup SAS disclaims any and all liability if this email transmission was virus corrupted, altered or falsified. ArianeGroup SAS (519 032 247 RCS PARIS) - Capital social : 265 904 408 EUR - Siège social : Tour Cristal, <a href="https://maps.google.com/?q=7-11+Quai+Andr%C3%A9+Citro%C3%ABn,+75015+Paris&entry=gmail&source=g">7-11 Quai André Citroën, 75015 Paris</a> - TVA FR 82 519 032 247 - APE/NAF 3030Z
</div></div></div>

</blockquote></div><br></div>