<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I think the situation is likely to be a little different. Let’s consider a fortran program that statically or dynamically defines large
 arrays. This defines a virtual memory size – like declaring that this is the maximum amount of memory you might use if you fill the arrays. That amount of real memory + swap must be available for the program to run – after all, you might use that amount…  Speaking
 loosely, linux has a soft memory allocation policy so memory may not actually be allocated until it is used. If the program happens to read a smaller dataset and the arrays are not filled then the resident set size may be significantly smaller than the virtual
 memory size.  Further, memory swapped doesn’t count to the RSS so it might be even smaller. Effectively RSS for a process is the actual footprint in RAM. It will change over the life of the process/job and slurm will track the maximum (MaxRSS). I’d actually
 expect MaxRSS to be the maximum of the sum of RSS of known processes as sampled periodically through the job – but I’m guessing. This should apply reasonably to parallel jobs if the sum spans nodes (or it wouldn’t be the first batch system to only effectively
 account for the first allocated node). The whole linux memory tracking/accounting system has gotchas as shared memory (say for library code) has to be accounted for somewhere, but we can reasonably assume in HPC that memory use is dominated by unique computational
 working set data – so MaxRSS is a good estimate of how much RAM is needed to run a given job.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Gareth<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> slurm-users [mailto:slurm-users-bounces@lists.schedmd.com]
<b>On Behalf Of </b>E.S. Rosenberg<br>
<b>Sent:</b> Tuesday, 17 April 2018 10:42 PM<br>
<b>To:</b> Slurm User Community List <slurm-users@lists.schedmd.com><br>
<b>Subject:</b> Re: [slurm-users] Way MaxRSS should be interpreted<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hi Loris,<o:p></o:p></p>
</div>
<p class="MsoNormal">Thanks for your explanation!<o:p></o:p></p>
</div>
<p class="MsoNormal">I would have interpreted as max(sum()).<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Is there a way to get max(sum()) or at least sum form of sum()? The assumption that all processes are peaking at the same value is not a valid one unless all threads have essentially the same workload...<o:p></o:p></p>
</div>
<p class="MsoNormal">Thanks again!<o:p></o:p></p>
</div>
<p class="MsoNormal">Eli<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Apr 17, 2018 at 2:09 PM, Loris Bennett <<a href="mailto:loris.bennett@fu-berlin.de" target="_blank">loris.bennett@fu-berlin.de</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Eli,<br>
<br>
"E.S. Rosenberg" <<a href="mailto:esr%2Bslurm-dev@mail.hebrew.edu">esr+slurm-dev@mail.hebrew.edu</a>> writes:<br>
<br>
> Hi fellow slurm users,<br>
> We have been struggling for a while with understanding how MaxRSS is reported.<br>
><br>
> This because jobs often die with MaxRSS not even approaching 10% of the requested memory sometimes.<br>
><br>
> I just found the following document:<br>
> <a href="https://research.csc.fi/-/a" target="_blank">https://research.csc.fi/-/a</a><br>
><br>
> It says:<br>
> "maxrss = maximum amount of memory used at any time by any process in that job. This applies directly for serial jobs. For parallel jobs you need to multiply with the number of cores (max 16 or 24 as this is<br>
> reported only for that node that used the most memory)"<br>
><br>
> While 'man sacct' says:<br>
> "Maximum resident set size of all tasks in job."<br>
><br>
> Which explanation is correct? How should I be interpreting MaxRSS?<br>
<br>
As far as I can tell, both explanations are correct, but the<br>
text in 'man acct' is confusing.<br>
<br>
  "Maximum resident set size of all tasks in job."<br>
<br>
is analogous to<br>
<br>
  "maximum height of all people in the room"<br>
<br>
rather than <br>
<br>
  "total height of all people in the room"<br>
<br>
More specifically it means<br>
<br>
  "Maximum individual resident set size out of the group of resident set<br>
  sizes associated with all tasks in job."<br>
<br>
It doesn't mean<br>
<br>
  "Sum of the resident set sizes of all the tasks"<br>
<br>
I'm a native English-speaker and I keep on stumbling over this in 'man<br>
sacct' and then remembering that I have already worked out how it was<br>
supposed to be interpreted.<br>
<br>
My suggestion for improving this would be<br>
<br>
  "Maximum individual resident set size of all resident set sizes<br>
  associated with the tasks in job."<br>
<br>
It's a little clunky, but I hope it is clearer.<br>
<br>
Cheers,<br>
<br>
Loris<br>
<span style="color:#888888"><br>
<span class="hoenzb">-- </span><br>
<span class="hoenzb">Dr. Loris Bennett (Mr.)</span><br>
<span class="hoenzb">ZEDAT, Freie Universität Berlin         Email <a href="mailto:loris.bennett@fu-berlin.de">
loris.bennett@fu-berlin.de</a></span></span><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>