<div dir="ltr"><div><div><div>Hi,<br><br></div>I have a UDP erlang media server running on Ubuntu 16.04 in a Virtual Private Server (VPS) with 100 connected clients.<br>10 clients send 1Mbps. Each packet is 1KB. <br></div>All clients receive 1Mbps.<br></div><div>Every client has a pid that holds a gen_udp socket.<br></div><div><br></div><div>I see packet loss on the clients. I'm trying to find what cause the packet loss and how to fix it.<br></div><div>mtr -u <server> show no loss.<br>netstat -su show that RcvbufErrors increases over time<br></div><div>Does this means that packets are dropped between the linux kernel and Erlang?<br><br>The socket is created with gen_udp:open(0, [binary, {active, once}])<br>The default gen_udp socket settings my machine is:<br>buffer = 8192<br>recbuf = 16384<br>sndbuf = 212992<br><br></div><div>inet docs says that buffer should be larger than recbuf and sndbuf and will be set automatically but in my case it is smaller. Is this a problem?<br><br></div><div>Does sndbuf has an effect on UDP socket or only TCP socket?<br><br>What are the recommended settings for buffer, recbuf and sndbuf for 1Mbps UDP socket?<br></div><div>Do I need to change the kernel settings as well?<br><br></div><div>What else can cause packet loss?<br></div><div><br></div><div>Thanks<br></div><div><br></div><div><br><br></div><div><br></div><div><br></div></div>