Re:Managing two million web servers
by true_religion on Monday March 14, 2016 @03:31AM
(#11281499)
It also simplifies garbage collection. Rather than having to stop the world for garbage collection, it happens on a per-process basis.
Additionally, if a process terminates before a garbage collection cycle is run the VM just reclaims all of its memory without any additional computation needed.
That is a huge difference. Otherwise by now, why would Erlang not just run pthread calls and just spawn a thread. Why bother doing all that work?
The reason is because Erlang processes do not share heap memory. That is one of the most important features of Erlang runtime. A crashing process can just crash on its own without leaving all the other 1999999 processes in an undetermined state.