<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>What is the frequency of initial messages sent? Are the worker processes mailboxes increasing over time as well?<br></div><div><br></div><div>Tristan<br></div><div><br></div><div>On Thu, Apr 11, 2019, at 13:07, Konstantinos Kallas wrote:<br></div><blockquote type="cite" id="qt"><p><span style="font-family:Ubuntu" class="font">Hello,</span><br></p><p><span style="font-family:Ubuntu" class="font">I have an Erlang application where latency is crucial and a lot of small messages (tuples with an atom and integer) are exchanged between processes in different nodes. </span><br></p><p><span style="font-family:Ubuntu" class="font">The main procedure is that a main process sends a small message to 4 worker processes in other Erlang nodes, the worker processes do some negligible processing, and then they reply back to the main node with a small message. </span><br></p><p><span style="font-family:Ubuntu" class="font">Each separate Erlang node is on a different docker container (generated from the erlang:21 docker image), and all the containers are connected using a standard docker bridge network.</span><br></p><p><span style="font-family:Ubuntu" class="font">I have noticed that latency (the time from when the first message is sent, and its replies arrive) linearly increases with time. It starts at 1 second and after 30 seconds of execution latency has become 10 seconds.</span><br></p><p><span style="font-family:Ubuntu" class="font">I have tried running all processes on the same erlang node, and then latency is (as expected) a couple milliseconds, so my assumption is that the problem could be caused by one (or more) of the following:</span><br></p><p><span style="font-family:Ubuntu" class="font">- Some misconfiguration of the Erlang nodes</span><br></p><p><span style="font-family:Ubuntu" class="font">- Some misconfiguration of the docker network/containers</span><br></p><p><span style="font-family:Ubuntu" class="font">- Some penalty imposed by the operating system/docker because a lot of small messages are exchanged</span><br></p><p><span style="font-family:Ubuntu" class="font">Has anyone encountered this issue, or does anyone know how to configure Erlang nodes (and the operating system) to reduce message latency? </span><br></p><p><span style="font-family:Ubuntu" class="font">Thanks in advance.</span><br></p><p><span style="font-family:Ubuntu" class="font">Best,</span><br></p><p><span style="font-family:Ubuntu" class="font">Konstantinos</span><br></p><div>_______________________________________________<br></div><div>erlang-questions mailing list<br></div><div>erlang-questions@erlang.org<br></div><div>http://erlang.org/mailman/listinfo/erlang-questions<br></div><div><br></div></blockquote><div><br></div></body></html>