summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-04-11 23:55:58 +0530
committerAnand Avati <avati@redhat.com>2012-04-11 16:48:25 -0700
commitf2921551424a97dcc3914cc79a241dca42675b97 (patch)
tree3fc9595dc0ab8b26e34e3dcb6bfe40db76c0eba8 /glusterfsd
parent472b55a6db996ca3058fec3aa6ab9a8745cbd5cb (diff)
glusterfsd: mem-pool count of dict_t is adjusted
increased dict_t pool count based on test results. Change-Id: Ia5b24940b79a1489b00cca2993241c32be94bbec Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 809034 Reviewed-on: http://review.gluster.com/3131 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c7
-rw-r--r--glusterfsd/src/glusterfsd.h7
2 files changed, 10 insertions, 4 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 053a7c2..7bc063b 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -1043,15 +1043,16 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx)
return -1;
}
- ctx->dict_pool = mem_pool_new (dict_t, 1024);
+ ctx->dict_pool = mem_pool_new (dict_t, GF_MEMPOOL_COUNT_OF_DICT_T);
if (!ctx->dict_pool)
return -1;
- ctx->dict_pair_pool = mem_pool_new (data_pair_t, 16 * GF_UNIT_KB);
+ ctx->dict_pair_pool = mem_pool_new (data_pair_t,
+ GF_MEMPOOL_COUNT_OF_DATA_PAIR_T);
if (!ctx->dict_pair_pool)
return -1;
- ctx->dict_data_pool = mem_pool_new (data_t, 8 * GF_UNIT_KB);
+ ctx->dict_data_pool = mem_pool_new (data_t, GF_MEMPOOL_COUNT_OF_DATA_T);
if (!ctx->dict_data_pool)
return -1;
diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h
index 06c23a3..21f1cbb 100644
--- a/glusterfsd/src/glusterfsd.h
+++ b/glusterfsd/src/glusterfsd.h
@@ -40,12 +40,17 @@
#define ARGP_LOG_LEVEL_CRITICAL_OPTION "CRITICAL"
#define ARGP_LOG_LEVEL_ERROR_OPTION "ERROR"
#define ARGP_LOG_LEVEL_WARNING_OPTION "WARNING"
-#define ARGP_LOG_LEVEL_INFO_OPTION "INFO"
+#define ARGP_LOG_LEVEL_INFO_OPTION "INFO"
#define ARGP_LOG_LEVEL_DEBUG_OPTION "DEBUG"
#define ENABLE_NO_DAEMON_MODE 1
#define ENABLE_DEBUG_MODE 1
+#define GF_MEMPOOL_COUNT_OF_DICT_T 4096
+/* Considering 4 key/value pairs in a dictionary on an average */
+#define GF_MEMPOOL_COUNT_OF_DATA_T (GF_MEMPOOL_COUNT_OF_DICT_T * 4)
+#define GF_MEMPOOL_COUNT_OF_DATA_PAIR_T (GF_MEMPOOL_COUNT_OF_DICT_T * 4)
+
enum argp_option_keys {
ARGP_VOLFILE_SERVER_KEY = 's',
ARGP_VOLUME_FILE_KEY = 'f',