diff --git a/be/src/service/internal_service.cpp b/be/src/service/internal_service.cpp index ff29a7de2dad80..8665fd310675e8 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 12a1e59037fe0d..9925b44e8899bd 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(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));