summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/secondary.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-05-23 21:15:19 +0000
committerpjd <pjd@FreeBSD.org>2011-05-23 21:15:19 +0000
commit42a14e17b5ae3fb20e7c5cba42663f088ae9fa19 (patch)
tree8bdba7aed6120f1649d55702a6e914918cfa0c9c /sbin/hastd/secondary.c
parentbef2f8f5d1658b0cc6ec6bbe5c1b792020c86ee9 (diff)
downloadFreeBSD-src-42a14e17b5ae3fb20e7c5cba42663f088ae9fa19.zip
FreeBSD-src-42a14e17b5ae3fb20e7c5cba42663f088ae9fa19.tar.gz
Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSH
requests as well as number of activemap updates. Number of BIO_WRITEs and activemap updates are especially interesting, because if those two are too close to each other, it means that your workload needs bigger number of dirty extents. Activemap should be updated as rarely as possible. MFC after: 1 week
Diffstat (limited to 'sbin/hastd/secondary.c')
-rw-r--r--sbin/hastd/secondary.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sbin/hastd/secondary.c b/sbin/hastd/secondary.c
index 176d047..1597af8 100644
--- a/sbin/hastd/secondary.c
+++ b/sbin/hastd/secondary.c
@@ -612,6 +612,20 @@ recv_thread(void *arg)
QUEUE_INSERT(send, hio);
continue;
}
+ switch (hio->hio_cmd) {
+ case HIO_READ:
+ res->hr_stat_read++;
+ break;
+ case HIO_WRITE:
+ res->hr_stat_write++;
+ break;
+ case HIO_DELETE:
+ res->hr_stat_delete++;
+ break;
+ case HIO_FLUSH:
+ res->hr_stat_flush++;
+ break;
+ }
reqlog(LOG_DEBUG, 2, -1, hio,
"recv: (%p) Got request header: ", hio);
if (hio->hio_cmd == HIO_KEEPALIVE) {
OpenPOWER on IntegriCloud