yiguolei commented on code in PR #50817:
URL: https://github.com/apache/doris/pull/50817#discussion_r2126289508
##########
be/src/runtime/workload_group/workload_group.cpp:
##########
@@ -395,6 +392,26 @@ WorkloadGroupInfo WorkloadGroupInfo::parse_topic_info(
min_remote_scan_thread_num =
tworkload_group_info.min_remote_scan_thread_num;
}
+ // NOTE: currently not support set exec thread num in FE.
+ // Hard code here for unified code style
+ int exec_thread_num = config::pipeline_executor_size;
+ if (exec_thread_num <= 0) {
+ exec_thread_num = CpuInfo::num_cores();
+ }
+
+ int num_disk = 1;
+ int num_cpus = 1;
+#ifndef BE_TEST
+ num_disk = ExecEnv::GetInstance()->storage_engine().get_disk_num();
+ num_cpus = std::thread::hardware_concurrency();
+#endif
+ num_disk = std::max(1, num_disk);
+ int min_flush_thread_num = std::max(1,
config::wg_flush_thread_num_per_store);
+ int max_flush_thread_num = num_cpus == 0
+ ? num_disk * min_flush_thread_num
+ : std::min(num_disk *
min_flush_thread_num,
+ num_cpus *
config::wg_flush_thread_num_per_cpu);
Review Comment:
这个变量,我们为什么不是用max_flush_thread_num_per_cpu?
而是重新定义一个wg_flush_thread_num_per_cpu?
还有 wg_flush_thread_num_per_store 也是如此
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]