<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Though this does depend on whether one is measuring throughput vs. latency. Generally, TCP would always be more latent than pipes on Linux since pipes marshaling doesn't need to go through the TCP stack, which adds penalty. As you correctly observed, UNIX domain sockets, don't involve that overhead, and have latency performance comparable to pipes, but throughput better than pipes.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 3, 2015 at 2:19 AM, Michael Truog <span dir="ltr"><<a href="mailto:mjtruog@gmail.com" target="_blank">mjtruog@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 12/02/2015 10:20 PM, Max Lapshin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Sergey, have you compared TCP localhost vs stdin/stdout pipe?<br>
Throughput and latency.<br>
<br>
</blockquote>
TCP on localhost should be better due to the atomic send<br>
being limited by the MTU on the localhost interface<br>
which is normally 16436 on Linux, when compared to the<br>
atomic send on a pipe being limited by PIPE_BUF which<br>
is normally 4096. There is a definite improvement<br>
when using UNIX domain sockets instead of INET domain<br>
sockets, so hopefully<br>
<a href="https://github.com/erlang/otp/pull/612" rel="noreferrer" target="_blank">https://github.com/erlang/otp/pull/612</a> will make its<br>
way in sometime.<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div>