@voltone and others have benchmarked the registry. I have consolidated
@voltone results here:

https://docs.google.com/spreadsheets/d/1MByRZJMCnZ1wPiLhBEnSRRSuy1QXp8kr27PIOXO3qqg/edit#gid=0

Summary: on a machine with 40 cores, a Registry with 40 partitions provides
across the board better results on concurrent registration. Without
partitioning, the Registry starts to scale poorly when the concurrency
factor is somewhere between 8 and 20.

Surprisingly, gproc performs quite well, even in concurrent scenarios.
<speculation>I am assuming serializing writes ensures there is no
contention for concurrent threads, so less coordination and process
switches.</speculation>

Erlang's built-in atom registration does not perform well in highly
concurrent scenarios but that's fine. It was not meant to support dynamic
names registration anyway (and doing so would certainly be a bug in your
app!).


*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Wed, Oct 26, 2016 at 2:58 PM, José Valim <jose.va...@plataformatec.com.br
> wrote:

> > Why can’t you do similar to what you’re doing with dispatch: N
> concurrent reads and then reduce results into a list?
>
> We could do that although I am afraid doing N concurrent reads will likely
> add more overhead than not. We will need to spawn multiple processes and
> then copy the data back.
>
> To put it another way, we could support it, but there is a cost per
> partition which I am afraid we can't go around.
>
> > How is different from registering a GenServer with the {:global, term}
> name where term can be dynamic ?
>
> The global term is distributed. It means that the value is global across
> *all nodes*, which also incurs communication costs on multi-node setups.
>
>
>
> *José Valim*
> www.plataformatec.com.br
> Skype: jv.ptec
> Founder and Director of R&D
>
> On Wed, Oct 26, 2016 at 2:47 PM, matteo brancaleoni <
> mbrancale...@gmail.com> wrote:
>
>> Hi,
>>
>>
>>>
>>> * Process registry: to register process with dynamic names. Often Elixir
>>> developers need to rely on gproc or other tools.
>>>
>>
>> How is different from registering a GenServer with the {:global, term}
>> name where term can be dynamic ?
>>
>> (I'm rather new in elixir, so excuse me if is a silly question)
>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LQ842E2f9SM6rAsX3OBySexfan0suvjFq%2BUc46y4s9AA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to