From a9d361b4be7d6329bedd7b37d454c1abf4f27233 Mon Sep 17 00:00:00 2001
From: Lukas Larsson
Date: Thu, 21 Jun 2018 11:00:25 +0200
Subject: erts: Limit the automatic max buffer for UDP to 2^16
There is no reason to have a larger buffer than this as
the recvmsg call will never return more data.
OTP-15206
---
lib/kernel/doc/src/inet.xml | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
(limited to 'lib/kernel/doc/src/inet.xml')
diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index e6a7962c5a..f281d61459 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -734,22 +734,23 @@ get_tcpi_sacked(Sock) ->
{buffer, Size}
-
-
The size of the user-level software buffer used by
- the driver.
- Not to be confused with options sndbuf
+
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. It is recommended
- to have val(buffer) >= max(val(sndbuf),val(recbuf)) to
+ Kernel socket buffers. For TCP it is recommended
+ to have val(buffer) >= val(recbuf) to
avoid performance issues because of unnecessary copying.
+ For UDP the same recommendation applies, but the max should
+ not be larger than the MTU of the network path.
val(buffer) is automatically set to the above
- maximum when values sndbuf or recbuf are set.
- However, as the sizes set for sndbuf and recbuf
+ maximum when recbuf is set.
+ However, as the size set for recbuf
usually become larger, you are encouraged to use
getopts/2
to analyze the behavior of your operating system.
Note that this is also the maximum amount of data that can be
- received from a single recv call. If you are using higher than
- normal MTU consider setting buffer higher.
+ received from a single recv call. If you are using higher than
+ normal MTU consider setting buffer higher.
{delay_send, Boolean}
-
--
cgit v1.2.3