From e8d7cc85d4308ac50fb568b6bf0a454235d236d2 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 18 Sep 2006 10:41:20 +0000 Subject: [PATCH] Drop the n_wrk_busy statistics, it is too expensive to maintain due to locking. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1073 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_pool.c | 7 ------- varnish-cache/include/stat_field.h | 1 - 2 files changed, 8 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_pool.c b/varnish-cache/bin/varnishd/cache_pool.c index c529cb4a..058161df 100644 --- a/varnish-cache/bin/varnishd/cache_pool.c +++ b/varnish-cache/bin/varnishd/cache_pool.c @@ -188,7 +188,6 @@ wrk_thread(void *priv) VSL(SLT_WorkThread, 0, "%p start", w); LOCK(&tmtx); - VSL_stats->n_wrk_busy++; VSL_stats->n_wrk_create++; UNLOCK(&tmtx); while (1) { @@ -213,9 +212,6 @@ wrk_thread(void *priv) TAILQ_INSERT_HEAD(&qp->idle, w, list); assert(w->idle != 0); UNLOCK(&qp->mtx); - LOCK(&tmtx); - VSL_stats->n_wrk_busy--; - UNLOCK(&tmtx); assert(1 == read(w->pipe[0], &c, 1)); if (w->idle == 0) break; @@ -266,9 +262,6 @@ WRK_QueueSession(struct sess *sp) UNLOCK(&qp->mtx); w->wrq = &sp->workreq; assert(1 == write(w->pipe[1], w, 1)); - LOCK(&tmtx); - VSL_stats->n_wrk_busy++; - UNLOCK(&tmtx); return; } diff --git a/varnish-cache/include/stat_field.h b/varnish-cache/include/stat_field.h index 16d34b86..3bcc8a02 100644 --- a/varnish-cache/include/stat_field.h +++ b/varnish-cache/include/stat_field.h @@ -25,7 +25,6 @@ MAC_STAT(n_wrk, uint64_t, "u", "N worker threads") MAC_STAT(n_wrk_create, uint64_t, "u", "N worker threads created") MAC_STAT(n_wrk_failed, uint64_t, "u", "N worker threads not created") MAC_STAT(n_wrk_max, uint64_t, "u", "N worker threads limited") -MAC_STAT(n_wrk_busy, uint64_t, "u", "N busy worker threads") MAC_STAT(n_wrk_queue, uint64_t, "u", "N queued work requests") MAC_STAT(n_wrk_overflow, uint64_t, "u", "N overflowed work requests") -- 2.39.5