<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=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-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.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi All<o:p></o:p></p>
<p class="MsoNormal">I am trying to match output from malloc_stats with output from top and also trying to figure out total process virtual memory usage from stats.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What fields in the stats should be added to get the total virtual memory for my process ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Also is this link an accurate measurement of fragmentation for my process?<o:p></o:p></p>
<p class="MsoNormal"><a href="http://jemalloc.net/mailman/jemalloc-discuss/2014-April/000766.html">http://jemalloc.net/mailman/jemalloc-discuss/2014-April/000766.html</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">from the link it seems active should be less than allocated, but I see otherwise. Is there a documentation somewhere to decipher this interesting output from jemalloc stats ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">CPUs: 2<o:p></o:p></p>
<p class="MsoNormal">Arenas: 8<o:p></o:p></p>
<p class="MsoNormal">Pointer size: 4<o:p></o:p></p>
<p class="MsoNormal">Quantum size: 16<o:p></o:p></p>
<p class="MsoNormal">Page size: 4096<o:p></o:p></p>
<p class="MsoNormal">Min active:dirty page ratio per arena: 8:1<o:p></o:p></p>
<p class="MsoNormal">Maximum thread-cached size class: 32768<o:p></o:p></p>
<p class="MsoNormal">Chunk size: 4194304 (2^22)<o:p></o:p></p>
<p class="MsoNormal">Allocated: 251363184, active: 270594048, mapped: 415236096<o:p></o:p></p>
<p class="MsoNormal">Current active ceiling: 1488977920<o:p></o:p></p>
<p class="MsoNormal">chunks: nchunks highchunks curchunks<o:p></o:p></p>
<p class="MsoNormal"> 100 99 99<o:p></o:p></p>
<p class="MsoNormal">huge: nmalloc ndalloc allocated<o:p></o:p></p>
<p class="MsoNormal"> 0 0 0<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Merged arenas stats:<o:p></o:p></p>
<p class="MsoNormal">assigned threads: 21<o:p></o:p></p>
<p class="MsoNormal">dss allocation precedence: N/A<o:p></o:p></p>
<p class="MsoNormal">dirty pages: 66063:6587 active:dirty, 295 sweeps, 7009 madvises, 94136 purged<o:p></o:p></p>
<p class="MsoNormal"> allocated nmalloc ndalloc nrequests<o:p></o:p></p>
<p class="MsoNormal">small: 176254832 8893481 6427006 22584955<o:p></o:p></p>
<p class="MsoNormal">large: 75108352 4791 2711 8062<o:p></o:p></p>
<p class="MsoNormal">total: 251363184 8898272 6429717 22593017<o:p></o:p></p>
<p class="MsoNormal">active: 270594048<o:p></o:p></p>
<p class="MsoNormal">mapped: 411041792<o:p></o:p></p>
</div>
</body>
</html>