From edd4b199acf7394ca970bfe9faed88a068fce542 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 13 Feb 2008 10:56:36 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/heritage.h | 3 +++ varnish-cache/bin/varnishd/mgt_param.c | 11 +++++++++++ 2 files changed, 14 insertions(+) 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 } }; -- 2.39.5