Set the max num of direct load thread to 2 * cpu
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user