]> err.no Git - varnish/commitdiff
Use 1:1 for hashbucket:mutex ratio
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 11 Aug 2006 14:09:09 +0000 (14:09 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 11 Aug 2006 14:09:09 +0000 (14:09 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@813 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/hash_classic.c

index e6c6971c392cd26bd2486a13c52df1d9d090c33c..d01b64b69841cd318949dffdd36df7735f4f3a78 100644 (file)
@@ -40,7 +40,7 @@ TAILQ_HEAD(hcl_head, hcl_entry);
 
 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_init(const char *p)
        }
        hcl_nhash = u1;
        if (i == 1) {
-               hcl_nmtx = hcl_nhash / 16;
+               hcl_nmtx = hcl_nhash;
                if (hcl_nmtx <  1)
                        hcl_nmtx = 1;
                return(0);