Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6dd6a007
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6dd6a007
编写于
4月 07, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
config thread num of qnode
上级
0a5cfe75
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
18 addition
and
9 deletion
+18
-9
include/common/tglobal.h
include/common/tglobal.h
+2
-0
source/common/src/tglobal.c
source/common/src/tglobal.c
+12
-0
source/dnode/mgmt/qm/qmWorker.c
source/dnode/mgmt/qm/qmWorker.c
+4
-9
未找到文件。
include/common/tglobal.h
浏览文件 @
6dd6a007
...
@@ -68,6 +68,8 @@ extern int32_t tsNumOfVnodeFetchThreads;
...
@@ -68,6 +68,8 @@ extern int32_t tsNumOfVnodeFetchThreads;
extern
int32_t
tsNumOfVnodeWriteThreads
;
extern
int32_t
tsNumOfVnodeWriteThreads
;
extern
int32_t
tsNumOfVnodeSyncThreads
;
extern
int32_t
tsNumOfVnodeSyncThreads
;
extern
int32_t
tsNumOfVnodeMergeThreads
;
extern
int32_t
tsNumOfVnodeMergeThreads
;
extern
int32_t
tsNumOfQnodeQueryThreads
;
extern
int32_t
tsNumOfQnodeFetchThreads
;
// monitor
// monitor
extern
bool
tsEnableMonitor
;
extern
bool
tsEnableMonitor
;
...
...
source/common/src/tglobal.c
浏览文件 @
6dd6a007
...
@@ -62,6 +62,8 @@ int32_t tsNumOfVnodeFetchThreads = 2;
...
@@ -62,6 +62,8 @@ int32_t tsNumOfVnodeFetchThreads = 2;
int32_t
tsNumOfVnodeWriteThreads
=
2
;
int32_t
tsNumOfVnodeWriteThreads
=
2
;
int32_t
tsNumOfVnodeSyncThreads
=
2
;
int32_t
tsNumOfVnodeSyncThreads
=
2
;
int32_t
tsNumOfVnodeMergeThreads
=
2
;
int32_t
tsNumOfVnodeMergeThreads
=
2
;
int32_t
tsNumOfQnodeQueryThreads
=
2
;
int32_t
tsNumOfQnodeFetchThreads
=
2
;
// monitor
// monitor
bool
tsEnableMonitor
=
true
;
bool
tsEnableMonitor
=
true
;
...
@@ -409,6 +411,14 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
...
@@ -409,6 +411,14 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
tsNumOfVnodeMergeThreads
=
TRANGE
(
tsNumOfVnodeMergeThreads
,
1
,
1
);
tsNumOfVnodeMergeThreads
=
TRANGE
(
tsNumOfVnodeMergeThreads
,
1
,
1
);
if
(
cfgAddInt32
(
pCfg
,
"numOfVnodeMergeThreads"
,
tsNumOfVnodeMergeThreads
,
1
,
1024
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"numOfVnodeMergeThreads"
,
tsNumOfVnodeMergeThreads
,
1
,
1024
,
0
)
!=
0
)
return
-
1
;
tsNumOfQnodeQueryThreads
=
tsNumOfCores
/
2
;
tsNumOfQnodeQueryThreads
=
TMIN
(
tsNumOfQnodeQueryThreads
,
1
);
if
(
cfgAddInt32
(
pCfg
,
"numOfQnodeQueryThreads"
,
tsNumOfQnodeQueryThreads
,
1
,
1024
,
0
)
!=
0
)
return
-
1
;
tsNumOfQnodeFetchThreads
=
tsNumOfCores
/
2
;
tsNumOfQnodeFetchThreads
=
TRANGE
(
tsNumOfQnodeFetchThreads
,
2
,
4
);
if
(
cfgAddInt32
(
pCfg
,
"numOfQnodeFetchThreads"
,
tsNumOfQnodeFetchThreads
,
1
,
1024
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"monitor"
,
tsEnableMonitor
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"monitor"
,
tsEnableMonitor
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"monitorInterval"
,
tsMonitorInterval
,
1
,
360000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"monitorInterval"
,
tsMonitorInterval
,
1
,
360000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddString
(
pCfg
,
"monitorFqdn"
,
tsMonitorFqdn
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddString
(
pCfg
,
"monitorFqdn"
,
tsMonitorFqdn
,
0
)
!=
0
)
return
-
1
;
...
@@ -540,6 +550,8 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
...
@@ -540,6 +550,8 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
tsNumOfVnodeWriteThreads
=
cfgGetItem
(
pCfg
,
"numOfVnodeWriteThreads"
)
->
i32
;
tsNumOfVnodeWriteThreads
=
cfgGetItem
(
pCfg
,
"numOfVnodeWriteThreads"
)
->
i32
;
tsNumOfVnodeSyncThreads
=
cfgGetItem
(
pCfg
,
"numOfVnodeSyncThreads"
)
->
i32
;
tsNumOfVnodeSyncThreads
=
cfgGetItem
(
pCfg
,
"numOfVnodeSyncThreads"
)
->
i32
;
tsNumOfVnodeMergeThreads
=
cfgGetItem
(
pCfg
,
"numOfVnodeMergeThreads"
)
->
i32
;
tsNumOfVnodeMergeThreads
=
cfgGetItem
(
pCfg
,
"numOfVnodeMergeThreads"
)
->
i32
;
tsNumOfQnodeQueryThreads
=
cfgGetItem
(
pCfg
,
"numOfQnodeQueryThreads"
)
->
i32
;
tsNumOfQnodeFetchThreads
=
cfgGetItem
(
pCfg
,
"numOfQnodeFetchThreads"
)
->
i32
;
tsEnableMonitor
=
cfgGetItem
(
pCfg
,
"monitor"
)
->
bval
;
tsEnableMonitor
=
cfgGetItem
(
pCfg
,
"monitor"
)
->
bval
;
tsMonitorInterval
=
cfgGetItem
(
pCfg
,
"monitorInterval"
)
->
i32
;
tsMonitorInterval
=
cfgGetItem
(
pCfg
,
"monitorInterval"
)
->
i32
;
...
...
source/dnode/mgmt/qm/qmWorker.c
浏览文件 @
6dd6a007
...
@@ -106,13 +106,8 @@ int32_t qmGetQueueSize(SMgmtWrapper *pWrapper, int32_t vgId, EQueueType qtype) {
...
@@ -106,13 +106,8 @@ int32_t qmGetQueueSize(SMgmtWrapper *pWrapper, int32_t vgId, EQueueType qtype) {
}
}
int32_t
qmStartWorker
(
SQnodeMgmt
*
pMgmt
)
{
int32_t
qmStartWorker
(
SQnodeMgmt
*
pMgmt
)
{
int32_t
maxFetchThreads
=
4
;
SSingleWorkerCfg
queryCfg
=
{.
min
=
tsNumOfVnodeQueryThreads
,
int32_t
minFetchThreads
=
TMIN
(
maxFetchThreads
,
tsNumOfCores
);
.
max
=
tsNumOfVnodeQueryThreads
,
int32_t
minQueryThreads
=
TMAX
((
int32_t
)(
tsNumOfCores
*
1
),
1
);
int32_t
maxQueryThreads
=
minQueryThreads
;
SSingleWorkerCfg
queryCfg
=
{.
min
=
minQueryThreads
,
.
max
=
maxQueryThreads
,
.
name
=
"qnode-query"
,
.
name
=
"qnode-query"
,
.
fp
=
(
FItem
)
qmProcessQueryQueue
,
.
fp
=
(
FItem
)
qmProcessQueryQueue
,
.
param
=
pMgmt
};
.
param
=
pMgmt
};
...
@@ -122,8 +117,8 @@ int32_t qmStartWorker(SQnodeMgmt *pMgmt) {
...
@@ -122,8 +117,8 @@ int32_t qmStartWorker(SQnodeMgmt *pMgmt) {
return
-
1
;
return
-
1
;
}
}
SSingleWorkerCfg
fetchCfg
=
{.
min
=
min
FetchThreads
,
SSingleWorkerCfg
fetchCfg
=
{.
min
=
tsNumOfQnode
FetchThreads
,
.
max
=
max
FetchThreads
,
.
max
=
tsNumOfQnode
FetchThreads
,
.
name
=
"qnode-fetch"
,
.
name
=
"qnode-fetch"
,
.
fp
=
(
FItem
)
qmProcessFetchQueue
,
.
fp
=
(
FItem
)
qmProcessFetchQueue
,
.
param
=
pMgmt
};
.
param
=
pMgmt
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录