<div dir="ltr">Hello,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 25, 2014 at 8:37 PM, Viacheslav V. Kovalev <span dir="ltr"><<a href="mailto:kovyl2404@gmail.com" target="_blank">kovyl2404@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I've noticed, that heap of processes in dockerized nodes are hogging up to 3 times much more RAM, than<br>
heaps in non-dockerized nodes with identical load. I suspect that garbage collection in non-dockerized nodes is more aggressive.<br></blockquote><div><br></div><div>How did you measure that the heap of the processes was three times larger? erlang:memory(processes)?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Unfortunately, I don't have any garbage collection statistics, but I wanna obtain it ASAP.<br>
<br>
To give more information, I should say that we are using HiPE R17.1 on ubuntu 14.04 with stock kernel. In both schemes we are<br>
running 8 schedulers per node, and using default `fullsweep_after` flag.<br>
<br>
My blind suggestion is that erlang default garbage collection relies (somehow) on /proc/meminfo (which is not actual in dockerized environment).</blockquote><div><br></div><div>The garbage collector does very little to react to the environment it is in, so this setting should not influence how it works. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I am not C-guy and not familar with emulator internals, so could someone point me to places in erlang sources that are responsible for garbage collection<br>
and some emulator options which I can use to tweak this behavior?</blockquote><div><br></div><div>The garbage collector is not very tweakable at all in Erlang. The only settings you can play with is min_heap_size and fullsweep_after. However, as Dmitry mentions, the erlang memory allocators do have a load of options that can be tweaked, and depending on what the root cause of the memory issue is, changing them could be effective. </div><div><br></div><div>For more info about how the memory allocators work and what you can do to change their setting see the links Dmitry posted, and also I would recommend reading what Fred Hebert has written about them here <a href="https://blog.heroku.com/archives/2013/11/7/logplex-down-the-rabbit-hole">https://blog.heroku.com/archives/2013/11/7/logplex-down-the-rabbit-hole</a> and here <a href="http://ferd.github.io/recon/">http://ferd.github.io/recon/</a>.</div><div><br></div><div>Lukas</div><div><br></div></div></div></div>