This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new fbe74004ad0 branch-3.0: [Enhancement](Compaction) Support auto set 
cumu compaction threads num base on cpu num #53133 (#53215)
fbe74004ad0 is described below

commit fbe74004ad00cc046330e0cce6f2f4d5dc73f5be
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Jul 14 21:36:25 2025 +0800

    branch-3.0: [Enhancement](Compaction) Support auto set cumu compaction 
threads num base on cpu num #53133 (#53215)
    
    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 fc601903a54..f7125b97567 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]

Reply via email to