From: Emeric Brun Date: Wed, 14 Nov 2012 10:32:56 +0000 (+0100) Subject: MINOR: build: allow packagers to specify the ssl cache size X-Git-Tag: v1.5-dev13~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4663577e242944516fd2937f4b9b894d63f55069;p=thirdparty%2Fhaproxy.git MINOR: build: allow packagers to specify the ssl cache size This is done by passing the default value to SSLCACHESIZE in sessions. User can use tune.sslcachesize to change this value. By default, it is set to 20000 sessions as openssl internal cache size. Currently, a session entry size is between 592 and 616 bytes depending on the arch. --- diff --git a/include/common/defaults.h b/include/common/defaults.h index ae49263a18..9b54276b25 100644 --- a/include/common/defaults.h +++ b/include/common/defaults.h @@ -191,4 +191,9 @@ #define LISTEN_DEFAULT_CIPHERS NULL #endif +/* ssl cache size */ +#ifndef SSLCACHESIZE +#define SSLCACHESIZE 20000 +#endif + #endif /* _COMMON_DEFAULTS_H */ diff --git a/src/haproxy.c b/src/haproxy.c index 5e6ee40142..97a4039994 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -132,7 +132,7 @@ struct global global = { .maxrewrite = MAXREWRITE, .chksize = BUFSIZE, #ifdef USE_OPENSSL - .sslcachesize = 20000, + .sslcachesize = SSLCACHESIZE, #endif #ifdef USE_ZLIB .zlibmemlevel = 8,