<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class="">I think I was able to reproduce this problem.</div><div class="">And to me it looks like a bug.</div><div class="">On my system the packet_inet_input is called but the recv call returns eagain.</div><div class="">This isn’t freeing the buffer so the realloc (intended for fragments?) are trigged.</div><div class="">Reallocating the same size buffer again.</div><div class=""><br class=""></div><div class="">The below branch with the below change reduced the reallocs on my linux system.</div><div class=""><a href="https://github.com/falkevik/otp/tree/udp_performance_bug" class="">https://github.com/falkevik/otp/tree/udp_performance_bug</a></div><div class=""><br class=""></div><div class=""><a href="https://github.com/falkevik/otp/commit/ca08458a0663792390d5e89f83b883e19a33054c" class="">https://github.com/falkevik/otp/commit/ca08458a0663792390d5e89f83b883e19a33054c</a></div><div class=""><br class=""></div><div class="">Jonas</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 31 May 2018, at 21:05, Max Lapshin <<a href="mailto:max.lapshin@gmail.com" class="">max.lapshin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra">It is video, we need to receive packets strictly in order.</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">Yes, I know that UDP can reorder and lose packets, but in normal conditions with hardware headend and plain C linux software on receiver it is possible to achieve almost 100% of deliverability of packets without reordering. </div><div class="gmail_extra"><br class=""></div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">We want to achieve something like this with erlang.</div></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></div></body></html>