[erlang-questions] UDP receive performance

Lukas Larsson lukas@REDACTED
Fri Jun 22 10:27:02 CEST 2018


On Fri, 22 Jun 2018, 09:24 pablo platt, <pablo.platt@REDACTED> wrote:

> Does this bug only affect multicast UDP or also normal UDP?
>

It effects reception of all UDP messages.


> What values should I use for buffer and recbuf in a UDP socket receiving
> 1Mbps with 1500 Bytes MTU?
> I thought I need N*MTU recbuf so the pid will be able to handle a small
> burst of UDP packets.
>

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.

This is what I currently have:
> gen_udp:open(0, [binary, {active, once}, {recbuf, 16*1024}])
>

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180622/216da956/attachment.htm>


More information about the erlang-questions mailing list