[erlang-questions] Garbage Collection, BEAM memory and Erlang memory
Roberto Ostinelli
roberto@REDACTED
Fri Jan 23 13:30:08 CET 2015
Thank you Mahesh.
I even have a fullsweep_after 0 in the router process, even though it is
literally never touching the data: the router API will lookup an element in
a router ETS table, and will immediately send the data to that process -
without being sent to the router itself.
The swapping seems an interesting option and has also been suggested here
above. Not sure how easily it can be done.
On Fri, Jan 23, 2015 at 10:09 AM, Mahesh Paolini-Subramanya <
mahesh@REDACTED> wrote:
> In our case, a key insight is something Robert mentioned earlier.
> To paraphrase it, "Your memory is not going to be reclaimed till *every*
> process that touched it has either been GC'd, or sleeps with the fishes".
> And our code had a few router processes that, quite literally, did nothing
> but pass binaries on from point A to point B - no reason to worry about
> *those* right? (hint: wrong)
>
> In the short run, walking the process chain and doing full-sweeps on
> *every* process that might (!!!) touch the binary. (we did that)
> In the longer run, see if you can swap out the routing processes with
> versions that respawn themselves in some form or the other (we did that
> too. eventually. was harder)
>
> Cheers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150123/9add1a8c/attachment.htm>
More information about the erlang-questions
mailing list