-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Support to configure the number of http worker threads on FE #37530
Conversation
*/ | ||
@ConfField | ||
public static int http_worker_threads_num = 0; | ||
|
||
/** | ||
* The backlog_num for netty http server | ||
* When you enlarge this backlog_num, you should ensure its value larger than |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The most risky bug in this code is:
Using the default value of http_worker_threads_num as 0 is risky in some cases.
You can modify the code like this:
@ConfField
public static int http_worker_threads_num = 2 * Runtime.getRuntime().availableProcessors();
97bf519
to
8934980
Compare
@@ -935,6 +935,12 @@ Compaction Score 代表了一个表分区是否值得进行 Compaction 的评分 | |||
- 含义:FE 节点上 HTTP 服务器的端口。 | |||
- 默认值:8030 | |||
|
|||
#### http_worker_threads_num | |||
|
|||
- 含义:Http Server 用于处理 HTTP 请求的线程数。如果配置为非正数,线程数将设置为 CPU 核数的 2 倍。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这样感觉更容易理解一些:
... 如果配置为0,线程数将设置为 CPU 核数的 2 倍。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里也想说明一下配置为负数的行为,改成 "如果配置为负数或0"是不是好些?
c8bbf19
to
3b77565
Compare
@wyb @gengjun-git PTAL again |
Head branch was pushed to by a user without write access
3b77565
to
4eb8589
Compare
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
4eb8589
to
9bd1c94
Compare
Quality Gate failedFailed conditions C Maintainability Rating on New Code (required ≥ A) See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
[FE Incremental Coverage Report]✅ pass : 3 / 3 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
@Mergifyio backport branch-3.2 |
@Mergifyio backport branch-3.1 |
@Mergifyio backport branch-2.5 |
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
…on FE (#37530) Why I'm doing: Http worker threads on FE are used to deal with http requests. Some requests may do heavy operations which will block threads, such as transaction stream load commit, and other operations that need to get lock. As a result, http server can't deal with other requests. Before optimizing these heavy operations, we first make the number of http worker threads to be configurable, and increase it as a candidate solution if the problem happens. What I'm doing: Add a configuration to adjust the number of http worker threads on FE Signed-off-by: PengFei Li <[email protected]> (cherry picked from commit d24bede)
…on FE (#37530) Why I'm doing: Http worker threads on FE are used to deal with http requests. Some requests may do heavy operations which will block threads, such as transaction stream load commit, and other operations that need to get lock. As a result, http server can't deal with other requests. Before optimizing these heavy operations, we first make the number of http worker threads to be configurable, and increase it as a candidate solution if the problem happens. What I'm doing: Add a configuration to adjust the number of http worker threads on FE Signed-off-by: PengFei Li <[email protected]> (cherry picked from commit d24bede) # Conflicts: # docs/en/administration/Configuration.md # docs/zh/administration/Configuration.md
…on FE (#37530) Why I'm doing: Http worker threads on FE are used to deal with http requests. Some requests may do heavy operations which will block threads, such as transaction stream load commit, and other operations that need to get lock. As a result, http server can't deal with other requests. Before optimizing these heavy operations, we first make the number of http worker threads to be configurable, and increase it as a candidate solution if the problem happens. What I'm doing: Add a configuration to adjust the number of http worker threads on FE Signed-off-by: PengFei Li <[email protected]> (cherry picked from commit d24bede) # Conflicts: # docs/en/administration/FE_configuration.md # docs/zh/administration/FE_configuration.md
…on FE (#37530) Why I'm doing: Http worker threads on FE are used to deal with http requests. Some requests may do heavy operations which will block threads, such as transaction stream load commit, and other operations that need to get lock. As a result, http server can't deal with other requests. Before optimizing these heavy operations, we first make the number of http worker threads to be configurable, and increase it as a candidate solution if the problem happens. What I'm doing: Add a configuration to adjust the number of http worker threads on FE Signed-off-by: PengFei Li <[email protected]> (cherry picked from commit d24bede) # Conflicts: # docs/en/administration/FE_configuration.md # docs/zh/administration/FE_configuration.md
…on FE (backport StarRocks#37530) Signed-off-by: PengFei Li <[email protected]>
…on FE (backport StarRocks#37530) Signed-off-by: PengFei Li <[email protected]>
…on FE (backport StarRocks#37530) Signed-off-by: PengFei Li <[email protected]>
…on FE (backport #37530) (#37748) Co-authored-by: PengFei Li <[email protected]>
…on FE (backport #37530) (#37774) backport #37530 Signed-off-by: PengFei Li <[email protected]>
…on FE (backport #37530) (#37777) backport #37530 Signed-off-by: PengFei Li <[email protected]>
…on FE (backport #37530) (#37778) backport #37530 Signed-off-by: PengFei Li <[email protected]>
…on FE (StarRocks#37530) Why I'm doing: Http worker threads on FE are used to deal with http requests. Some requests may do heavy operations which will block threads, such as transaction stream load commit, and other operations that need to get lock. As a result, http server can't deal with other requests. Before optimizing these heavy operations, we first make the number of http worker threads to be configurable, and increase it as a candidate solution if the problem happens. What I'm doing: Add a configuration to adjust the number of http worker threads on FE Signed-off-by: PengFei Li <[email protected]> Signed-off-by: 张敢 <[email protected]>
Why I'm doing:
Http worker threads on FE are used to deal with http requests. Some requests may do heavy operations which will block threads, such as transaction stream load commit, and other operations that need to get lock. As a result, http server can't deal with other requests. Before optimizing these heavy operations, we first make the number of http worker threads to be configurable, and increase it as a candidate solution if the problem happens.
What I'm doing:
Add a configuration to adjust the number of http worker threads on FE
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: