]> err.no Git - varnish/commitdiff
Add a parameter for controlling caching of vbe_conn structures.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 13 Feb 2008 10:56:36 +0000 (10:56 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 13 Feb 2008 10:56:36 +0000 (10:56 +0000)
(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.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2449 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/heritage.h
varnish-cache/bin/varnishd/mgt_param.c

index e0e763c60efc263488fb8385f3648ab2c77efc4d..6f192cfefb97a098dfe1214f7bd20216836c2098 100644 (file)
@@ -135,6 +135,9 @@ struct params {
 
        /* Rush exponent */
        unsigned                rush_exponent;
+
+       /* Cache vbe_conns */
+       unsigned                cache_vbe_conns;
 };
 
 extern volatile struct params *params;
index f850f0ff46e27950b23640bcbbe206db51f2df69..b4873886eb415e61234ff48636d9dc09654b6964 100644 (file)
@@ -580,6 +580,13 @@ tweak_max_esi_includes(struct cli *cli, struct parspec *par, const char *arg)
        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 @@ static struct parspec parspec[] = {
                "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 }
 };