[erlang-questions] Concurrency Orientated Design question

Richard O'Keefe ok@REDACTED
Mon Feb 7 23:16:43 CET 2011


On 8/02/2011, at 10:20 AM, Marcel Meyer wrote:

> Haha, I was actually wondering if each node could be a process, but some
> trees have 100,000's of nodes, so that didn't seem right?

What's the minimum memory for a process?

1> F = fun () -> receive ok -> ok end end.
2> {_,{memory,Bytes}} = process_info(spawn(F), memory).
3> Bytes div erlang:system_info(wordsize).

-- From the efficiency guide, with a minor but important correction
-- in line 2.

The guide says 309; one of my machines says 317; another says 330.

Whether a process per node makes sense depends on how much data you
have for each node.  If you have a kilobyte or more, then using a
process makes sense.  If you have just a few bytes, it probably doesn't.




More information about the erlang-questions mailing list