<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">OTP-21 rc1 has enhanced IO scalability. Have you tried if it is any better? UDP performance in Erlang was never great... <div class=""><br class=""></div><div class="">Regards,</div><div class="">Sergej<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 24 May 2018, at 12:03, Danil Zagoskin <<a href="mailto:z@gosk.in" class="">z@gosk.in</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Yes, we have {read_packets, 100} in receive socket options.<br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, May 24, 2018 at 10:23 AM, Raimo Niskanen <span dir="ltr" class=""><<a href="mailto:raimo+erlang-questions@erix.ericsson.se" target="_blank" class="">raimo+erlang-questions@erix.ericsson.se</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, May 23, 2018 at 06:28:55PM +0300, Danil Zagoskin wrote:<br class="">
> Hi!<br class="">
> <br class="">
> We have a performance problem receiving lots of UDP traffic.<br class="">
> There are a lot (about 70) of UDP receive processes, each handling about 1<br class="">
> to 10 megabits of multicast traffic, with {active, N}.<br class="">
<br class="">
</span>Whenever someone has UDP receive performance problems one has to ask if you<br class="">
have seen the Erlang socket option {read_packets,N}?<br class="">
<br class="">
See <a href="http://erlang.org/doc/man/inet.html#setopts-2" rel="noreferrer" target="_blank" class="">http://erlang.org/doc/man/<wbr class="">inet.html#setopts-2</a><br class="">
<span class=""><br class="">
> <br class="">
> msacc summary on my OSX laptop, build from OTP master<br class="">
> c30309e799212b080c39ee2f91af3f<wbr class="">9a0383d767 (Apr 19):<br class="">
> <br class="">
> <br class="">
> Thread alloc aux bifbusy_wait check_io emulator<br class="">
> ets gc gc_full nif other port send sleep<br class="">
> timers<br class="">
> scheduler 30.02% 0.92% 2.86% 24.66% 0.01% 9.61%<br class="">
> 0.03% 1.25% 0.20% 0.13% 2.34% 9.33% 0.41% 17.78%<br class="">
> 0.44%<br class="">
> <br class="">
> <br class="">
> Linux production server behaves the same way (we do not have extended msacc<br class="">
> there yet, so most of alloc goes to port).<br class="">
> <br class="">
> perf top (on Linux production) says there's a lot of unaligned memmove:<br class="">
> <br class="">
> 69.76% <a href="http://libc-2.24.so/" rel="noreferrer" target="_blank" class="">libc-2.24.so</a> [.] __memmove_sse2_unaligned_erms<br class="">
> 6.13% beam.smp [.] process_main<br class="">
> 2.02% beam.smp [.] erts_schedule<br class="">
> 0.87% [kernel] [k] copy_user_enhanced_fast_string<br class="">
> <br class="">
> <br class="">
> I'll try to make a minimal example for this.<br class="">
> Maybe there are simple recommendations on optimizing this kind of load?<br class="">
> <br class="">
> -- <br class="">
> Danil Zagoskin | <a href="mailto:z@gosk.in" class="">z@gosk.in</a><br class="">
<br class="">
</span>> ______________________________<wbr class="">_________________<br class="">
> erlang-questions mailing list<br class="">
> <a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank" class="">http://erlang.org/mailman/<wbr class="">listinfo/erlang-questions</a><br class="">
<span class="HOEnZb"><font color="#888888" class=""><br class="">
<br class="">
-- <br class="">
<br class="">
/ Raimo Niskanen, Erlang/OTP, Ericsson AB<br class="">
______________________________<wbr class="">_________________<br class="">
erlang-questions mailing list<br class="">
<a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank" class="">http://erlang.org/mailman/<wbr class="">listinfo/erlang-questions</a><br class="">
</font></span></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><font face="'courier new', monospace" class="">Danil Zagoskin | <a href="mailto:z@gosk.in" target="_blank" class="">z@gosk.in</a></font></div></div></div>
</div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></div></body></html>