Browse code

Typos and formatting

oej authored on 09/10/2009 20:38:48
Showing 1 changed files
... ...
@@ -10,15 +10,16 @@ TCP Tunning/monitoring for lots of open connections
10 10
 ----------------
11 11
 
12 12
 This document describes very briefly various settings that should improve
13
- ser+tcp performance for sites handling a lot of tcp traffic (> 1000 open
14
-  connections or very high connection/disconnection rates).
15
-For now it deals only with linux specific optimizations.
13
+ser+tcp performance for sites handling a lot of tcp traffic (> 1000 open
14
+connections or very high connection/disconnection rates).
16 15
 
16
+For now it deals only with Linux specific optimizations.
17 17
 
18
-1. Usefull kernel settings
19 18
 
20
-1.1 connection rate/pending connections: by default the connection rate is
19
+1. Useful kernel settings
20
+-------------------------
21
+
22
+1.1 Connection rate/pending connections: by default the connection rate is
21 23
  too small
22 24
 
23 25
 net.core.somaxconn             -  limit of the listen() backlog, default 128
... ...
@@ -27,7 +28,9 @@ net.ipv4.tcp_timestamps        - default on., should be on (along with
27 27
                                  tcp_tw_recycle and timestamp supporting
28 28
                                  peers allows for fast connections rates)
29 29
 
30
-1.2 connection in close_wait: connection should stay as little as possible
30
+1.2 connection in close_wait
31
+
32
+ Connection should stay as little as possible
31 33
  in close_wait to quickly free the fd/resources for new connections attempts
32 34
  WARNING: this could break normal tcp use, use it only if you know what you are
33 35
   doing
... ...
@@ -44,10 +47,11 @@ net.ipv4.tcp_tw_reuse       - allows reusing of time-wait sockets (default off)
44 44
 net.ipv4.tcp_syncookies     - default off, in this case it's probably better to
45 45
                               keep it off
46 46
 
47
-1.3 port range
47
+1.3 Port range
48 48
 net.ipv4.ip_local_port_range - should be increased (e.g. 4096-65534)
49 49
 
50
-1.4  open fds
50
+1.4 Open file descriptors
51
+
51 52
 fs.file-max                 - maximum number of fds that will be allocated
52 53
                               (you probably need to increase it, default 
53 54
                                depends on installed memory)
... ...
@@ -59,20 +63,23 @@ fs.epoll.max_user_instances - maximum number of devices - per user (2.6.27.8+)
59 59
 fs.epoll.max_user_watches   - maximum number of "watched" fds - per user
60 60
                               (2.6.27.8+)
61 61
 
62
-iptables  - remove the ip_conntrack module (it limits the maximum tcp
63
- connections, adds extra overhead (slow)). It's probably better to remove
64
-  all the iptables modules.
65
-
66 62
 net.ipv4.tcp_max_orphans    - might be worth a look if things go wrong
67 63
 net.core.netdev_max_backlog - maximum device backlog
68 64
 
65
+Related applications
66
+--------------------
69 67
 ifconfig <dev> txqueuelen <val> - set device transmission queue len
70 68
 
69
+iptables  - remove the ip_conntrack module (it limits the maximum tcp
70
+  connections, adds extra overhead (slow)). It's probably better to remove
71
+  all the iptables modules.
72
+
73
+
71 74
 
72 75
 2. Monitoring (values to watch for)
73 76
 -----------------------------------
74 77
 
75
-2.1 FDs
78
+2.1 File descriptors
76 79
 
77 80
 fs.dentry-state  - format: nr. dentries, nr. unused, age_limit, want_pages
78 81
 fs.file-nr       - format: allocated, unused, max (==fs.file-max)
... ...
@@ -87,14 +94,15 @@ fs.inode-state  -  format: nr. allocated, nr. free, preshrink
87 87
 /proc/net/sockstat
88 88
 
89 89
 
90
-3. Ser settings
90
+3. Sip-router settings
91
+----------------------
91 92
 
92
-- don't forget to increase tcp_max_connections and the amount of shared memory
93
-- you should increase the number of ser "tcp_children" processes (-N no)
94
-As a rule of thumb, (maximum simultaneous connections)/2000 should be ok
95
-- you might have to decrease TCP_BUF_SIZE to a smaller value (e.g 8K)
96
-- you might want to increase PKG_MEM_POOL_SIZE (for large queues)
93
+- Don't forget to increase tcp_max_connections and the amount of shared memory
94
+- You should increase the number of ser "tcp_children" processes (-N no)
95
+  As a rule of thumb, (maximum simultaneous connections)/2000 should be ok
96
+- You might have to decrease TCP_BUF_SIZE to a smaller value (e.g 8K)
97
+- You might want to increase PKG_MEM_POOL_SIZE (for large queues)
97 98
 
98
-- you might need to increase the maximum open fds limit before starting ser
99
- (e.g. ulimit -n 1000000)
99
+- You might need to increase the maximum open fds limit before starting ser
100
+  (e.g. ulimit -n 1000000)
100 101