[erlang-questions] how message size effects performance
Mon Feb 23 08:48:50 CET 2009
On Mon, Feb 23, 2009 at 1:13 AM, Cliff Moon <cliff@REDACTED> wrote:
> What about messages to other nodes? Clearly that involves a copy since
> it has to go across the wire, even if there are large binaries. Some
> people seem to think that the VM will block while the message is getting
> sent. So if you have a 20meg binary you want to send to another node
> all in one Erlang message will that get split up? Or does it block the
> whole VM to send a message that large?
Messages are not split. In the non-SMP virtual machine, the entire VM will
be blocked. In the SMP VM, the scheduler doing the send will be blocked
and if other schedulers threads try to send messages to the same node,
they will block until the big message has been sent.
We are planning to improve distributed sends in some future release.
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions