r4539 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Feb 8 21:20:00 CET 2010


Author: phk
Date: 2010-02-08 21:20:00 +0100 (Mon, 08 Feb 2010)
New Revision: 4539

Modified:
   trunk/varnish-cache/bin/varnishd/cache_center.c
   trunk/varnish-cache/bin/varnishd/heritage.h
   trunk/varnish-cache/bin/varnishd/mgt_param.c
   trunk/varnish-cache/bin/varnishd/stevedore.c
   trunk/varnish-cache/bin/varnishd/varnishd.1
Log:
Remove obj_workspace parameter.  We autosize it for just what is needed.



Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2010-02-08 18:09:49 UTC (rev 4538)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2010-02-08 20:20:00 UTC (rev 4539)
@@ -336,7 +336,8 @@
 	if (sp->obj == NULL) {
 		HSH_Prealloc(sp);
 		sp->wrk->cacheable = 0;
-		sp->obj = STV_NewObject(sp, 0, 0, params->http_headers);
+		/* XXX: 1024 is a pure guess */
+		sp->obj = STV_NewObject(sp, 1024, 0, params->http_headers);
 		sp->obj->xid = sp->xid;
 		sp->obj->entered = sp->t_req;
 	} else {

Modified: trunk/varnish-cache/bin/varnishd/heritage.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/heritage.h	2010-02-08 18:09:49 UTC (rev 4538)
+++ trunk/varnish-cache/bin/varnishd/heritage.h	2010-02-08 20:20:00 UTC (rev 4539)
@@ -99,7 +99,6 @@
 
 	/* Memory allocation hints */
 	unsigned		sess_workspace;
-	unsigned		obj_workspace;
 	unsigned		shm_workspace;
 	unsigned		http_headers;
 

Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c	2010-02-08 18:09:49 UTC (rev 4538)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c	2010-02-08 20:20:00 UTC (rev 4539)
@@ -535,14 +535,6 @@
 		"objects allocate only space for the headers they store.\n",
 		0,
 		"64", "header lines" },
-	{ "obj_workspace", tweak_uint, &master.obj_workspace, 0, UINT_MAX,
-		"Bytes of HTTP protocol workspace allocated for objects. "
-		"This space must be big enough for the entire HTTP protocol "
-		"header and any edits done to it in the VCL code while it "
-		"is cached.\n"
-		"Minimum is 1024 bytes.",
-		DELAYED_EFFECT,
-		"0", "bytes" },
 	{ "shm_workspace", tweak_uint, &master.shm_workspace, 4096, UINT_MAX,
 		"Bytes of shmlog workspace allocated for worker threads. "
 		"If too big, it wastes some ram, if too small it causes "

Modified: trunk/varnish-cache/bin/varnishd/stevedore.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/stevedore.c	2010-02-08 18:09:49 UTC (rev 4538)
+++ trunk/varnish-cache/bin/varnishd/stevedore.c	2010-02-08 20:20:00 UTC (rev 4539)
@@ -117,10 +117,7 @@
 	unsigned lh;
 
 	(void)ttl;
-	if (l == 0)
-		l = 1024;
-	if (params->obj_workspace > 0 && params->obj_workspace > l)
-		l =  params->obj_workspace;
+	assert(l > 0);
 
 	lh = HTTP_estimate(nhttp);
 

Modified: trunk/varnish-cache/bin/varnishd/varnishd.1
===================================================================
--- trunk/varnish-cache/bin/varnishd/varnishd.1	2010-02-08 18:09:49 UTC (rev 4538)
+++ trunk/varnish-cache/bin/varnishd/varnishd.1	2010-02-08 20:20:00 UTC (rev 4539)
@@ -895,21 +895,6 @@
 .br
 Be aware that restarts are likely to cause a hit against the backend, so don't increase thoughtlessly.
 .Pp
-.It Va obj_workspace
-Units:
-.Dv bytes
-.br
-Default:
-.Dv 0
-.br
-Flags:
-.Dv "delayed"
-.br
-.Pp
-Bytes of HTTP protocol workspace allocated for objects. This space must be big enough for the entire HTTP protocol header and any edits done to it in the VCL code while it is cached.
-.br
-Minimum is 1024 bytes.
-.Pp
 .It Va overflow_max
 Units:
 .Dv %



More information about the varnish-commit mailing list