[erlang-questions] Garbage Collection, BEAM memory and Erlang memory
Roberto Ostinelli
roberto@REDACTED
Fri Jan 23 19:07:03 CET 2015
On Fri, Jan 23, 2015 at 6:03 PM, Lukas Larsson <garazdawi@REDACTED> wrote:
> With a recon_alloc:memory(usage, current) value of 65 - 70%, this
> difference is expected. What is happening is that the memory allocators of
> the VM is not finding any good slots to put new heaps in, so it keeps
> requesting more memory from the OS. erlang:memory reports used memory,
> which is not the same as the memory requested from the OS.
> recon_alloc:memory(allocated, current) reports something very close to what
> has actually been requested from the OS, which is why this value is much
> closer to what you see with top.
>
> It would be interesting to see if you get the same results if you start
> the VM with "+Muacul 0", or if you get better utlization if you use that.
> If you want to know what it is that you are disabling you can read this:
> https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/CarrierMigration.md
> .
>
> Lukas
>
Thank you Lukas I will try this option.
I have an update though, which is interesting. I am using lager as the
logger, and in the logger I was printing out the body of the original
request that I received. Since the requests are short lived (and the
processes die after the logging), I imagined that the data would be freed.
Instead, it looks like for some reason it is not.
I have disabled the logging and the BEAM size usage is much more stable
(even though it periodically goes through the forced GC that I've set up
when thresholds are hit).
I'll keep you posted on the "+Muacul 0" option.
Thanks,
r.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150123/d7e7ccc6/attachment.htm>
More information about the erlang-questions
mailing list