[erlang-questions] [Q] Why is Erlang VM better than traditional OS like Linux?

Guilherme Andrade <>
Wed Aug 6 16:30:04 CEST 2014


Hello Ladislav,

On 06/08/14 15:15, Ladislav Lenart wrote:
> Is it because Erlang process occupies an order of magnitude less space than an
> OS process?
> Is it because a userspace scheduler such as Erlang VM is faster at process
> switching? If so, why is that?
> Is it somehow related to Erlang's share nothing philosophy? If so, how exactly?
> Something else?

Partially, yes. Some reasons I can think of:

    - Much smaller process footprint; Erlang processes aren't visible to
the OS, their footprint is much lighter (the context they need to keep
track of, etc.) OS processes are traditionally heavy, even more-so than
OS threads, which are pretty big themselves.

    - By not being visible to the OS, context & execution switching
between different processes by the scheduler doesn't have to deal with
userland/kernelspace shenanigans (for the most part, anyway.)

    - By being shared-nothing, traditional concurrency control
mechanisms (which have considerable overhead -- specially on SMP
machines) are not needed;

    - Shooting in the dark here, but the per-process GC might also help
on this -- concerning stability and expectable availability variations,
anyway.


With some oversimplifications, of course; but this is the general idea.


-- 
Guilherme

https://www.gandrade.net/
PGP: 0x35CB8191 / 1968 5252 3901 B40F ED8A  D67A 9330 79B1 35CB 8191


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140806/ecbd4782/attachment.bin>


More information about the erlang-questions mailing list