News for hackers. Stuff that matters.
Re:Erlang vs Java memory architecture by silentbicycle on Wednesday April 13, 2011 @03:18PM (#2443716)
I'll see if I can find a citation, pretty sure it was in a paper I read about optimizations in the Erlang VM's scheduler. May be a recent thing.

Edit: Here's one (http://www.haskell.org/pipermail/haskell-cafe/2006-January/0...):

"Regarding the issue of why a logger process in Erlang does not get overwhelved, this is the reply I got from Raimo Niskanen (Erlang team at Ericsson):

There is a small fix in the scheduler for the standard producer/consumer problem: A process that sends to a receiver having a large receive queue gets punished with a large reduction (number of function calls) count for the send operation, and will therefore get smaller scheduling slots."

Sending to a mailbox costs reductions proportional to how many messages are already queued. While this isn't a perfect solution, it should influence the scheduler quite a bit. (Imagine trying to do that sort of thing in node.js!)

There are no comments on this comment yet.