[experimental-ims] 4601ddc Fix some stats-counter issues scoof pointed out yesterday:
Poul-Henning Kamp
phk at FreeBSD.org
Thu Dec 18 10:27:44 CET 2014
commit 4601ddcd8db6926bd6315c642863a123e4c15b01
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Apr 23 06:45:30 2012 +0000
Fix some stats-counter issues scoof pointed out yesterday:
n_objsendfile is of course no longer relevant.
That makes n_objwrite pointless.
n_objoverflow was unused.
and threads_failed were not incremented where it should be.
diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c
index 29d467c..bf3ab8e 100644
--- a/bin/varnishd/cache/cache_pool.c
+++ b/bin/varnishd/cache/cache_pool.c
@@ -340,7 +340,7 @@ pool_breed(struct pool *qp, const pthread_attr_t *tp_attr)
VSL(SLT_Debug, 0, "Create worker thread failed %d %s",
errno, strerror(errno));
Lck_Lock(&pool_mtx);
- VSC_C_main->threads_limited++;
+ VSC_C_main->threads_failed++;
Lck_Unlock(&pool_mtx);
VTIM_sleep(cache_param->wthread_fail_delay * 1e-3);
} else {
diff --git a/bin/varnishd/cache/cache_response.c b/bin/varnishd/cache/cache_response.c
index 8579e37..cd45945 100644
--- a/bin/varnishd/cache/cache_response.c
+++ b/bin/varnishd/cache/cache_response.c
@@ -168,8 +168,6 @@ res_WriteGunzipObj(const struct sess *sp)
CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC);
u += st->len;
- VSC_C_main->n_objwrite++;
-
i = VGZ_WrwGunzip(sp->wrk, vg, st->ptr, st->len);
/* XXX: error check */
(void)i;
@@ -215,7 +213,6 @@ res_WriteDirObj(const struct sess *sp, ssize_t low, ssize_t high)
ptr += len;
sp->wrk->acct_tmp.bodybytes += len;
- VSC_C_main->n_objwrite++;
(void)WRW_Write(sp->wrk, st->ptr + off, len);
}
assert(u == sp->req->obj->len);
diff --git a/include/tbl/vsc_f_main.h b/include/tbl/vsc_f_main.h
index 36bb629..2938d7a 100644
--- a/include/tbl/vsc_f_main.h
+++ b/include/tbl/vsc_f_main.h
@@ -304,22 +304,6 @@ VSC_F(losthdr, uint64_t, 0, 'a',
""
)
-VSC_F(n_objsendfile, uint64_t, 0, 'a',
- "Objects sent with sendfile",
- "The number of objects sent with the sendfile system call. If enabled "
- "sendfile will be used on object larger than a certain size."
-)
-VSC_F(n_objwrite, uint64_t, 0, 'a',
- "Objects sent with write",
- "The number of objects sent with regular write calls."
- "Writes are used when the objects are too small for sendfile "
- "or if the sendfile call has been disabled"
-)
-VSC_F(n_objoverflow, uint64_t, 1, 'a',
- "Objects overflowing workspace",
- ""
-)
-
VSC_F(s_sess, uint64_t, 1, 'a',
"Total Sessions",
""
More information about the varnish-commit
mailing list