<html><body>

<p>Hi everyone, </p>
<p>We also found out, that replacing the system allocator for collect with jemalloc or tcmalloc significantly improves the enduring memory footprint. </p>
<p>We suffer from a problem called 'heap fragmentation' here to wich the glibc's allocation algorith is vulnerable.</p>
<p>It will reserve chunks of memory from the system; and rent it to parts of the process. Once such a block is full, a new blog will be reserved.</p>
<p>However, only the very latest block will be used to rent out memory to the application. So, if you have a single byte valid allocated for a longer time in such a memory block, it will remain 'forever yours'.</p>
<blockquote>
<div class="message_header"><span>Mon Dec 14 2015 14:09:35 EST</span> <span>from "Vaughn Wernersbach" <Vaughn.Wernersbach@bidstrading.com> </span> <span class="message_subject">Subject: Re: [collectd] Preventing collectd high memory usage</span></div>
<div class="message_content">
<table lang="EN-US" width="100%">
<tbody>
<tr>
<td>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;">Hi André Luiz da Silva!  Thanks for the suggestion.  I’ll keep switching to UDP in mind, though I’m inclined to stick with TCP if at all possible (largely to minimize the required changes to my environment).</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;">All - Anyone have info on using CollectInternalStats?  Still need to know what value to set WriteQueueLimitHigh to and having collectd tell me definitely seems like the best bet.</span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"> </span></p>
<p class="MsoNormal"><strong><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: gray; mso-fareast-language: EN-CA;">Vaughn Wernersbach</span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: gray; mso-fareast-language: EN-CA;">BIDS Trading, L.P.</span></strong></p>
<p class="MsoNormal" style="margin-left: .5in;"><span style="color: #1f497d; mso-fareast-language: EN-CA;"> </span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: gray; mso-fareast-language: EN-CA;">111 Broadway, Suite 1603 | New York, NY 10006</span></p>
<p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: gray; mso-fareast-language: EN-CA;" lang="IT">T: 212.618.2071 |  F: 212.618.2031  |  C: 732.397.8344  | E: </span><a href="https://mce_host/display_enter?force_room=_MAIL_?recp=vaughn.wernersbach@bidstrading.com"><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: #0563c1; mso-fareast-language: EN-CA;" lang="IT">vaughn.wernersbach@bidstrading.com</span></a></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"> </span></p>
<p class="MsoNormal"><strong><span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif;">From:</span></strong><span style="font-size: 11.0pt; font-family: 'Calibri',sans-serif;"> André Luiz da Silva [mailto:andresilvaluiz1@gmail.com] <br /> <strong>Sent:</strong> Monday, December 14, 2015 11:18 AM<br /> <strong>To:</strong> Vaughn Wernersbach <Vaughn.Wernersbach@bidstrading.com><br /> <strong>Cc:</strong> collectd@verplant.org<br /> <strong>Subject:</strong> Re: [collectd] Preventing collectd high memory usage</span></p>
<p class="MsoNormal"> </p>
<div>
<p>Hi, Wenersbach! Did you try to send your metrics over UDP instead of TCP? It's just a suggestion if you have a reliable network.</p>
<p> </p>
<p>Regards.</p>
<p> </p>
<p>Em 14/12/2015 1:54 PM, "Vaughn Wernersbach" <<a href="https://mce_host/display_enter?force_room=_MAIL_?recp=Vaughn.Wernersbach@bidstrading.com" target="_blank">Vaughn.Wernersbach@bidstrading.com</a>> escreveu:</p>
<div>
<blockquote style="border: none; border-left: solid #CCCCCC 1.0pt; padding: 0in 0in 0in 6.0pt; margin-left: 4.8pt; margin-top: 5.0pt; margin-right: 0in; margin-bottom: 5.0pt;">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">Hi,</p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> </p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">In order to limit high memory usage (one of my servers hit 94% for collectd) I’m interested in enabling the <a href="https://collectd.org/documentation/manpages/collectd.conf.5.shtml#writequeuelimithigh_highnum" target="_blank"> WriteQueueLimitHigh</a> option, but I don’t know what value to use.  The docs suggest enabling <a href="https://collectd.org/documentation/manpages/collectd.conf.5.shtml#collectinternalstats_false_true" target="_blank"> CollectInternalStats</a>, and that the “write_queue” plugin instance reports the info from CollectInternalStats that I’m looking for.  However, I don’t see any “write_queue” plugin nor do I see anything relevant being written by my existing write plugins (syslog and graphite) after enabling CollectInternalStats.</p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> </p>
<p><span style="font-family: Symbol;">·</span><span style="font-size: 7.0pt;">         </span>How do I obtain data written collected when setting CollectInternalStats to true?</p>
<p><span style="font-family: Symbol;">·</span><span style="font-size: 7.0pt;">         </span>Alternately, are there any guidelines for setting the values of WriteQueueLimitHigh?</p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> </p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> </p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> </p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><strong><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: gray;">Vaughn Wernersbach</span></strong></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><strong><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: gray;">BIDS Trading, L.P.</span></strong></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; margin-left: .5in;"> </p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: gray;">111 Broadway, Suite 1603 | New York, NY 10006</span></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: gray;" lang="IT">T: 212.618.2071 |  F: 212.618.2031  |  C: 732.397.8344  | E: </span><a href="https://mce_host/display_enter?force_room=_MAIL_?recp=vaughn.wernersbach@bidstrading.com" target="_blank"><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: #0563c1;" lang="IT">vaughn.wernersbach@bidstrading.com</span></a></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> </p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom: 12.0pt;"><br /> _______________________________________________<br /> collectd mailing list<br /> <a href="https://mce_host/display_enter?force_room=_MAIL_?recp=collectd@verplant.org" target="_blank">collectd@verplant.org</a><br /> <a href="http://mailman.verplant.org/listinfo/collectd" target="_blank">http://mailman.verplant.org/listinfo/collectd</a></p>
</blockquote>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<br /><br />
<div class="display_inline_attachment"><img src="display_mime_icon?type=" alt="" align="middle" border="0" /> (, 0 bytes) [<a href="javascript:ToggleVisibility('ATTCH_ID_')">View</a>| <a href="mimepart_download/0/">Download</a>]<br />
<div id="ATTCH_ID_" class="display_inline_attachment_body" style="display: none;"> </div>
</div>
</div>
</blockquote>
<p> </p>
</body></html>