[erlang-questions] Why am I seeing RefcBinary with length < 64?
Wed Dec 20 15:24:56 CET 2017
Everything I've read on the subject of garbage collecting Erlang
binaries says that binaries > 64 octets are stored off-heap.
If I dump (using gdb and etp-offheapdump -- patched for 64-bits) the
off-heap binaries for a given process, I get something like the
All in all, there are about 19.5K of them for this particular process.
But they're all 0xc, 0x10 or 0x18 bytes in length.
Mathematically astute readers will note that all three of those
numbers are less than 64.
Why are these binaries being stored off-heap? Is it bad? How do I make
it store them in the process heap?
Background: the process in question is a custom supervisor; it stores
its children in a list of records; it starts processes in response to
a gen_server:call from another node; the binaries are identifiable as
the various startup arguments passed when starting the processes.
Background background: we're running out of memory (the node hits ~9GB
resident), either because the beam is hoarding binaries, or because
the binary heap is hugely fragmented. I'm trying to figure out which
and solve the problem.
More information about the erlang-questions