Who is most garbage collected?

Lukas Larsson lukas@REDACTED
Thu Oct 14 08:33:28 CEST 2021


Hello!

On Wed, Oct 13, 2021 at 8:35 PM Alexander Petrovsky <askjuise@REDACTED>
wrote:

> Hello!
>
> I wonder, what is the best way to find out the "culprit" of GC:
>
> > msacc:start(1000), msacc:print().
>         Thread      aux check_io emulator       gc    other     port
> sleep
> ...
>  scheduler( 1)    1.68%    1.12%   55.34%    9.05%    3.44%   13.91%
>  15.45%
>  scheduler( 2)    1.53%    1.13%   55.17%    9.94%    4.76%    9.59%
>  17.88%
>  scheduler( 3)    1.64%    1.21%   58.12%   10.88%    3.45%    8.93%
>  15.78%
>  scheduler( 4)    1.61%    1.29%   57.22%   11.80%    3.97%    8.42%
>  15.69%
> ...
>
> Using erlang:trace ang catch garbage_collection events?


I would trace on garbage_collection events. By diffing the time from the
gc_start to gc_end events it should give you a good idea of which processes
it is that are doing the GC.

Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20211014/ac7802ed/attachment.htm>


More information about the erlang-questions mailing list