<div dir="ltr"><div>My immediate intuition if you have a 4GB carrier: my goodness, what are you doing to the poor VM to get that? Putting a BluRay disc in memory?<br><br></div>I'd definitely try to figure out why that happens, because my intuition has all alarms ringing.<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, May 4, 2018 at 10:16 AM Florian Odronitz <<a href="mailto:florian.odronitz@wooga.net">florian.odronitz@wooga.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br><blockquote type="cite"><div>On 3. May 2018, at 09:38, John Högberg <<a href="mailto:john.hogberg@ericsson.com" target="_blank">john.hogberg@ericsson.com</a>> wrote:</div><br class="m_795782242025666230Apple-interchange-newline"><div><div>On Wed, May 02, 2018 at 07:08:34PM +0200, Florian Odronitz wrote:<br><blockquote type="cite">When I log into the node I see erlang:memory() reporting 14,6 GB of<br>memory basically all attributed to "system".<br>Digging deeper recon_alloc:memory(allocated_types) finds that<br>basically all the memory is allocated by "driver_alloc".<br></blockquote><br>If you can try out OTP 21-rc1, the new memory instrumentation features<br>will help you find the culprit:<br><br><a href="http://blog.erlang.org/Memory-instrumentation-in-OTP-21/" target="_blank">http://blog.erlang.org/Memory-instrumentation-in-OTP-21/</a><br></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div>"Those who have used <code class="m_795782242025666230highlighter-rouge">erlang:memory()</code> are probably familiar with how annoyingly
general the <code class="m_795782242025666230highlighter-rouge">system</code> category can be. It’s possible to get a bit more
information by using <code class="m_795782242025666230highlighter-rouge">erlang:system_info({allocator, Alloc})</code> but the most it
will do is tell you that it’s (say) <code class="m_795782242025666230highlighter-rouge">driver_alloc</code> that eats all that memory
and leave you with no clue which one."</div><br>Thats my situation, exactly! Once Elixir is compatible, I will run one node under OTP 21 and then see if I can get some insight.</div><div><br></div><div>Thanks for helping</div><div>Florian</div><div><br></div><div><br></div><div>PS: In the meanwhile I also looked at memory fragmentation using recon_alloc:fragmentation(current).</div><div>I found some impressive carriers (>4GB) but they seem to have very good usage.</div><div><div><br></div><div>[{{:driver_alloc, 1},</div><div> [sbcs_usage: 1.0, mbcs_usage: 0.9999680067349549, sbcs_block_size: 0,</div><div> sbcs_carriers_size: 0, mbcs_block_size: 4937881312,</div><div> mbcs_carriers_size: 4938039296]},</div><div> {{:driver_alloc, 2},</div><div> [sbcs_usage: 1.0, mbcs_usage: 0.9998221050872671, sbcs_block_size: 0,</div><div> sbcs_carriers_size: 0, mbcs_block_size: 4819741224,</div><div> mbcs_carriers_size: 4820598784]},</div><div> {{:driver_alloc, 3},</div><div> [sbcs_usage: 1.0, mbcs_usage: 0.9999122383844911, sbcs_block_size: 0,</div><div> sbcs_carriers_size: 0, mbcs_block_size: 3822018976,</div><div> mbcs_carriers_size: 3822354432]},</div><div> {{:driver_alloc, 4},</div><div> [sbcs_usage: 1.0, mbcs_usage: 0.9967773040787262, sbcs_block_size: 0,</div><div> sbcs_carriers_size: 0, mbcs_block_size: 1326648648,</div><div> mbcs_carriers_size: 1330937856]},</div><div> {{:driver_alloc, 5},</div><div> [sbcs_usage: 1.0, mbcs_usage: 0.9775849991437053, sbcs_block_size: 0,</div><div> sbcs_carriers_size: 0, mbcs_block_size: 210428096,</div><div> mbcs_carriers_size: 215252992]},</div><div> {{:ll_alloc, 0},</div><div> [sbcs_usage: 1.0, mbcs_usage: 0.88204345703125, sbcs_block_size: 0,</div><div> sbcs_carriers_size: 0, mbcs_block_size: 34683360,</div><div> mbcs_carriers_size: 39321600]},</div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div> <br><blockquote type="cite"><div><div><br><blockquote type="cite">I don't fully understand what driver_alloc contains and what could<br>drive its growth.<br>Any thoughts?<br></blockquote><br>`driver_alloc` is used for general allocations in drivers and NIFs,<br>e.g. `enif_alloc()`, `erl_drv_thread_create()`, or<br>`enif_inspect_iovec()`.<br><br>Regards,<br>John Högberg<br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br></div></div></blockquote></div><br></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">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>
</blockquote></div>