[erlang-questions] How to handle a massive amount of UDP packets?

Dmitry Kolesnikov dmkolesnikov@REDACTED
Tue Apr 17 22:57:19 CEST 2012


Hello,

On Apr 17, 2012, at 11:45 PM, Johannes Huning wrote:

> On 04/17/2012 08:43 PM, Chandru wrote:
>> 
>> When using the {active, once} option, how much processing was the
>> receiving process doing with the packet before setting {active, once}
>> again? I personally wouldn't use {active, true} in a production
>> environment because of its potential to clog up the system.
>> 
> 
> It's does nothing but to send the received Packet to a process which is
> intended to do the actual handling, then it immediately returns to
> receiving packets.

It is faire to mentioned here that mailbox of destination process grows intensively if packet arrival rate higher then packet processing rate, as a consequence you'll get OOM.


> For the next sessions we're most likely to look into {active, true}
> further, testing different buffer sizes et al with it to see how it behaves.

I would recommend to test various packet size and various processing time.


> 
> Should {active, true} prove to be the fastest way of doing planned
> things, we'll implement some different means of preventing a system
> lock-up :)
I am afraid that at the end your came up to flow control where {active,true} and {active, once} mixed together ;-)


> 
> (Having some difficulties posting to the list, apologies for any duplicates)
> 
> -- 
> Johannes
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Regards, Dmitry




More information about the erlang-questions mailing list