[erlang-questions] UDP receive performance

Lukas Larsson lukas@REDACTED
Fri Jun 15 11:49:35 CEST 2018


On Wed, Jun 13, 2018 at 11:08 PM Jonas Falkevik <
jonas.falkevik@REDACTED> wrote:

> Hi,
> I think I was able to reproduce this problem.
> And to me it looks like a bug.
> On my system the packet_inet_input is called but the recv call returns
> eagain.
> This isn’t freeing the buffer so the realloc (intended for fragments?) are
> trigged.
> Reallocating the same size buffer again.
> The below branch with the below change reduced the reallocs on my linux
> system.
> https://github.com/falkevik/otp/tree/udp_performance_bug
> https://github.com/falkevik/otp/commit/ca08458a0663792390d5e89f83b883e19a33054c
Interesting... I wonder if maybe it wouldn't be better to solve this
problem in the code for realloc so that no copy is done when a realloc of
the same size if issued... that way we solve it in all places instead of
only in the inet_driver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180615/87f59f64/attachment.htm>

More information about the erlang-questions mailing list