[erlang-questions] Gen_UDP Packet Loss
Lee Sylvester
lee.sylvester@REDACTED
Wed Jul 30 21:00:53 CEST 2014
So, I set a bunch of flags to update the buffer size:
{:buffer, 1024*1024*16}, {:recbuf, 1024*1024*16}, {:sndbuf, 1024*1024*16}
Giving quite a hefty amount of buffer space. When I connect 5 clients to the server with an echo peer, and send about 1000 packets from each with 1500 bytes per packet, only 50% of the packets even get registered in the message stack. I’ve conferred with other Erlang devs and have heard their similar servers can support around 1000 such clients. Why, then, do I get this issue? :-(
Any idea’s or help would be greatly appreciated.
Regards,
Lee
On 30 Jul 2014, at 10:02, Lee Sylvester <lee.sylvester@REDACTED> wrote:
> Hey guys,
>
> I have a simple UDP server set up, which is experiencing packet loss. If I send it 20 packets of 1000 bytes (1 packet each 20ms), only 16 will reach the handle_info genserver handler. The packet loss gets worse as I increase their number. If I send 100 packets of 1500 bytes each, one every 150ms, I get 75% packet loss. This makes the app totally useless for streaming. Has anyone else experienced this? Is there something I can do to see what's entering the message stack? I’m using statistics to tally the messages at the end of the tests and I’m watching network traffic with Wireshark. The messages are being sent, but many of them never seem to enter the message stack.
>
> I am setting the active value of the socket to once, and reset it to once with each message. I have also tried just setting it to true, but the results are the same.
>
> Thanks,
> Lee
More information about the erlang-questions
mailing list