diff options
Diffstat (limited to 'glusterfsd')
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 7 | ||||
-rw-r--r-- | 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', |