[erlang-questions] Gen_UDP Packet Loss

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Wed Jul 30 21:12:28 CEST 2014


There are two buffers here. The kernel has a buffer and the Erlang VM has a
buffer. You are setting the Erlang VMs buffers only. If the kernels buffer
fills up, it drops packets, because it is allowed to do so with UDP (UDP is
not reliable). Linux doesn't have too many easy ways to see this. But you
can do netstat -c --udp -an and watch for large recv-q's.


On Wed, Jul 30, 2014 at 9:09 PM, Lee Sylvester <lee.sylvester@REDACTED>
wrote:

> Thanks.  How does that make a difference over setting it in the app,
> though?
>
> Thanks,
> Lee
>
>
> On 30 Jul 2014, at 20:06, Max Lapshin <max.lapshin@REDACTED> wrote:
>
> I've spent lot of time to make capturing of 600 mbit/s of udp traffic
> without loss.
>
> Don't specify buffer size in erlang, use system variables.
>
>
>
>
>
>
>
> sysctl -w net.core.rmem_max=1048576
> sysctl -w net.core.rmem_default=1048576
> sysctl -w net.ipv4.udp_mem="8388608 12582912 16777216"
>
>
>


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140730/de85d782/attachment.htm>


More information about the erlang-questions mailing list