[erlang-questions] Heavy duty UDP server performance

Kostis Sagonas kostis@REDACTED
Wed Feb 3 18:41:18 CET 2016

On 02/03/2016 05:26 PM, Sergej Jurečko wrote:
> Yeah same experience and solution that we used. I presume there is a lot allocation/fragmentation going on with udp, since packets tend to be small and there are so many of them.
> Sergej
>> >On 03 Feb 2016, at 17:23, Max Lapshin<max.lapshin@REDACTED>  wrote:
>> >
>> >When we use plain gen_udp to accept 200-400 mbit of incoming MPEG-TS traffic in flussonic, we use about 50% of moderate 4 core xeon e3 server.
>> >
>> >When we switch to our driver implementation of udp that collapses several contiguous udp messages into single big message (it is allowed for mpegts) we reduce usage to 15-20%
>> >
>> >I can't tell that it is "badly written udp in erlang", just messaging is rather expensive.

To an outsider, like me, none of the above answers do not reply to the 
original question which read:

   On what basis do you make that claim? Also, writing a NIF that 
actually provides better performance without blocking the scheduler is 
non-trivial, even if UDP is simple to work with in C.

Some questions:

  1. Is your driver implementation one that does not block a scheduler?

  2. Why is % of CPU usage (rather than whether or not you can achieve 
the throughput which the application requires) a useful/interesting 
metric here?

Like Sean, I am not disputing that one can write a more performant UDP 
server in C rather than in Erlang, but I am just curious why writing in 
Erlang is not sufficient for many/most applications or advantageous for 
other reasons.


More information about the erlang-questions mailing list