[erlang-questions] Gen_UDP Packet Loss

Lee Sylvester lee.sylvester@REDACTED
Thu Jul 31 01:45:03 CEST 2014


What I mean is that, Wireshark will show 1000 packets of 1500 bytes over 5 connections being sent to the server on a given port.  The EVM statistics show only around 50% of those messages every being recorded.  I’ve now tried this on a remote server and the results are even worse, so it can’t be my dev machine.  The server uses 4 Xeon processors, SSD’s and runs CentOS with a huge fat bandwidth.

If I run the beam files directly in the EVM (using Erl), can I expect different results?  What exactly is iex -S mix doing under the covers?

Thanks,
Lee


On 30 Jul 2014, at 23:20, Tony Rogvall <tony@REDACTED> wrote:

> 
> On 30 jul 2014, at 21:14, Lee Sylvester <lee.sylvester@REDACTED> wrote:
> 
>> Okay, I’ll try that.  Just so you know, though, I also receive packet loss with TCP, only at 35 clients +, rather than a dismal 3+
>> 
> Could please explain what you mean with "receive packet loss with TCP" ?
> 
> Do you mean that you see the packet error on the network stat ?
> 
> Have you checked your equipment, connected the cables correctly, power cycled everything :-)
> 
> /Tony
> 
> 
>> Lee
>> 
>> 
>> On 30 Jul 2014, at 20:12, Jesper Louis Andersen <jesper.louis.andersen@REDACTED> wrote:
>> 
>>> 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.
>> 
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
> 
> "Installing applications can lead to corruption over time. Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"

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


More information about the erlang-questions mailing list