r813 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Aug 11 16:09:09 CEST 2006


Author: phk
Date: 2006-08-11 16:09:09 +0200 (Fri, 11 Aug 2006)
New Revision: 813

Modified:
   trunk/varnish-cache/bin/varnishd/hash_classic.c
Log:
Use 1:1 for hashbucket:mutex ratio


Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_classic.c	2006-08-11 13:41:28 UTC (rev 812)
+++ trunk/varnish-cache/bin/varnishd/hash_classic.c	2006-08-11 14:09:09 UTC (rev 813)
@@ -40,7 +40,7 @@
 
 static struct hcl_head *hcl_head;
 static unsigned hcl_nhash = 4096;
-static unsigned hcl_nmtx = 256;
+static unsigned hcl_nmtx = 4096;
 static pthread_mutex_t *hcl_mutex;
 
 /*--------------------------------------------------------------------*/
@@ -131,7 +131,7 @@
 	}
 	hcl_nhash = u1;
 	if (i == 1) {
-		hcl_nmtx = hcl_nhash / 16;
+		hcl_nmtx = hcl_nhash;
 		if (hcl_nmtx <  1)
 			hcl_nmtx = 1;
 		return(0);




More information about the varnish-commit mailing list