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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new ddf63dc2f05 branch-2.1: [enhancement](threadpool) reduce thread pool 
for arrow flight and spill io threads #48530 (#48556)
ddf63dc2f05 is described below

commit ddf63dc2f057ec300839fbb685833c31ed74ae7e
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Mar 3 18:51:48 2025 +0800

    branch-2.1: [enhancement](threadpool) reduce thread pool for arrow flight 
and spill io threads #48530 (#48556)
    
    Cherry-picked from #48530
    
    Co-authored-by: yiguolei <[email protected]>
---
 be/src/service/internal_service.cpp       | 2 +-
 be/src/vec/spill/spill_stream_manager.cpp | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/be/src/service/internal_service.cpp 
b/be/src/service/internal_service.cpp
index ff29a7de2da..8665fd31067 100644
--- a/be/src/service/internal_service.cpp
+++ b/be/src/service/internal_service.cpp
@@ -227,7 +227,7 @@ PInternalServiceImpl::PInternalServiceImpl(ExecEnv* 
exec_env)
                            "brpc_light"),
           _arrow_flight_work_pool(config::brpc_arrow_flight_work_pool_threads 
!= -1
                                           ? 
config::brpc_arrow_flight_work_pool_threads
-                                          : std::max(512, CpuInfo::num_cores() 
* 16),
+                                          : std::max(512, CpuInfo::num_cores() 
* 2),
                                   
config::brpc_arrow_flight_work_pool_max_queue_size != -1
                                           ? 
config::brpc_arrow_flight_work_pool_max_queue_size
                                           : std::max(20480, 
CpuInfo::num_cores() * 640),
diff --git a/be/src/vec/spill/spill_stream_manager.cpp 
b/be/src/vec/spill/spill_stream_manager.cpp
index 12a1e59037f..9925b44e889 100644
--- a/be/src/vec/spill/spill_stream_manager.cpp
+++ b/be/src/vec/spill/spill_stream_manager.cpp
@@ -81,8 +81,9 @@ Status SpillStreamManager::init() {
         }
         store->update_spill_data_usage(spill_data_size);
     }
+    // Reduce min threads to 1, to avoid occupy too many threads at start time.
     static_cast<void>(ThreadPoolBuilder("SpillIOThreadPool")
-                              
.set_min_threads(config::spill_io_thread_pool_thread_num)
+                              .set_min_threads(1)
                               
.set_max_threads(config::spill_io_thread_pool_thread_num)
                               
.set_max_queue_size(config::spill_io_thread_pool_queue_size)
                               .build(&_spill_io_thread_pool));


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to