<div dir="ltr"><div><div>I simplified scenario and made a stress tester for this use case: Handle each <br>UDP socket in a gen_server and send a UDP packet in every miliseconds [1].<br><br>It won't reach more that 280Mbit/s on my Core 2 duo system without sending<br>anything to wire. At this point CPU will be a bottleneck here. I sent perf<br>report in `out` directory of repository [2] and it shows still time spent in<br>process_main is high.<br><br></div>On our production servers with Xeon E3-1230 CPUs and low latency (.20ms<br>between servers), I can fill 1Gbits link: send 1400 byte packets each 20ms<br>from 1800 ports to 1800 ports, and measure bandwidth by received packets.<br>I can transfer with 1Gbit/s speed but at this point CPU usage is above 50%.<br></div><div>By overloading system, I can see no packet drop from /proc/net/udp but<br>response time drops considerably. I think Erlang get packets from kernel very<br>soon and buffers getting overrun in Erlang side, not sure how to measure them<br>then. I disabled and enabled kernel poll, perf report same time spent but on<br>different functions.<br></div><div><div><div><br>1: <a href="https://github.com/reith/udpstress" target="_blank">https://github.com/reith/udpstress</a><br>2: <a href="https://raw.githubusercontent.com/reith/udpstress/master/out/b67acb689f-perf.svg" target="_blank">https://raw.githubusercontent.com/reith/udpstress/master/out/b67acb689f-perf.svg</a></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 5, 2016 at 12:17 PM, Max Lapshin <span dir="ltr"><<a href="mailto:max.lapshin@gmail.com" target="_blank">max.lapshin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Well, I'm not going to argue about it, but I know that it is a serious blocker for us: when flussonic is consuming 50% of all cores only on capturing (unpacking mpegts is another pain) when code in C takes only 10-15% for this task, customers are complaining.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">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>
<br></blockquote></div><br></div>