This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4c54308129d [Enchancement](scan) use CpuInfo::num_cores as default max
scanners count (#51551)
4c54308129d is described below
commit 4c54308129d4bea1b2c58be4d744daa2fd0dd1c1
Author: Pxl <[email protected]>
AuthorDate: Fri Jun 13 10:13:11 2025 +0800
[Enchancement](scan) use CpuInfo::num_cores as default max scanners count
(#51551)
### What problem does this PR solve?
use CpuInfo::num_cores as default max scanners count, too many scanners
may cause performance degradation
---
be/src/pipeline/exec/olap_scan_operator.cpp | 4 ++--
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/be/src/pipeline/exec/olap_scan_operator.cpp
b/be/src/pipeline/exec/olap_scan_operator.cpp
index b642c857dd1..2c999189f12 100644
--- a/be/src/pipeline/exec/olap_scan_operator.cpp
+++ b/be/src/pipeline/exec/olap_scan_operator.cpp
@@ -372,9 +372,9 @@ Status
OlapScanLocalState::_init_scanners(std::list<vectorized::ScannerSPtr>* sc
int max_scanners_count = state()->parallel_scan_max_scanners_count();
// If the `max_scanners_count` was not set,
- // use `config::doris_scanner_thread_pool_thread_num` as the default
value.
+ // use `CpuInfo::num_cores()` as the default value.
if (max_scanners_count <= 0) {
- max_scanners_count = config::doris_scanner_thread_pool_thread_num;
+ max_scanners_count = CpuInfo::num_cores();
}
// Too small value of `min_rows_per_scanner` is meaningless.
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
index 1846f325913..7ef213ab837 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
@@ -1193,7 +1193,7 @@ public class SessionVariable implements Serializable,
Writable {
@VariableMgr.VarAttr(name = PARALLEL_SCAN_MAX_SCANNERS_COUNT, fuzzy = true,
varType = VariableAnnotation.EXPERIMENTAL, needForward = true)
- private int parallelScanMaxScannersCount = 48;
+ private int parallelScanMaxScannersCount = 0;
@VariableMgr.VarAttr(name = PARALLEL_SCAN_MIN_ROWS_PER_SCANNER, fuzzy =
true,
varType = VariableAnnotation.EXPERIMENTAL, needForward = true)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]