From a3f6b0c4f231ccdb727227c9c35816b4823cef90 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 23 Feb 2012 12:53:19 +0530 Subject: mempool: add more counters to understand the usage scenarios properly current design of mempool is to fallback to standard calloc/free if all the buffers in pool are exhausted. Understanding more about those numbers will help us to tune mempool parameters properly over time. Change-Id: I2c94373186f7c6a486caff2611c2d9df2c37db3c Signed-off-by: Amar Tumballi BUG: 797730 Reviewed-on: http://review.gluster.com/2804 Tested-by: Gluster Build System Reviewed-by: Kaushal M Reviewed-by: Vijay Bellur --- cli/src/cli-xml-output.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'cli/src/cli-xml-output.c') diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 3e081277b..6a22b249b 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -441,6 +441,27 @@ cli_xml_output_vol_status_mempool (xmlTextWriterPtr writer, dict_t *dict, "%d", maxalloc); XML_RET_CHECK_AND_GOTO (ret, out); + memset (key, 0, sizeof (key)); + snprintf (key, sizeof (key), "%s.pool%d.pool-misses", prefix, i); + ret = dict_get_uint64 (dict, key, &alloccount); + if (ret) + goto out; + ret = xmlTextWriterWriteFormatElement (writer, + (xmlChar *)"poolMisses", + "%"PRIu64, alloccount); + XML_RET_CHECK_AND_GOTO (ret, out); + + memset (key, 0, sizeof (key)); + snprintf (key, sizeof (key), "%s.pool%d.max-stdalloc", prefix, i); + ret = dict_get_int32 (dict, key, &maxalloc); + if (ret) + goto out; + ret = xmlTextWriterWriteFormatElement (writer, + (xmlChar *)"maxStdAlloc", + "%d", maxalloc); + XML_RET_CHECK_AND_GOTO (ret, out); + + /* */ ret = xmlTextWriterEndElement (writer); XML_RET_CHECK_AND_GOTO (ret, out); -- cgit