r2449 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Wed Feb 13 11:56:36 CET 2008
Author: phk
Date: 2008-02-13 11:56:36 +0100 (Wed, 13 Feb 2008)
New Revision: 2449
Modified:
trunk/varnish-cache/bin/varnishd/heritage.h
trunk/varnish-cache/bin/varnishd/mgt_param.c
Log:
Add a parameter for controlling caching of vbe_conn structures.
(the code that it controls follows in a minute)
I'm very interested to hear if there is any measurable effect
of this variable on heavily loaded systems.
Modified: trunk/varnish-cache/bin/varnishd/heritage.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/heritage.h 2008-02-13 10:55:03 UTC (rev 2448)
+++ trunk/varnish-cache/bin/varnishd/heritage.h 2008-02-13 10:56:36 UTC (rev 2449)
@@ -135,6 +135,9 @@
/* Rush exponent */
unsigned rush_exponent;
+
+ /* Cache vbe_conns */
+ unsigned cache_vbe_conns;
};
extern volatile struct params *params;
Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c 2008-02-13 10:55:03 UTC (rev 2448)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2008-02-13 10:56:36 UTC (rev 2449)
@@ -580,6 +580,13 @@
tweak_generic_uint(cli, &master.max_esi_includes, arg, 0, UINT_MAX);
}
+static void
+tweak_cache_vbe_conns(struct cli *cli, struct parspec *par, const char *arg)
+{
+ (void)par;
+ tweak_generic_bool(cli, &master.cache_vbe_conns, arg);
+}
+
/*--------------------------------------------------------------------*/
/*
@@ -788,6 +795,10 @@
"the backend, so don't increase thoughtlessly.\n",
0,
"5", "restarts" },
+ { "cache_vbe_conns", tweak_cache_vbe_conns,
+ "Cache vbe_conn's or rely on malloc, that's the question.",
+ EXPERIMENTAL,
+ "off", "bool" },
{ NULL, NULL, NULL }
};
More information about the varnish-commit
mailing list