Unaccounted memory usage...
Mon Mar 10 11:14:34 CET 2003
Can someone help me explain this a little? My beam process is currently at
a little over 200 MB resident heap size. I have approx 1700 processes running
in the node. Only 19 are registered. This is R9B-0, 32 bit (Linux). I'm not
running distributed, so no epmd, no connected nodes.
i() in the shell reports I'm using 2430190 words heap, 19828 words stack, for
a total of 2,450,018 = 9.57 MB.
ets:i() reports 16 tables are allocated. Most of them aren't interesting, as
they are the standard erts/OTP tables, and aren't of an obscene size. The
7 application tables report a total memory usage of 234,183 words = 915 KB.
Thus I figure my total application memory usage at about 11 MB. Yet I
have a 200 MB heap size.
Clearly with only 200 MB of actual process heap, we don't have 1.1 GB
currently free, but have made 1.1 GB of junk overall. That's fine, but
where is my ~180 MB?
Manual says these are in bytes. I don't see my 180 MB here. :(
How can I get the amount of memory that is free within erts, but that
can't be reclaimed by the OS?
I can only come up with two explanations for the widely different memory
- My handful of transient processes that were created used more memory
than the others, and pushed the heap up. (The 1700 is what is left
after about 850 transients were created and shutdown.)
- The number of monitors I have in 1 process (~ 850) is eating a large
amount of memory. Or I'm leaking monitors at some point. Does one have
to demonitor a monitor if we get a 'DOWN' message noting the process has
I'm putting money on the first one being the problem.
FORTUNE PROVIDES QUESTIONS FOR THE GREAT ANSWERS: #4
A: Go west, young man, go west!
Q: What do wabbits do when they get tiwed of wunning awound?
More information about the erlang-questions