This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 7a5e166d659 branch-3.1: [Enhancement](Compaction) Support auto set
cumu compaction threads num base on cpu num #53133 (#53216)
7a5e166d659 is described below
commit 7a5e166d659666a503d0ebd07234b4e0d86683ec
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jul 15 11:10:17 2025 +0800
branch-3.1: [Enhancement](Compaction) Support auto set cumu compaction
threads num base on cpu num #53133 (#53216)
Cherry-picked from #53133
Co-authored-by: abmdocrt <[email protected]>
---
be/src/olap/olap_server.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp
index d609515d759..b64d278173c 100644
--- a/be/src/olap/olap_server.cpp
+++ b/be/src/olap/olap_server.cpp
@@ -188,7 +188,8 @@ CompactionSubmitRegistry::TabletSet&
CompactionSubmitRegistry::_get_tablet_set(
static int32_t get_cumu_compaction_threads_num(size_t data_dirs_num) {
int32_t threads_num = config::max_cumu_compaction_threads;
if (threads_num == -1) {
- threads_num = data_dirs_num;
+ int num_cores = doris::CpuInfo::num_cores();
+ threads_num = std::max<size_t>(data_dirs_num, num_cores / 6);
}
threads_num = threads_num <= 0 ? 1 : threads_num;
return threads_num;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]