change default value
This commit is contained in:
parent
2220b7e943
commit
f975d8e0d9
|
@ -281,8 +281,8 @@ typedef enum ELogicConditionType {
|
||||||
#define TSDB_DNODE_ROLE_MGMT 1
|
#define TSDB_DNODE_ROLE_MGMT 1
|
||||||
#define TSDB_DNODE_ROLE_VNODE 2
|
#define TSDB_DNODE_ROLE_VNODE 2
|
||||||
|
|
||||||
#define TSDB_MAX_REPLICA 5
|
#define TSDB_MAX_REPLICA 5
|
||||||
#define TSDB_SYNC_LOG_BUFFER_SIZE 4096
|
#define TSDB_SYNC_LOG_BUFFER_SIZE 4096
|
||||||
#define TSDB_SYNC_LOG_BUFFER_RETENTION (TSDB_SYNC_LOG_BUFFER_SIZE >> 4)
|
#define TSDB_SYNC_LOG_BUFFER_RETENTION (TSDB_SYNC_LOG_BUFFER_SIZE >> 4)
|
||||||
|
|
||||||
#define TSDB_TBNAME_COLUMN_INDEX (-1)
|
#define TSDB_TBNAME_COLUMN_INDEX (-1)
|
||||||
|
@ -413,7 +413,7 @@ typedef enum ELogicConditionType {
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
#define TSDB_MAX_RPC_THREADS 4 // windows pipe only support 4 connections.
|
#define TSDB_MAX_RPC_THREADS 4 // windows pipe only support 4 connections.
|
||||||
#else
|
#else
|
||||||
#define TSDB_MAX_RPC_THREADS 20
|
#define TSDB_MAX_RPC_THREADS 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TSDB_QUERY_TYPE_NON_TYPE 0x00u // none type
|
#define TSDB_QUERY_TYPE_NON_TYPE 0x00u // none type
|
||||||
|
|
|
@ -388,7 +388,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
|
||||||
if (cfgAddInt32(pCfg, "queryRspPolicy", tsQueryRspPolicy, 0, 1, 0) != 0) return -1;
|
if (cfgAddInt32(pCfg, "queryRspPolicy", tsQueryRspPolicy, 0, 1, 0) != 0) return -1;
|
||||||
|
|
||||||
tsNumOfRpcThreads = tsNumOfCores / 2;
|
tsNumOfRpcThreads = tsNumOfCores / 2;
|
||||||
tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 2, 4);
|
tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 2, TSDB_MAX_RPC_THREADS);
|
||||||
if (cfgAddInt32(pCfg, "numOfRpcThreads", tsNumOfRpcThreads, 1, 1024, 0) != 0) return -1;
|
if (cfgAddInt32(pCfg, "numOfRpcThreads", tsNumOfRpcThreads, 1, 1024, 0) != 0) return -1;
|
||||||
|
|
||||||
tsNumOfCommitThreads = tsNumOfCores / 2;
|
tsNumOfCommitThreads = tsNumOfCores / 2;
|
||||||
|
@ -496,7 +496,7 @@ static int32_t taosUpdateServerCfg(SConfig *pCfg) {
|
||||||
pItem = cfgGetItem(tsCfg, "numOfRpcThreads");
|
pItem = cfgGetItem(tsCfg, "numOfRpcThreads");
|
||||||
if (pItem != NULL && pItem->stype == CFG_STYPE_DEFAULT) {
|
if (pItem != NULL && pItem->stype == CFG_STYPE_DEFAULT) {
|
||||||
tsNumOfRpcThreads = numOfCores / 2;
|
tsNumOfRpcThreads = numOfCores / 2;
|
||||||
tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 2, 4);
|
tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 2, TSDB_MAX_RPC_THREADS);
|
||||||
pItem->i32 = tsNumOfRpcThreads;
|
pItem->i32 = tsNumOfRpcThreads;
|
||||||
pItem->stype = stype;
|
pItem->stype = stype;
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,7 +286,7 @@ int32_t dmInitClient(SDnode *pDnode) {
|
||||||
|
|
||||||
int32_t connLimitNum = 30000 / (tsNumOfRpcThreads * 3);
|
int32_t connLimitNum = 30000 / (tsNumOfRpcThreads * 3);
|
||||||
connLimitNum = TMAX(connLimitNum, 500);
|
connLimitNum = TMAX(connLimitNum, 500);
|
||||||
connLimitNum = TMIN(connLimitNum, 3000);
|
connLimitNum = TMIN(connLimitNum, 1000);
|
||||||
|
|
||||||
rpcInit.connLimitNum = connLimitNum;
|
rpcInit.connLimitNum = connLimitNum;
|
||||||
rpcInit.connLimitLock = 1;
|
rpcInit.connLimitLock = 1;
|
||||||
|
|
|
@ -116,7 +116,7 @@ int main(int argc, char *argv[]) {
|
||||||
rpcInit.connType = TAOS_CONN_CLIENT;
|
rpcInit.connType = TAOS_CONN_CLIENT;
|
||||||
rpcInit.connLimitNum = 300;
|
rpcInit.connLimitNum = 300;
|
||||||
rpcInit.connLimitLock = 1;
|
rpcInit.connLimitLock = 1;
|
||||||
rpcInit.supportBatch = 0;
|
rpcInit.supportBatch = 1;
|
||||||
|
|
||||||
rpcDebugFlag = 135;
|
rpcDebugFlag = 135;
|
||||||
for (int i = 1; i < argc; ++i) {
|
for (int i = 1; i < argc; ++i) {
|
||||||
|
|
Loading…
Reference in New Issue