init:stop(). ok 3> Ender@PROSPERO /j/git/erlang_decorators $ …Read more »" />

process table size in erlang

Whats the cost of increasing the process limit?

I was curious:

Ender@PROSPERO /j/git/erlang_decorators
$ erl +P 32768
Eshell V5.7.5  (abort with ^G)
1> io:format("~p",[erlang:memory()]).
[{total,4081272},
 {processes,351700},
 {processes_used,344924},
 {system,3729572},
 {atom,297141},
 {atom_used,266009},
 {binary,317744},
 {code,1836583},
 {ets,129660}]ok
2> init:stop().
ok
3>
Ender@PROSPERO /j/git/erlang_decorators
$ erl +P 10000000
Eshell V5.7.5  (abort with ^G)
1> io:format("~p",[erlang:memory()]).
[{total,43949344},
 {processes,40220628},
 {processes_used,40213852},
 {system,3728716},
 {atom,297141},
 {atom_used,266009},
 {binary,317744},
 {code,1836583},
 {ets,129660}]ok
2> init:stop().
ok
3>

So (on my 32 bit vm on windows), you pay 4 bytes per process whether you use it or not.
Pretty compact. Feels like its probably implemented as an array of pointers. Yep

People always seem to run into the default limit. Its quite low.
I wonder if any large Erlang project has ever been done without increasing the limit.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>