[erlang-questions] grpoc for session management

Ulf Wiger <>
Tue Feb 9 22:57:24 CET 2010

Pablo Platt wrote:
> In your article you compare the performance of gproc to ETS
> and find that gproc is three time slower when storing a property.
> What is the reason?

Gproc has to store the property, a reverse mapping,
and ensure that the gproc server has a monitor on
the process.

> What will be the performance and memory of gproc compared to storing 
> properties in the process state?

Basically, the reverse mapping doubles the memory
consumption in the normal case.

> I realize that gproc let you query properties from outside the process but
> what would you use for storing the user online friends for example?
> Assuming this data will only be accessed from the process itself.

Seems like a dictionary of sorts in the process state would
be better for that sort of thing.

Gproc is mainly a way to "publish" properties about a process
that make it easier to find that process, individually or as
part of a group. It comes with some bookkeeping overhead, but
in most cases where that sort of functionality is useful, I
think its definitely fast enough for practical use.

Ulf W
Ulf Wiger
CTO, Erlang Solutions Ltd, formerly Erlang Training & Consulting Ltd



Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.


More information about the erlang-questions mailing list