[erlang-questions] An elegant implementation of multi pollset for Erlang VM

Andreas Schultz aschultz@REDACTED
Fri Feb 19 11:15:24 CET 2016


Hi Max,

On 02/18/2016 07:47 AM, max_feng wrote:
> Erlang VM has only one PollSet in the same time, which is not scalable, especially with a rapid growth of NIC bandwidth and CPU cores on one
> single machine.
>
> In order to make full use of multi-core in Eralng network programming, we develop gen_socket module.
> The gen_socket creates multi pollset for Erlang VM without changing erts code!

Your code is more or less a Erlang wrapper around libev. Why do you have to import all the
libev code, couldn't you just have a NIF to wrap what you need?

The scheduler and CPU binding seems to give you an performance advantage. If that it so, then I would rather like to see this as a feature 
in the Erlang poll code than a UNIX only bolt on.

> The gen_socket already has been deployed in production env, and increases throughput of echo server by 110% on a 24-core, 1000Mb/s machine
> based on redhat6.2.
>
> The gen_socket is completely compatible with gen_tcp interface, and very easily deployed. Just git clone and make it.

It is not really nice that you are using a name that is already in use (and much longer so) by another Erlang project [1] that is roughly in 
the same domain.

Andreas

[1]: https://github.com/travelping/gen_socket

>
> For details please refer to project link.
>
> https://github.com/max-feng/erlang_multi_pollset
>
> Max Feng
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list