[erlang-questions] UDP receive performance

Danil Zagoskin z@REDACTED
Wed May 23 17:28:55 CEST 2018


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}.

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
     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%

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180523/b992560b/attachment.htm>

More information about the erlang-questions mailing list