Module: sip-router
Branch: master
Commit: 46e13e4093f1b8f61dd34adb05e83adebff4ead1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=46e13e4…
Author: oej <oej(a)edvina.net>
Committer: oej <oej(a)edvina.net>
Date: Fri Oct 9 22:38:48 2009 +0200
Typos and formatting
---
doc/tcp_tunning.txt | 52 +++++++++++++++++++++++++++++---------------------
1 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/doc/tcp_tunning.txt b/doc/tcp_tunning.txt
index b383a42..db85289 100644
--- a/doc/tcp_tunning.txt
+++ b/doc/tcp_tunning.txt
@@ -10,15 +10,16 @@ TCP Tunning/monitoring for lots of open connections
----------------
This document describes very briefly various settings that should improve
- ser+tcp performance for sites handling a lot of tcp traffic (> 1000 open
- connections or very high connection/disconnection rates).
-For now it deals only with linux specific optimizations.
+ser+tcp performance for sites handling a lot of tcp traffic (> 1000 open
+connections or very high connection/disconnection rates).
+For now it deals only with Linux specific optimizations.
-1. Usefull kernel settings
----------------------------
-1.1 connection rate/pending connections: by default the connection rate is
+1. Useful kernel settings
+-------------------------
+
+1.1 Connection rate/pending connections: by default the connection rate is
too small
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
tcp_tw_recycle and timestamp supporting
peers allows for fast connections rates)
-1.2 connection in close_wait: connection should stay as little as possible
+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
doing
@@ -44,10 +47,11 @@ net.ipv4.tcp_tw_reuse - allows reusing of time-wait sockets (default off)
net.ipv4.tcp_syncookies - default off, in this case it's probably better to
keep it off
-1.3 port range
+1.3 Port range
net.ipv4.ip_local_port_range - should be increased (e.g. 4096-65534)
-1.4 open fds
+1.4 Open file descriptors
+
fs.file-max - maximum number of fds that will be allocated
(you probably need to increase it, default
depends on installed memory)
@@ -59,20 +63,23 @@ fs.epoll.max_user_instances - maximum number of devices - per user (2.6.27.8+)
fs.epoll.max_user_watches - maximum number of "watched" fds - per user
(2.6.27.8+)
-iptables - remove the ip_conntrack module (it limits the maximum tcp
- connections, adds extra overhead (slow)). It's probably better to remove
- all the iptables modules.
-
net.ipv4.tcp_max_orphans - might be worth a look if things go wrong
net.core.netdev_max_backlog - maximum device backlog
+Related applications
+--------------------
ifconfig <dev> txqueuelen <val> - set device transmission queue len
+iptables - remove the ip_conntrack module (it limits the maximum tcp
+ connections, adds extra overhead (slow)). It's probably better to remove
+ all the iptables modules.
+
+
2. Monitoring (values to watch for)
-----------------------------------
-2.1 FDs
+2.1 File descriptors
fs.dentry-state - format: nr. dentries, nr. unused, age_limit, want_pages
fs.file-nr - format: allocated, unused, max (==fs.file-max)
@@ -87,14 +94,15 @@ fs.inode-state - format: nr. allocated, nr. free, preshrink
/proc/net/sockstat
-3. Ser settings
+3. Sip-router settings
+----------------------
-- don't forget to increase tcp_max_connections and the amount of shared memory
-- you should increase the number of ser "tcp_children" processes (-N no)
-As a rule of thumb, (maximum simultaneous connections)/2000 should be ok
-- you might have to decrease TCP_BUF_SIZE to a smaller value (e.g 8K)
-- you might want to increase PKG_MEM_POOL_SIZE (for large queues)
+- Don't forget to increase tcp_max_connections and the amount of shared memory
+- You should increase the number of ser "tcp_children" processes (-N no)
+ As a rule of thumb, (maximum simultaneous connections)/2000 should be ok
+- You might have to decrease TCP_BUF_SIZE to a smaller value (e.g 8K)
+- You might want to increase PKG_MEM_POOL_SIZE (for large queues)
-- you might need to increase the maximum open fds limit before starting ser
- (e.g. ulimit -n 1000000)
+- You might need to increase the maximum open fds limit before starting ser
+ (e.g. ulimit -n 1000000)
Module: sip-router
Branch: master
Commit: 86a41ff90070932ac4dbbd685382183c308aa71b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=86a41ff…
Author: oej <oej(a)edvina.net>
Committer: oej <oej(a)edvina.net>
Date: Fri Oct 9 22:34:16 2009 +0200
Typo
---
doc/HISTORY | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/doc/HISTORY b/doc/HISTORY
index fa14a92..62ee146 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,7 +6,6 @@
This is a short ser history based mainly on my memory and my old mail archive. I've tried to mention only the important events. I'm sure I have missed a lot of things and/or people. If this is your case, please don't feel offended, send me an email and I will straighten things up.
-
Three years ago on 4 September 2001 I committed the first working ser version on a private cvs. In fact I started writting ser 2 days before, on 2nd September.
I was supposed to write some kind of sip glue for a Cisco PSTN gateway in 1 week, but of course I did it in the last 2 days :-)
@@ -29,7 +28,7 @@ At the beginning of 2002 we were joined by Daniel. Jan introduced the mysql, usr
Ser first public appearance was at the April 2002 Sipit. We ran it on a pda an still managed to be faster than the testing tools that were used against us :-)
In May 2002 ser got ipv6 support.
-In August 2002 Nils commited sipsak to berlios (very usefull testing tool).
+In August 2002 Nils commited sipsak to berlios (very useful testing tool).
In September 2002 ser went public: it was GPL'ed and the cvs tree was moved to berlios. During the same month Jiri introduced the FIFO interface, Karel committed serweb and we had the first GPL'ed release: ser 0.8.8.
In December 2002 ser got its first big external contribution: the enum module, written by Juha Heinanen.
In January 2003 Raphael commited sems on berlios.
Module: sip-router
Branch: master
Commit: e783a10daaa976960065b3750bdfd727676f9310
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e783a10…
Author: oej <oej(a)edvina.net>
Committer: oej <oej(a)edvina.net>
Date: Fri Oct 9 22:33:11 2009 +0200
Small formatting updates
---
doc/dns.txt | 82 +++++++++++++++++++++++++++++++---------------------------
1 files changed, 44 insertions(+), 38 deletions(-)
diff --git a/doc/dns.txt b/doc/dns.txt
index 1a3d904..cf595eb 100644
--- a/doc/dns.txt
+++ b/doc/dns.txt
@@ -7,83 +7,86 @@
#
Overview
+--------
- The dns subsystem in ser can either directly use libresolv and a combination
+ The dns subsystem in sip-router can either directly use libresolv and a combination
of the locally configured dns server, /etc/hosts and the local Network
Information Service (NIS/YP a.s.o) or cache the query results (both positive
and negative) and look first in its internal cache.
- When its internal dns cache is enabled, ser can also use dns failover: if
- one destination resolves to multiple addresses ser can try all of them until
+ When its internal dns cache is enabled, sip-router can also use dns failover: if
+ one destination resolves to multiple addresses sip-router can try all of them until
it finds one to which it can successfully send the packet or it exhausts all
- of them. ser (tm to be more precise) uses the dns failover also when the
- destination host doesn't send any reply to a forwarded invite within the
- sip timeout interval (whose value can be configured using the tm fr_timer
- parameter).
- When SRV based load balancing is enabled ser can even do DNS based load
- balancing (see RFC2782 and the dns_srv_lb option below).
+ of them. sip-router (The tm module to be more precise) uses the DNS failover also
+ when the destination host doesn't send any reply to a forwarded invite within the
+ SIP timeout interval (whose value can be configured using the tm fr_timer
+ parameter).
+ When SRV based load balancing is enabled sip-router can even do DNS based load
+ balancing (see RFC2782 and the dns_srv_lb option below).
DNS Cache and Failover Drawbacks
+--------------------------------
- Using the dns cache and the dns failover has also some drawbacks:
+ Using the DNS cache and the DNS failover has also some drawbacks:
- 1. only the locally configured dns server (usually in /etc/resolv.conf) is
+ 1. only the locally configured DNS server (usually in /etc/resolv.conf) is
used for the requests (/etc/hosts and the local Network Information Service
are ignored).
- Workaround: disable the dns cache (use_dns_cache=off or
- compile without -DUSE_DNS_CACHE).
+ Workaround: disable the dns cache (use_dns_cache=off or compile without -DUSE_DNS_CACHE).
- 2. the dns cache uses extra memory
- Workaround: disable the dns cache.
+ 2. the DNS cache uses extra memory
+ Workaround: disable the DNS cache.
- 3. the dns failover introduces a very small performance penalty
- Workaround: disable the dns failover (use_dns_failover=off).
+ 3. the DNS failover introduces a very small performance penalty
+ Workaround: disable the DNS failover (use_dns_failover=off).
- 4. the dns failover increases the memory usage (the internal structures
- used to represent the transaction are bigger when the dns failover support is
- compiled).
- Workaround: compile without dns failover support (-DUSE_DNS_FAILOVER).
- Turning it off from the config file is not enough in this case (the extra
- memory will still be used).
+ 4. the DNS failover increases the memory usage (the internal structures
+ used to represent the transaction are bigger when the DNS failover support is
+ compiled).
+ Workaround: compile without DNS failover support (-DUSE_DNS_FAILOVER).
+ Turning it off from the config file is not enough in this case (the extra
+ memory will still be used).
- On the other hand using the dns cache saves lots of DNS queries and makes
+ On the other hand using the DNS cache saves lots of DNS queries and makes
DNS based failover and DNS based load balancing possible. If the destination
- blacklist is enabled, ser can do failover even if forwarding in stateless
+ blacklist is enabled, sip-router can do failover even if forwarding in stateless
mode.
- In the ideal case with dns cache enabled ser will do only one query for
+ In the ideal case with the DNS cache enabled sip-router will do only one query for
a NAPTR (if enabled) or SRV lookup and then it will use the results for the
record's TTL (for example if all the resulting records have 1 minute TTL,
- ser won't make another query for this domain for 1 minute). Even negative
+ the server won't make another query for this domain for 1 minute). Even negative
answers will be cached.
- Without the dns cache, each NAPTR or SRV lookup will result in at least 2
+ Without the DNS cache, each NAPTR or SRV lookup will result in at least 2
queries. These queries will happen every time, for each message (even if
all of them go to the same domain).
DNS Resolver Options
+--------------------
- The DNS resolver options control how ser will interact with the external
+ The DNS resolver options control how sip-router will interact with the external
DNS servers. These options (with the dns_try_ipv6 exception) are passed to
libresolv and are used each time a dns request is made.
+
The default values are system specific and generally depend on the
/etc/resolv.conf content. For servers doing a lot of DNS requests it is
- highly recommended to change the default values in the ser config file
- (even if using ser's internal dns cache).
+ highly recommended to change the default values in the sip-router config file
+ (even if using sip-router's internal dns cache).
- dns_try_ipv6 = on | off - if on and ser listens on at least one ipv6 socket,
+ dns_try_ipv6 = on | off - if on and sip-router listens on at least one ipv6 socket,
ipv6 (AAAA) lookups will be performed if the ipv4 (A) lookups fail.
If off only ipv4 (A) lookups will be used.
- Default: on if ser is compiled with ipv6 support.
+ Default: on if sip-router is compiled with ipv6 support.
- dns_try_naptr = on | off - if on ser will first try a NAPTR lookup for
+ dns_try_naptr = on | off - if on sip-router will first try a NAPTR lookup for
destinations that don't have the protocol or port specified and
are not simple ip addresses (as described in RFC 3263). This will
introduce a slight performance penalty and will probably cause extra
DNS lookups. For example a lookup for a non-existing domain will
produce one extra query: NAPTR(domain), SRV(_sip._udp.domain)
and A/AAAA(domain).
- If the result of a query contains several NAPTR records, ser will select
- among them according to the RFC2915 and ser preference towards a
+ If the result of a query contains several NAPTR records, sip-router will select
+ among them according to the RFC2915 and sip-router preference towards a
specific protocol (see dns_udp_pref, dns_tcp_pref and dns_tls_pref
below). For an RFC3263 compliant configuration (choose the remote side
preferred protocol if supported), set dns_udp_pref, dns_tcp_pref and
@@ -166,6 +169,7 @@ DNS Resolver Options
DNS Resolver Compile Options
+----------------------------
USE_NAPTR - if defined the naptr lookup support will be compiled in.
NAPTR support still has to be enabled from ser's config file (it's
@@ -179,6 +183,7 @@ DNS Resolver Compile Options
DNS Cache and Failover Config Variables
+---------------------------------------
use_dns_cache = on | off - if off the dns cache won't be used (all dns
lookups will result into a dns request). When on all the dns request
@@ -270,6 +275,7 @@ DNS Cache and Failover Config Variables
Default: on
DNS Cache Compile Options
+-------------------------
USE_DNS_CACHE - if defined the dns cache support will be compiled in
(default). If not needed/wanted the dns_cache can be disabled from the
@@ -309,8 +315,8 @@ DNS Cache Compile Options
DNS_CACHE_DEBUG - if defined the dns cache will be very verbose (it will
log lots of messages at the L_DBG levell).
- Note: To remove a compile options, edit ser's Makefile.defs and remove it
- form DEFS list. To add a compile options add it to the make command line,
+ Note: To remove a compile options, edit sip-router's Makefile.defs and remove it
+ from DEFS list. To add a compile options add it to the make command line,
e.g.: make proper; make all extra_defs=-DUSE_DNS_FAILOVER
or for a permanent solution, edit Makefile.defs and add it to DEFS
(don't foget to prefix it with -D). Some options require editing