r1979 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Sep 21 15:18:10 CEST 2007


Author: phk
Date: 2007-09-21 15:18:10 +0200 (Fri, 21 Sep 2007)
New Revision: 1979

Modified:
   trunk/varnish-cache/bin/varnishd/heritage.h
   trunk/varnish-cache/bin/varnishd/mgt_param.c
Log:
Add an experimental runtime parameter for the lru_timeout.



Modified: trunk/varnish-cache/bin/varnishd/heritage.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/heritage.h	2007-09-21 10:38:01 UTC (rev 1978)
+++ trunk/varnish-cache/bin/varnishd/heritage.h	2007-09-21 13:18:10 UTC (rev 1979)
@@ -120,6 +120,9 @@
 	/* Ping interval */
 	unsigned		ping_interval;
 
+	/* LRU list ordering interval */
+	unsigned		lru_timeout;
+
 };
 
 extern volatile struct params *params;

Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c	2007-09-21 10:38:01 UTC (rev 1978)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c	2007-09-21 13:18:10 UTC (rev 1979)
@@ -328,6 +328,15 @@
 /*--------------------------------------------------------------------*/
 
 static void
+tweak_lru_timeout(struct cli *cli, struct parspec *par, const char *arg)
+{
+	(void)par;
+	tweak_generic_timeout(cli, &master.lru_timeout, arg);
+}
+
+/*--------------------------------------------------------------------*/
+
+static void
 tweak_auto_restart(struct cli *cli, struct parspec *par, const char *arg)
 {
 
@@ -716,6 +725,14 @@
 		"it possible to attach a debugger to the child.\n"
 		MUST_RESTART,
 		"3", "seconds" },
+	{ "lru_interval", tweak_lru_timeout,
+		"Grace period before object moves on LRU list.\n"
+		"Objects are only moved to the front of the LRU "
+		"list if they have not been moved there already inside "
+		"this timeout period.  This reduces the amount of lock "
+		"operations necessary for LRU list access.\n"
+		EXPERIMENTAL,
+		"2", "seconds" },
 	{ "cc_command", tweak_cc_command,
 		"Command used for compiling the C source code to a "
 		"dlopen(3) loadable object.\n"




More information about the varnish-commit mailing list