]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: build: allow packagers to specify the ssl cache size
authorEmeric Brun <ebrun@exceliance.fr>
Wed, 14 Nov 2012 10:32:56 +0000 (11:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Nov 2012 09:52:19 +0000 (10:52 +0100)
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.

include/common/defaults.h
src/haproxy.c

index ae49263a18c370ae3d9f51fca72dd3d4c80c8fc4..9b54276b25c1103af10af8a69e0171378b545e51 100644 (file)
 #define LISTEN_DEFAULT_CIPHERS NULL
 #endif
 
+/* ssl cache size */
+#ifndef SSLCACHESIZE
+#define SSLCACHESIZE 20000
+#endif
+
 #endif /* _COMMON_DEFAULTS_H */
index 5e6ee40142260ce31dd6575d9fb479342c3311a7..97a40399942b22e40216f86d60228c1df1abf30b 100644 (file)
@@ -132,7 +132,7 @@ struct global global = {
                .maxrewrite = MAXREWRITE,
                .chksize = BUFSIZE,
 #ifdef USE_OPENSSL
-               .sslcachesize = 20000,
+               .sslcachesize = SSLCACHESIZE,
 #endif
 #ifdef USE_ZLIB
                .zlibmemlevel = 8,