From f2921551424a97dcc3914cc79a241dca42675b97 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 11 Apr 2012 23:55:58 +0530 Subject: 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 BUG: 809034 Reviewed-on: http://review.gluster.com/3131 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Anand Avati --- glusterfsd/src/glusterfsd.c | 7 ++++--- glusterfsd/src/glusterfsd.h | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 053a7c246..7bc063b2f 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 06c23a342..21f1cbb6c 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', -- cgit