From: phk Date: Wed, 13 Feb 2008 10:56:36 +0000 (+0000) Subject: Add a parameter for controlling caching of vbe_conn structures. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edd4b199acf7394ca970bfe9faed88a068fce542;p=varnish 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. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2449 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/heritage.h b/varnish-cache/bin/varnishd/heritage.h index e0e763c6..6f192cfe 100644 --- a/varnish-cache/bin/varnishd/heritage.h +++ b/varnish-cache/bin/varnishd/heritage.h @@ -135,6 +135,9 @@ struct params { /* Rush exponent */ unsigned rush_exponent; + + /* Cache vbe_conns */ + unsigned cache_vbe_conns; }; extern volatile struct params *params; diff --git a/varnish-cache/bin/varnishd/mgt_param.c b/varnish-cache/bin/varnishd/mgt_param.c index f850f0ff..b4873886 100644 --- a/varnish-cache/bin/varnishd/mgt_param.c +++ b/varnish-cache/bin/varnishd/mgt_param.c @@ -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 } };