diff options
author | Lukas Larsson <[email protected]> | 2018-06-21 11:00:25 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-07-30 16:55:26 +0200 |
commit | a9d361b4be7d6329bedd7b37d454c1abf4f27233 (patch) | |
tree | a55a060d66bad33cff29fe00ab1ac1b171a4ce74 /lib/kernel/doc | |
parent | 83445d0de88a1ad15066e6c415b2c2d9aa93d6a1 (diff) | |
download | otp-a9d361b4be7d6329bedd7b37d454c1abf4f27233.tar.gz otp-a9d361b4be7d6329bedd7b37d454c1abf4f27233.tar.bz2 otp-a9d361b4be7d6329bedd7b37d454c1abf4f27233.zip |
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
Diffstat (limited to 'lib/kernel/doc')
-rw-r--r-- | lib/kernel/doc/src/inet.xml | 19 |
1 files changed, 10 insertions, 9 deletions
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) -> </item> <tag><c>{buffer, Size}</c></tag> <item> - <p>The size of the user-level software buffer used by - the driver. - Not to be confused with options <c>sndbuf</c> + <p>The size of the user-level buffer used by + the driver. Not to be confused with options <c>sndbuf</c> and <c>recbuf</c>, which correspond to the - Kernel socket buffers. It is recommended - to have <c>val(buffer) >= max(val(sndbuf),val(recbuf))</c> to + Kernel socket buffers. For TCP it is recommended + to have <c>val(buffer) >= val(recbuf)</c> 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. <c>val(buffer)</c> is automatically set to the above - maximum when values <c>sndbuf</c> or <c>recbuf</c> are set. - However, as the sizes set for <c>sndbuf</c> and <c>recbuf</c> + maximum when <c>recbuf</c> is set. + However, as the size set for <c>recbuf</c> usually become larger, you are encouraged to use <seealso marker="#getopts/2"><c>getopts/2</c></seealso> to analyze the behavior of your operating system.</p> <p>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.</p> + received from a single recv call. If you are using higher than + normal MTU consider setting buffer higher.</p> </item> <tag><c>{delay_send, Boolean}</c></tag> <item> |