<div dir="ltr">Hello Frank,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 15, 2017 at 12:03 AM, Frank Muller <span dir="ltr"><<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>I would appreciate if the OTP team can teach us how to debug VM's mem issues, and  how pick the right allocator.</div></blockquote><div><br></div><div>The right allocator is the default allocator. It is only in very rare circumstances that you would want to change it. Sure you can optimize them to be more perfect, but in most cases the defaults are great.</div><div><br></div><div>If you suspect that you have issues that tuning erts_alloc will solve the best starting points is to read and understand Fred Hebert's excellent blogs/manuals about using erts_alloc to combat memory fragmentation. I cannot stress enough how great a resource his blog post (<a href="https://blog.heroku.com/logplex-down-the-rabbit-hole">https://blog.heroku.com/logplex-down-the-rabbit-hole</a>) and manual (<a href="https://www.erlang-in-anger.com/">https://www.erlang-in-anger.com/</a>) are. </div><div><br></div><div>Then you may also want to watch mine and Rickard Green's/Patrik Nyblom's talks on the subject, they basically cover the same things that Fred covers, but some parts in greater detail. There is also some internal documentation in <a href="https://github.com/erlang/otp/tree/master/erts/emulator/internal_doc">https://github.com/erlang/otp/tree/master/erts/emulator/internal_doc</a> that explain some of the features that you can tune in erts_alloc. There are also quite a few mail conversations on this mailing list about these types of problems.</div><div><br></div><div>When it comes to allocator tuning there is no magic formula. We attempted to build something that automatically tuned the settings in the instrument module (<a href="http://erlang.org/doc/man/instrument.html">http://erlang.org/doc/man/instrument.html</a>), but it didn't turn out very useful. The problems that to pop up with erts_alloc seem to be very different in both symptoms and solutions. </div><div><br></div><div>If you explain what it is that you have issues with (backing the claims with recon_alloc statistics) and what solutions you have tried then we'll very likely answer.<br></div><div><br></div><div>Lukas</div></div></div></div>