[erlang-questions] Memory usage in OTP 21

Lukas Larsson lukas@REDACTED
Wed Aug 1 13:34:51 CEST 2018


On Wed, Aug 1, 2018 at 12:30 PM Devon Estes <devon.c.estes@REDACTED> wrote:

> And here's a gist with an Erlang reproduction:
> https://gist.github.com/devonestes/abe4dc60484e5426d4890c4494430194. When
> I run this escript as is, I see that the `recent_size` is different (which
> is only supposed to change after a GC run, right?) but no trace messages
> indicating that garbage collection took place. However, with this Erlang
> example, the `heap_block_size` and `old_heap_block_size` remain the same.
> When I bump up the size of the list I'm mapping over (ToMap) from 50 to
> 100, I see garbage collection trace messages indicating that a single minor
> collection took place.
>

I think that is because you do not synchronize the start of the tracer with
the benchmark. i.e. by the time that the tracer is started and applies the
trace the benchmark has already completed. I forked your gist and updated
it here: https://gist.github.com/garazdawi/01467ecd6b8c7bcb08ddc8f3eb03d1af.
With that change i get trace messages from three collections.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180801/ad9e4ec9/attachment.htm>


More information about the erlang-questions mailing list