Module: sip-router
Branch: master
Commit: a120c193e57415db8f188a26bdc85ad160d0e069
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a120c19…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Mar 19 22:52:09 2010 +0100
tls: doc: update default value for compression
---
NEWS | 4 ++++
modules/tls/README | 9 +++++----
modules/tls/doc/params.xml | 9 +++++----
3 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/NEWS b/NEWS
index a9b1b57..1e5d4b5 100644
--- a/NEWS
+++ b/NEWS
@@ -42,6 +42,10 @@ modules:
versions: ssl_release_buffers, ssl_freelist_max_len,
ssl_max_send_fragment, ssl_read_ahead. For more info see
modules/doc/tls/README.
+ compression is now disabled by default. To enable it set
+ tls_disable_compression to 0, but note that memory usage will
+ increase dramatically especially for large number of
+ connections (>1000).
tm:
- t_reply() can be used both from the main/core onreply_route{} and tm
onreply_route[...]{}s.
diff --git a/modules/tls/README b/modules/tls/README
index 2ef42bf..e2b0866 100644
--- a/modules/tls/README
+++ b/modules/tls/README
@@ -440,14 +440,15 @@ modparam("tls", "connection_timeout", 60)
1.8.12. tls_disable_compression (boolean)
If set compression over SSL/TLS will be disabled. Note that compression
- uses a lot of memory, so if you want to minimize memory usage is a good
- ideea to disable it.
+ uses a lot of memory (about 10x more then with the compression
+ disabled), so if you want to minimize memory usage is a good idea to
+ disable it.
- By default compression is enabled.
+ By default compression is disabled.
Example 13. Set tls_disable_compression parameter
...
-modparam("tls", "tls_disable_compression", 1)
+modparam("tls", "tls_disable_compression", 0) # enable
...
1.8.13. ssl_release_buffers (integer)
diff --git a/modules/tls/doc/params.xml b/modules/tls/doc/params.xml
index 9d3d80e..b898dc5 100644
--- a/modules/tls/doc/params.xml
+++ b/modules/tls/doc/params.xml
@@ -259,17 +259,18 @@ modparam("tls", "connection_timeout", 60)
<title><varname>tls_disable_compression</varname> (boolean)</title>
<para>
If set compression over SSL/TLS will be disabled.
- Note that compression uses a lot of memory, so if you want to minimize
- memory usage is a good ideea to disable it.
+ Note that compression uses a lot of memory (about 10x more then with
+ the compression disabled), so if you want to minimize
+ memory usage is a good idea to disable it.
</para>
<para>
- By default compression is enabled.
+ By default compression is disabled.
</para>
<example>
<title>Set <varname>tls_disable_compression</varname> parameter</title>
<programlisting>
...
-modparam("tls", "tls_disable_compression", 1)
+modparam("tls", "tls_disable_compression", 0) # enable
...
</programlisting>
</example>
Module: sip-router
Branch: master
Commit: 817b6fd3177bab507a8609b257fb8a79f89dd0a3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=817b6fd…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Mar 19 22:41:43 2010 +0100
tls: disable compression by default
Jan proposed to disable compression by default, since his tests showed
that with compression enabled openssl uses ~10x more memory.
For less then 100 connections it doesn't matter so much, but for
larger numbers (e.g. >1000) it really makes a huge difference.
To enable it, use modparam("tls", "tls_disable_compression", 0).
Reported-and-tested-by: Jan Janak <jan(a)iptel.org>
---
modules/tls/tls_init.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c
index aac73a6..004702d 100644
--- a/modules/tls/tls_init.c
+++ b/modules/tls/tls_init.c
@@ -126,7 +126,8 @@ int openssl_kssl_malloc_bug=0; /* is openssl bug #1467 present ? */
#endif
int openssl_mem_threshold1=-1; /* low memory threshold for connect/accept */
int openssl_mem_threshold2=-1; /* like above but for other tsl operations */
-int tls_disable_compression = 0; /* by default enabled */
+int tls_disable_compression = 1; /* by default disabled due to high memory
+ use (~10x then without compression) */
int tls_force_run = 0; /* ignore some start-up sanity checks, use it
at your own risk */
After read the new proposal, i liked it and seems almost ok. Indeed i
have 3 comments:
1) in the *dialog_in *table, is stated that /sflags/ is a row/field in
doubt. I'm also in doubt, since, from my POV, all necessary flags for
caller communication is already known by other module parms/flags. Could
somebody elaborate a little the necessity of this row/field?
2) the relations between /dialog_in /and /dialog_out/ are 1:n or am i
wrong? So, why, in the *dialog_out *table, is it necessary to keep the
/caller_route_set/ (even optionally)??? Aren't all this info kept on the
/dialog_in/ structure, since is equal to all /dialog_out/??? As 1 INVITE
could result in many /dailog_out/ (legs), and caller info is shared with
all generated /dialog_out/ legs, isn't this info more suitable on the
/dialog_in/ structure???
3) in section "Dialog state for dialog_in and dialog_out", statement (2)
is not clear. To me if at least one *dialog_out* is in /early /state,
*dialog_in* is steal 'alive' and could not be changed to /terminated
/state. Am I wrong???
Edson.
Module: sip-router
Branch: master
Commit: 0c5b835259ab27216a9f34ddf445a49604a6c70c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0c5b835…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Mar 19 15:11:49 2010 +0100
tls: new parameters for advanced openssl options
- ssl_release_buffers: release internal openssl read or write
buffers when they are no longer used (complete read or write that
does not have to buffer anything).
Should be used together with tls_free_list_max_len. Might have
some performance impact (and extra *malloc pressure), but has
also the potential of saving a lot of memory (at least 32k/idle
connection in the default config, or ~16k+tls_max_send_fragment)).
Works only with openssl >= 1.0.0.
- ssl_freelist_max_len: maximum length of free/unused memory
buffers/chunks per connection. Setting it to 0 would cause any
unused buffers to be immediately freed and hence a lower memory
footprint (at the cost of a possible performance hit and more
*malloc pressure). Too large value would result in extra memory
consumption. The default is 32 in openssl.
For lowest memory usage set it to 0 and tls_mode_release_buffers
to 1.
Works / makes sense only for openssl >= 1.0.0.
- ssl_max_send_fragment: maximum number of bytes (clear text) sent
into one record. The default and maximum value are ~16k. Lower
values would lead to a lower memory footprint. Values lower then
the typical app. write size might decrease performance, so
it should be kept ~2k+ for normal SIP traffic.
Too low values (e.g. <1024) might cause the initial handshake
to fail, so use with care.
Works only for openssl >= 0.9.9.
- ssl_read_ahead: enable read ahead. Should increase performance
(1 less syscall when enabled, else openssl makes 1 read() for
each record header and another or the content), but might
interact with SSL_pending() (not used right now).
Default: 1 (enabled).
---
modules/tls/tls_domain.c | 244 ++++++++++++++++++++++++++++++++++++++++++++-
modules/tls/tls_mod.c | 49 ++++++++--
modules/tls/tls_mod.h | 13 ++-
3 files changed, 288 insertions(+), 18 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=0c5…
Hi:
Running ser with root under debian lenny,
And tried:
kill -SIGABRT <pid_of_ser>
core was not generated
Any reason for that?
Mar 18 14:16:39 im1 /usr/sbin/ser[5315]: ALERT: <core> [main.c:730]:
child process 5319 exited by a signal 6
Mar 18 14:16:39 im1 /usr/sbin/ser[5336]: : <core> [pass_fd.c:293]:
ERROR: receive_fd: EOF on 13
Mar 18 14:16:39 im1 /usr/sbin/ser[5315]: ALERT: <core> [main.c:733]:
core was not generated
Mar 18 14:16:39 im1 /usr/sbin/ser[5336]: DEBUG: <core>
[tcp_main.c:3034]: DBG: handle_ser_child: dead child 4, pid 5319
(shutting down?)
Mar 18 14:16:39 im1 /usr/sbin/ser[5315]: INFO: <core> [main.c:745]:
INFO: terminating due to SIGCHLD
Mar 18 14:16:39 im1 /usr/sbin/ser[5336]: DEBUG: <core> [io_wait.h:588]:
DBG: io_watch_del (0x821a0a0, 13, -1, 0x0) fd_no=24 called
Mar 18 14:16:39 im1 /usr/sbin/ser[5332]: INFO: <core> [main.c:796]:
INFO: signal 15 received
Mar 18 14:16:39 im1 /usr/sbin/ser[5333]: INFO: <core> [main.c:796]:
INFO: signal 15 received
Mar 18 14:16:39 im1 /usr/sbin/ser[5324]: INFO: <core> [main.c:796]:
INFO: signal 15 received
Mar 18 14:16:39 im1 /usr/sbin/ser[5317]: INFO: <core> [main.c:796]:
INFO: signal 15 received
Thanks.
Kind Regards
Min Wang