Mnesia, table updates, and (UNIX) process bloat

Scott Lystig Fritchie fritchie@REDACTED
Fri Apr 7 04:59:11 CEST 2006

In a followup to my own message ... I have a plea for the Gods of the
virtual machine.

Assume that I start the VM with "+Mim true" to get the memory
instrumentation enabled.  Then assume I call the following function
and see this result:

    erlang:system_info({allocator, binary_alloc}) ==>

As far as I can tell (without actually looking at source code to
verify ... ):

    'blocks' = number of items allocated out of this "carrier"
        (to use the names from the "erts_alloc" document).

        Each item is an individual binary term?  Larger than 64 bytes
        and thus allocated using the binary_alloc allocator?

    'blocks_size' = sum of the size of each 'blocks' item.  Perhaps
        plus a little extra fudge/overhead/alignment?

    'carriers_size' = sum of all memory region sizes allocated for
        this carrier

OK, if those guesses are correct ... then if I see the 'blocks' and
'blocks_size' values increasing without an eventual decrease(*)
then I definitely have some >64 byte binary
term somewhere that's still referenced, right?

(*) Presumably due to garbage collection.


More information about the erlang-questions mailing list