[erlang-questions] Erlang get_memory_data

tsuraan <>
Thu Jul 12 20:08:35 CEST 2012

I have a Riak database that frequently gets memsup high watermark
warnings and long_gc warnings, but really doesn't seem to be using
much RAM.  When I run memsup:get_memory_data(), I get this output:


Which I think indicates that erlang believes it's using ~3.5GB of RAM
(or does it mean something completely different?).  If I run "grep ^Vm
/proc/<pid>/status", I get this output:

VmPeak:   334560 kB
VmSize:   270252 kB
VmLck:         0 kB
VmHWM:     33384 kB
VmRSS:     33084 kB
VmData:   225832 kB
VmStk:       136 kB
VmExe:      2028 kB
VmLib:      6792 kB
VmPTE:       232 kB
VmSwap:        0 kB

So, Linux thinks Riak (beam) has never used more than ~350MB of RAM,
and that it only has a ~30MB resident set.  pmap shows 90MB of
writable anonymous pages, and a total of 262MB of mapped data.  Where
is memsup's 3.5GB of RAM coming from?  Or am I way off on my ideas
about what memsup is trying to tell me?

More information about the erlang-questions mailing list