<div>Ok, thanks.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">/Frank</div><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 12, 2019 at 7:43 PM Frank Muller <<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi all</div><div dir="auto"><br></div><div dir="auto">The inet (<div><a href="http://erlang.org/doc/man/inet.html" target="_blank">http://erlang.org/doc/man/inet.html</a></div>) documentation states :</div><div dir="auto"><div dir="auto"><br></div><div dir="auto">{buffer, Size}</div><div dir="auto"><br></div><div dir="auto"> The size of the user-level buffer used by the driver. Not to be confused with options sndbuf and recbuf, which correspond to the Kernel socket buffers. For TCP it is recommended to have val(buffer) >= val(recbuf) to avoid performance issues because of unnecessary copying. For UDP [...]</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Question: which is best here:</div><div dir="auto"><br></div><div dir="auto">val(buffer) = val(recbuf)</div><div dir="auto"><br></div><div dir="auto">val(buffer) = val(recbuf) + (1/4 *val(recbuf))<br></div><div dir="auto"><br></div><div dir="auto">val(buffer) = val(recbuf) + (2/4 *val(recbuf))<br></div><div dir="auto"><br></div><div dir="auto">val(buffer) = val(recbuf) + (3/4 *val(recbuf))</div><div dir="auto"><br></div><div dir="auto">val(buffer) = 2 * val(recbuf)</div><div dir="auto"><br></div><div dir="auto">Is there any optimal value?</div></div></blockquote><div><br></div><div>Not a general optimal value. It will depend on what data you are sending and which packet mode you are using. If not using any packet mode (aka raw), then I would say that "val(buffer) = val(recbuf)" should be the best option.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><br></div><div dir="auto">/Frank</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div></div>
</blockquote></div></div>
</blockquote></div></div>