[erlang-questions] UDP client/server performance

Max Lapshin max.lapshin@REDACTED
Wed Aug 15 12:32:10 CEST 2012


I've met difference between erlang and C code only once.

I had to receive MPEG-TS UDP packets, about 100 mbits of them, pack
them into large packets and send via http.

One MPEG-TS UDP packet is about 1300 bytes (7 blocks of 188 bytes), so
there is about 70 000 of messages per second.

I've rewritten UDP handling code in C (with using all erl_driver
capabilities) and made packaging inside C driver.

Now erlang code received about 700 messages per second and CPU got
down from 90% to 10%. So, my ehnancement was in lowering amount of
messages and preallocating big buffers inside C level.



More information about the erlang-questions mailing list