<div dir="ltr">Hello,<div><br></div><div>If you use recon_alloc:memory(usage) on the snapshots you have you can see you have a high usage percentage which means that you do not have any memory fragmentation issues that tweaking the erts allocators would fix. Your application is simply using a lot of memory and it seems to be process heap memory. I would recommend using observer to see which processes use a lot of memory and from there try to figure out why.</div><div><br></div><div>Lukas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 4, 2016 at 11:53 PM, Jordan Day <span dir="ltr"><<a href="mailto:jordand@companykitchen.com" target="_blank">jordand@companykitchen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I’m facing an issue with a program that is using hackney to download a number of large-ish (~8MB) JSON responses. OS-reported memory consumption is typically much larger than I’d expect (I’ve seen spikes of several GB), so I’ve spent quite a bit of time digging through the mailing list and blog posts trying to gain some insight into my problem. There have been several threads discussing the “large binary” problem, which seems like it might be what I’m facing, but a lot of the suggested remedies (lowering fullsweep_after, manually running garbage_collect/1) haven’t seemed to have much effect. After watching Lukas Larsson’s talk from EUC (<a href="https://www.youtube.com/watch?v=YuPaX11vZyI" target="_blank">https://www.youtube.com/watch?v=YuPaX11vZyI</a>), I’m wondering about tweaking allocator settings, but I’m really not sure where to start? While the problem I’m facing seems a lot like the “large binary problem”, observer is reporting that most of my memory usage is tied up in eheap_alloc (<a href="https://imgur.com/OzPLvF0" target="_blank">https://imgur.com/OzPLvF0</a>). I’ve taken some samples of the memory info over time using recon’s snapshot tool, which can be seen here:<div><a href="https://gist.github.com/jordan0day/3a127046514a5a9efb87665223e985c7" target="_blank">https://gist.github.com/jordan0day/3a127046514a5a9efb87665223e985c7</a></div><div><a href="https://gist.github.com/jordan0day/679e5cc546cdfb4b8c7431f83305b86f" target="_blank">https://gist.github.com/jordan0day/679e5cc546cdfb4b8c7431f83305b86f</a></div><div><a href="https://gist.github.com/jordan0day/b2f6e69733732f35b612ab810a330ea5" target="_blank">https://gist.github.com/jordan0day/b2f6e69733732f35b612ab810a330ea5</a></div><div><br></div><div>These samples were taken just a minute or two apart from each other, spanning about 30 requests total, so I’d expect the growth to be around 240 MB or so, but you can see by the 3rd snapshot total memory usage is around 1.3 GB.</div><div><br></div><div>Everything I’ve read so far has basically said “don’t mess with the allocator settings unless you know what you’re doing!” — and I definitely don’t know what I’m doing, but I’m really hoping to learn! I’d appreciate any guidance anyone can offer.</div><br>The information contained in this message is confidential information and privileged. It is intended only for the use of the individual or individuals or entity identified above. You are hereby notified that any dissemination, distribution, use or copying of this message is strictly prohibited.
<br><br>
If the receiver of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, use or copying of this message is strictly prohibited. If you have received this message in error, please immediately notify the sender by replying to his/her e-mail address noted above and delete the message. Thank You

  ­­  </div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>