[erlang-questions] Memory growing
Thu Feb 7 17:21:45 CET 2013
Can you kill the VM with a SIGUSR1 and look at the resulting crash dump?
Start an Erlang shell, start crashdump viewer and poke around:
> Date: Thu, 7 Feb 2013 08:08:58 -0800
> Subject: Re: [erlang-questions] Memory growing
> I've tested NIFs from lists module and they seem to be fine.
> So, coming back to square one, how can I debug what is allocated in the
> "system" section of erlang:memory/0 ?
> On Saturday, February 2, 2013 10:52:04 PM UTC+2, Alex P wrote:
> If somebody could help me with an issue, I would be grateful. I'm
> pulling my hair off trying to figure out why an erlang app keeps
> growing in memory usage. The erlang:memory() after 3 days shows this:
> The interesting part is "system" section. All other data is fine
> (processes goes to few MBs during the night as all the started procs
> are either hibernated - for long running or they die because of
> There are two issues here:
> - "system" keeps growing (around 800MB/week)
> - OS (Linux) shows a significantly different amount of memory usage
> (almost 2x, 610MB resident in this case)
> The only case where I've managed to make "system" grow is by calling
> erlang:monitor() multiple times. It grows with ~13K/call.
> Erlang release used is R15B03.
> The questions are:
> - is there any hidden function to inspect all the active process
> monitors? (as the single place where I use erlang:monitor looks fine.
> The spawned kid does its job and dies, so the ref should be garbage
> - is there any way to inspect "system" section and find out what it
> contains? Looking at memory chunks in process map got me nowhere
> Thank you,
> _______________________________________________ erlang-questions
> mailing list
More information about the erlang-questions