Skip to content

Commit 22e4664

Browse files
committed
add min scan thread num for workload group's scan thread
1 parent 5fb500d commit 22e4664

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

be/src/common/config.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ DEFINE_Validator(doris_scanner_thread_pool_thread_num, [](const int config) -> b
250250
}
251251
return true;
252252
});
253+
DEFINE_Int32(doris_scanner_min_thread_pool_thread_num, "8");
253254
DEFINE_Int32(remote_split_source_batch_size, "10240");
254255
DEFINE_Int32(doris_max_remote_scanner_thread_pool_thread_num, "-1");
255256
// number of olap scanner thread pool queue size

be/src/common/config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ DECLARE_mInt64(doris_blocking_priority_queue_wait_timeout_ms);
299299
// number of scanner thread pool size for olap table
300300
// and the min thread num of remote scanner thread pool
301301
DECLARE_mInt32(doris_scanner_thread_pool_thread_num);
302+
DECLARE_mInt32(doris_scanner_min_thread_pool_thread_num);
302303
// number of batch size to fetch the remote split source
303304
DECLARE_mInt32(remote_split_source_batch_size);
304305
// max number of remote scanner thread pool size

be/src/runtime/workload_group/workload_group.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ WorkloadGroupInfo WorkloadGroupInfo::parse_topic_info(
316316
}
317317

318318
// 11 min remote scan thread num
319-
int min_remote_scan_thread_num = vectorized::ScannerScheduler::get_remote_scan_thread_num();
319+
int min_remote_scan_thread_num = config::doris_scanner_min_thread_pool_thread_num;
320320
if (tworkload_group_info.__isset.min_remote_scan_thread_num &&
321321
tworkload_group_info.min_remote_scan_thread_num > 0) {
322322
min_remote_scan_thread_num = tworkload_group_info.min_remote_scan_thread_num;
@@ -396,7 +396,7 @@ void WorkloadGroup::upsert_task_scheduler(WorkloadGroupInfo* tg_info, ExecEnv* e
396396
std::make_unique<vectorized::SimplifiedScanScheduler>("Scan_" + tg_name,
397397
cg_cpu_ctl_ptr);
398398
Status ret = scan_scheduler->start(config::doris_scanner_thread_pool_thread_num,
399-
config::doris_scanner_thread_pool_thread_num,
399+
config::doris_scanner_min_thread_pool_thread_num,
400400
config::doris_scanner_thread_pool_queue_size);
401401
if (ret.ok()) {
402402
_scan_task_sched = std::move(scan_scheduler);
@@ -415,7 +415,8 @@ void WorkloadGroup::upsert_task_scheduler(WorkloadGroupInfo* tg_info, ExecEnv* e
415415
std::unique_ptr<vectorized::SimplifiedScanScheduler> remote_scan_scheduler =
416416
std::make_unique<vectorized::SimplifiedScanScheduler>("RScan_" + tg_name,
417417
cg_cpu_ctl_ptr);
418-
Status ret = remote_scan_scheduler->start(remote_max_thread_num, remote_max_thread_num,
418+
Status ret = remote_scan_scheduler->start(remote_max_thread_num,
419+
config::doris_scanner_min_thread_pool_thread_num,
419420
remote_scan_thread_queue_size);
420421
if (ret.ok()) {
421422
_remote_scan_task_sched = std::move(remote_scan_scheduler);

0 commit comments

Comments
 (0)