Skip to content

Commit

Permalink
add config
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteYue committed Apr 23, 2024
1 parent e2ac5c8 commit 6a7f90b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,12 +1212,13 @@ 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");

// The max thread num for BufferedReaderPrefetchThreadPool
DEFINE_Int64(buffered_reader_prefetch_thread_pool_max_thread_num, "64");

// The min thread num for S3FileUploadThreadPool
DEFINE_Int64(s3_file_upload_thread_pool_min_thread_num, "16");

// The max thread num for S3FileUploadThreadPool
DEFINE_Int64(s3_file_upload_thread_pool_max_thread_num, "64");

// clang-format off
Expand Down
7 changes: 4 additions & 3 deletions be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1297,12 +1297,13 @@ DECLARE_mBool(enable_injection_point);

DECLARE_mBool(ignore_schema_change_check);

// The min thread num for BufferedReaderPrefetchThreadPool
DECLARE_Int64(buffered_reader_prefetch_thread_pool_min_thread_num);

// The max thread num for BufferedReaderPrefetchThreadPool
DECLARE_Int64(buffered_reader_prefetch_thread_pool_max_thread_num);

// The min thread num for S3FileUploadThreadPool
DECLARE_Int64(s3_file_upload_thread_pool_min_thread_num);

// The max thread num for S3FileUploadThreadPool
DECLARE_Int64(s3_file_upload_thread_pool_max_thread_num);

#ifdef BE_TEST
Expand Down
8 changes: 4 additions & 4 deletions be/src/runtime/exec_env_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ Status ExecEnv::_init(const std::vector<StorePath>& store_paths,
.build(&_send_batch_thread_pool));

static_cast<void>(ThreadPoolBuilder("BufferedReaderPrefetchThreadPool")
.set_min_threads(16)
.set_max_threads(64)
.set_min_threads(config::buffered_reader_prefetch_thread_pool_min_thread_num)
.set_max_threads(config::buffered_reader_prefetch_thread_pool_max_thread_num)
.build(&_buffered_reader_prefetch_thread_pool));

static_cast<void>(ThreadPoolBuilder("SendTableStatsThreadPool")
Expand All @@ -200,8 +200,8 @@ Status ExecEnv::_init(const std::vector<StorePath>& store_paths,
.build(&_s3_downloader_download_poller_thread_pool));

static_cast<void>(ThreadPoolBuilder("S3FileUploadThreadPool")
.set_min_threads(16)
.set_max_threads(64)
.set_min_threads(config::s3_file_upload_thread_pool_min_thread_num)
.set_max_threads(config::s3_file_upload_thread_pool_max_thread_num)
.build(&_s3_file_upload_thread_pool));

// min num equal to fragment pool's min num
Expand Down

0 comments on commit 6a7f90b

Please sign in to comment.