[erlang-questions] UDP receive performance

Raimo Niskanen raimo+erlang-questions@REDACTED
Thu May 24 09:23:57 CEST 2018


On Wed, May 23, 2018 at 06:28:55PM +0300, Danil Zagoskin wrote:
> Hi!
> 
> We have a performance problem receiving lots of UDP traffic.
> There are a lot (about 70) of UDP receive processes, each handling about 1
> to 10 megabits of multicast traffic, with {active, N}.

Whenever someone has UDP receive performance problems one has to ask if you
have seen the Erlang socket option {read_packets,N}?

See http://erlang.org/doc/man/inet.html#setopts-2

> 
> msacc summary on my OSX laptop, build from OTP master
> c30309e799212b080c39ee2f91af3f9a0383d767 (Apr 19):
> 
> 
>         Thread    alloc      aux      bifbusy_wait check_io emulator
>    ets       gc  gc_full      nif    other     port     send    sleep
>  timers
>      scheduler   30.02%    0.92%    2.86%   24.66%    0.01%    9.61%
>  0.03%    1.25%    0.20%    0.13%    2.34%    9.33%    0.41%   17.78%
>   0.44%
> 
> 
> Linux production server behaves the same way (we do not have extended msacc
> there yet, so most of alloc goes to port).
> 
> perf top (on Linux production) says there's a lot of unaligned memmove:
> 
>   69.76%  libc-2.24.so        [.] __memmove_sse2_unaligned_erms
>    6.13%  beam.smp            [.] process_main
>    2.02%  beam.smp            [.] erts_schedule
>    0.87%  [kernel]            [k] copy_user_enhanced_fast_string
> 
> 
> I'll try to make a minimal example for this.
> Maybe there are simple recommendations on optimizing this kind of load?
> 
> -- 
> Danil Zagoskin | z@REDACTED

> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions


-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list