[erlang-questions] "fat burner" GC on periodic base?
Thu Apr 26 11:49:14 CEST 2012
Tue, Apr 24, 2012 at 12:41:48, attila.r.nohl wrote about "Re: [erlang-questions] "fat burner" GC on periodic base?":
> > 1. Is there another way to achieve the same result, as avoiding keeping
> > useless data, on timed basics instead of reduction count, which, as
> > shown above, doesn't work enough?
> You can subscribe to "heap used by process is too large" events using
> erlang:system_monitor/2. You can also make an educated guess based on
> the code to call garbage collection at certain points in the code (for
> example we have a gen_server that uses quite some memory during
> initialization, but then it releases most of the memory, so we have an
> explicit garbage collection at the end of the init function).
Thanks, but all these are indirect measures which doesn't give the
needed one. Heap size monitoring is, as long as I got from the
documentation, per-process. I need to check the whole VM occupied size
instead. Also, explicit requests in some processes are good for the case
when 1) it's your code and 2) problem is already detected; all this
doesn't help in case e.g. of error_logger I shown earlier.
More information about the erlang-questions