[erlang-questions] Memory usage in OTP 21
Wed Aug 1 19:45:54 CEST 2018
Well, between the race condition that you spotted and removing the calls to
`process_info/2` and replacing them with calls to
`erlang:garbage_collect/0`, we've now got this working like a charm. Thank
you so much for the help!
On Wed, Aug 1, 2018 at 1:35 PM Lukas Larsson <lukas@REDACTED> wrote:
> On Wed, Aug 1, 2018 at 12:30 PM Devon Estes <devon.c.estes@REDACTED>
>> And here's a gist with an Erlang reproduction:
>> 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...
More information about the erlang-questions