From 1e9211b354aa49c4180783c79194b1632915fea5 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 19 May 2022 20:32:06 +0800 Subject: [PATCH] refactor: adjust min shm size --- source/common/src/tglobal.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 7b5663c0a9..d74d5a4d4e 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -40,11 +40,11 @@ bool tsPrintAuth = false; // multi process int32_t tsMultiProcess = 0; -int32_t tsMnodeShmSize = TSDB_MAX_WAL_SIZE * 2 + 128; -int32_t tsVnodeShmSize = TSDB_MAX_WAL_SIZE * 10 + 128; -int32_t tsQnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 128; -int32_t tsSnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 128; -int32_t tsBnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 128; +int32_t tsMnodeShmSize = TSDB_MAX_WAL_SIZE * 2 + 1024; +int32_t tsVnodeShmSize = TSDB_MAX_WAL_SIZE * 10 + 1024; +int32_t tsQnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 1024; +int32_t tsSnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 1024; +int32_t tsBnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 1024; int32_t tsNumOfShmThreads = 1; // queue & threads @@ -380,11 +380,11 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddBool(pCfg, "deadLockKillQuery", tsDeadLockKillQuery, 0) != 0) return -1; if (cfgAddInt32(pCfg, "multiProcess", tsMultiProcess, 0, 2, 0) != 0) return -1; - if (cfgAddInt32(pCfg, "mnodeShmSize", tsMnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1; - if (cfgAddInt32(pCfg, "vnodeShmSize", tsVnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1; - if (cfgAddInt32(pCfg, "qnodeShmSize", tsQnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1; - if (cfgAddInt32(pCfg, "snodeShmSize", tsSnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1; - if (cfgAddInt32(pCfg, "bnodeShmSize", tsBnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1; + if (cfgAddInt32(pCfg, "mnodeShmSize", tsMnodeShmSize, TSDB_MAX_WAL_SIZE * 2 + 1024, INT32_MAX, 0) != 0) return -1; + if (cfgAddInt32(pCfg, "vnodeShmSize", tsVnodeShmSize, TSDB_MAX_WAL_SIZE * 2 + 1024, INT32_MAX, 0) != 0) return -1; + if (cfgAddInt32(pCfg, "qnodeShmSize", tsQnodeShmSize, TSDB_MAX_WAL_SIZE * 2 + 1024, INT32_MAX, 0) != 0) return -1; + if (cfgAddInt32(pCfg, "snodeShmSize", tsSnodeShmSize, TSDB_MAX_WAL_SIZE * 2 + 1024, INT32_MAX, 0) != 0) return -1; + if (cfgAddInt32(pCfg, "bnodeShmSize", tsBnodeShmSize, TSDB_MAX_WAL_SIZE * 2 + 1024, INT32_MAX, 0) != 0) return -1; if (cfgAddInt32(pCfg, "mumOfShmThreads", tsNumOfShmThreads, 1, 1024, 0) != 0) return -1; tsNumOfRpcThreads = tsNumOfCores / 2; -- GitLab