Set the max num of direct load thread to 2 * cpu

This commit is contained in:
coolfishchen
2023-06-30 02:53:41 +00:00
committed by ob-robot
parent 96d2098cdf
commit 81cbd7e0fc
4 changed files with 4 additions and 4 deletions

View File

@ -1919,7 +1919,7 @@ int ObLoadDataDirectImpl::init_execute_param()
} else {
hint_parallel = hint_parallel > 0 ? hint_parallel : DEFAULT_PARALLEL_THREAD_COUNT;
execute_param_.parallel_ = hint_parallel;
execute_param_.thread_count_ = MIN(hint_parallel, (int64_t)tenant->unit_max_cpu());
execute_param_.thread_count_ = MIN(hint_parallel, (int64_t)tenant->unit_max_cpu() * 2);
execute_param_.data_mem_usage_limit_ =
MIN(execute_param_.thread_count_ * 2, MAX_DATA_MEM_USAGE_LIMIT);
}

View File

@ -62,7 +62,7 @@ int ObTableDirectInsertCtx::init(ObExecContext *exec_ctx,
param.table_id_ = table_id;
param.batch_size_ = 100;
param.parallel_ = parallel;
param.session_count_ = MIN(parallel, (int64_t)tenant->unit_max_cpu());
param.session_count_ = MIN(parallel, (int64_t)tenant->unit_max_cpu() * 2);
param.px_mode_ = true;
param.online_opt_stat_gather_ = false;
param.need_sort_ = true;