gavinchou commented on code in PR #33974:
URL: https://github.com/apache/doris/pull/33974#discussion_r1576259121
##########
be/src/runtime/exec_env_init.cpp:
##########
@@ -142,6 +142,26 @@ static void init_doris_metrics(const
std::vector<StorePath>& store_paths) {
DorisMetrics::instance()->initialize(init_system_metrics, disk_devices,
network_interfaces);
}
+static pair<int64_t, int64_t> get_buffered_reader_prefetch_threads_num() {
+ int64_t num_cores = doris::CpuInfo::num_cores();
+ auto min_num = config::buffered_reader_prefetch_thread_pool_min_thread_num;
+ auto max_num = config::buffered_reader_prefetch_thread_pool_max_thread_num;
+ auto factor = max_num / min_num;
+ min_num = std::min(num_cores * factor, min_num);
+ max_num = std::min(min_num * factor, max_num);
+ return {min_num, max_num};
+}
+
+static pair<int, int> get_s3_file_writer_upload_threads_num() {
Review Comment:
duplicated code
##########
be/src/common/config.cpp:
##########
@@ -1025,9 +1025,8 @@ DEFINE_mInt32(tablet_path_check_batch_size, "1000");
DEFINE_mInt64(row_column_page_size, "4096");
// it must be larger than or equal to 5MB
DEFINE_mInt64(s3_write_buffer_size, "5242880");
-DEFINE_mInt32(s3_task_check_interval, "60");
-// The timeout config for S3 buffer allocation
-DEFINE_mInt32(s3_writer_buffer_allocation_timeout, "300");
+// Log interval when doing s3 upload task
+DEFINE_mInt32(s3_file_writer_log_interval, "60");
Review Comment:
Add time unit as suffix
##########
be/src/common/config.cpp:
##########
@@ -1212,6 +1211,15 @@ DEFINE_mBool(enable_injection_point, "false");
DEFINE_mBool(ignore_schema_change_check, "false");
+// The min thread num for BufferedReaderPrefetchThreadPool
+DEFINE_Int64(buffered_reader_prefetch_thread_pool_min_thread_num, "16");
Review Comment:
num_xxx is the native way to describe "how many"
xxx_num is something like the index of something, like nth element of an
array
--
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]