C nodes and message sending slowness

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

C nodes and message sending slowness

David Welton-3
Hi,

I've been looking at the system I'm working on to see how things will
look if the C node is down:

timer:tc(fun() -> {any, 'cnode@foobar'}  ! {level, 50} end).

It takes something like 7 seconds!  This shouldn't happen often, but
it'd be nice if it didn't gum everything up.  I guess it's easy enough
to wrap that in a spawn, but it just seemed a bit odd.

Thanks
--
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: C nodes and message sending slowness

Lukas Larsson-8
Hello,

On Wed, Apr 18, 2018 at 1:46 AM, David Welton <[hidden email]> wrote:
Hi,

I've been looking at the system I'm working on to see how things will
look if the C node is down:

timer:tc(fun() -> {any, 'cnode@foobar'}  ! {level, 50} end).

It takes something like 7 seconds!  This shouldn't happen often, but
it'd be nice if it didn't gum everything up.  I guess it's easy enough
to wrap that in a spawn, but it just seemed a bit odd.

This behavior has been fixed in the upcoming OTP-21 release so that operations to unconnected remote nodes no longer block until the connection has been established.

Lukas

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: C nodes and message sending slowness

Sverker Eriksson-4
In reply to this post by David Welton-3
In OTP-21 node distribution auto-connect will be truly asynchronous,
which means your example will complete in microseconds.

You can test it out on master branch.


/Sverker, Erlang/OTP


On tis, 2018-04-17 at 16:46 -0700, David Welton wrote:

> Hi,
>
> I've been looking at the system I'm working on to see how things will
> look if the C node is down:
>
> timer:tc(fun() -> {any, 'cnode@foobar'}  ! {level, 50} end).
>
> It takes something like 7 seconds!  This shouldn't happen often, but
> it'd be nice if it didn't gum everything up.  I guess it's easy
> enough
> to wrap that in a spawn, but it just seemed a bit odd.
>
> Thanks
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: C nodes and message sending slowness

David Welton-3
> In OTP-21 node distribution auto-connect will be truly asynchronous,
> which means your example will complete in microseconds.

Not a possibility for the system I'm working on, but I'm glad I wasn't
just imagining things.  spawn() works fine as a workaround.

Fred Hebert also mentioned that it's possible to add a 'noconnect'
option to send, but that would require handling the connectivity
elsewhere.  That may be an option for future work on this system.

Thanks!
--
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions