[erlang-questions] How does Erland get maximum performance from a multi-core cpu?
Wed Jun 13 07:38:39 CEST 2018
The answer is multiple schedulers.
In the days before the SMP enabled Erlang emulator (VM) we would need to
run multiple nodes (VM) to take advantage of multiple cores. Now the
default mode for the VM is to run as many schedulers as there are cores
available. This also highly configurable.
Although Erlang's distribution allows processes to transparently
communicate across nodes there is a great performance advantage in
intra-node messaging as there is reference passing and it avoids
serialization in the external term format.
It's interesting though how everything goes in cycles. Five years ago I was
keeping the core counts very high, and the node counts very low, to get
great performance. Now with cloud native we run a node in a container and
communicate with other (microservices) nodes using either distribution or
external protocols (e.g. REST) so the overheads are again much higher. But
the old way was vertical scaling and this is horizontal scaling, we pay a
tax but go from dozens of cores to hundreds or thousands.
On Wed, Jun 13, 2018, 08:46 joe mcguckin <joe@REDACTED> wrote:
> If erlang is one large unix process with hundreds or thousands of it's own
> processes internally, how does Erlang make maximum use of a multi-core cpu?
> Wouldn’t Erlang be scheduled and run on a single core ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions