<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 22 Jun 2018, at 10:27 AM, Lukas Larsson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Fri, 22 Jun 2018, 09:24 pablo platt, <<a href="mailto:pablo.platt@gmail.com">pablo.platt@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<div>Does this bug only affect multicast UDP or also normal UDP?</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">It effects reception of all UDP messages.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>What values should I use for buffer and recbuf in a UDP socket receiving 1Mbps with 1500 Bytes MTU?</div><div>I thought I need N*MTU recbuf so the pid will be able to handle a small burst of UDP packets.</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">There is no need to set buffer larger than your MTU. The recbuf however should be large enough to handle any bursts that may happen. </div><div dir="auto"><br></div><div dir="auto"></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>This is what I currently have:<br></div><div>gen_udp:open(0, [binary, {active, once}, {recbuf, 16*1024}])</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I doubt that you will see any large performance differences by setting the buffer size to, let's say 2*1024. But it will as always depend on your application.</div></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br><div>A high volume testing we have performed using earlier versions (R15+), yielded far less (or rather none) packet drops when recbuf has been set to a higher value.</div><div>Cannot recall what were the hardware specs, but I remember that without adjusting recbuf, the packet drops were experienced at the rate that was about 10,000 packet/sec.</div><div>With adjustment for recbuf (arbitrarily set to 1MB), we were able to push 70,000 packets/sec without a drop throughout tests.</div><div>The testing was not performed to measure impact on CPU, but rather to establish that packet drops were function of recbuf size (and/or sender's sndbuf size).</div><div>We have concluded this to be the case for the packet sizes not exceeding MTU.</div><div><br></div><div>Kind regards</div><div><br></div><div>V/</div><div><br></div></body></html>