Module: kamailio
Branch: master
Commit: 38a696fff66f0a453e54c92c93e8c459a1b4e77d
URL:
https://github.com/kamailio/kamailio/commit/38a696fff66f0a453e54c92c93e8c45…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-01-15T13:02:08+01:00
doc/tutorials/tcp_tunning: note about network buffers size
- they may need tunning when dealing with large data
---
Modified: doc/tutorials/tcp_tunning.txt
---
Diff:
https://github.com/kamailio/kamailio/commit/38a696fff66f0a453e54c92c93e8c45…
Patch:
https://github.com/kamailio/kamailio/commit/38a696fff66f0a453e54c92c93e8c45…
---
diff --git a/doc/tutorials/tcp_tunning.txt b/doc/tutorials/tcp_tunning.txt
index 39097d57b7..aca6a12449 100644
--- a/doc/tutorials/tcp_tunning.txt
+++ b/doc/tutorials/tcp_tunning.txt
@@ -19,22 +19,22 @@ For now it deals only with Linux specific optimizations.
net.core.somaxconn - limit of the listen() backlog, default 128
net.ipv4.tcp_max_syn_backlog - default 1024 or 128
-net.ipv4.tcp_timestamps - default on., should be on (along with
+net.ipv4.tcp_timestamps - default on., should be on (along with
tcp_tw_recycle and timestamp supporting
peers allows for fast connections rates)
-1.2 connection in close_wait
+1.2 Connection in close_wait
- Connection should stay as little as possible
- in close_wait to quickly free the fd/resources for new connections attempts
- WARNING: this could break normal TCP use, use it only if you know what you are
+ Connection should stay as little as possible
+ in close_wait to quickly free the fd/resources for new connections attempts
+ WARNING: this could break normal TCP use, use it only if you know what you are
doing
-
+
net.ipv4.tcp_max_tw_buckets - maximum number of timewait sockets
(the default seems to be ok)
net.ipv4.tcp_tw_recycle - enables fast time wait sockets recycling (default
off), should be enabled if you have lots of short
- lived connections
+ lived connections
WARNING: see the above warning
net.ipv4.tcp_tw_reuse - allows reusing of time-wait sockets (default off)
WARNING: see above
@@ -49,10 +49,26 @@ net.ipv4.ip_local_port_range - should be increased (e.g. 4096-65534)
1.4 Open file descriptors
fs.file-max - maximum number of fds that will be allocated
- (you probably need to increase it, default
+ (you probably need to increase it, default
depends on installed memory)
-1.5 other sysctl that might affect tcp connection rate or the maximum number
+1.5 Buffers size
+
+ When dealing with large data, check the values for network sockets buffers
+ to be sufficient, among them:
+
+net.core.rmem_max
+net.core.wmem_max
+net.core.rmem_default
+net.core.wmem_default
+net.ipv4.tcp_mem
+net.ipv4.tcp_rmem
+net.ipv4.tcp_wmem
+
+ Note: sysctl -w net.ipv4.route.flush=1 - enusre that immediatly subsequent
+ connections use the values
+
+1.6 Other sysctl that might affect tcp connection rate or the maximum number
of open connections
fs.epoll.max_user_instances - maximum number of devices - per user (2.6.27.8+)