提交 8ad33376 编写于 作者: G groot

MS-312 Set openmp thread number by config


Former-commit-id: cc39efca30942e48bca3ff25fa98843897c5c80e
上级 64e0c927
......@@ -66,6 +66,12 @@ DBWrapper::DBWrapper() {
if(omp_thread > 0) {
omp_set_num_threads(omp_thread);
SERVER_LOG_DEBUG << "Specify openmp thread number: " << omp_thread;
} else {
uint32_t sys_thread_cnt = 8;
if(CommonUtil::GetSystemAvailableThreads(sys_thread_cnt)) {
omp_thread = (int32_t)ceil(sys_thread_cnt*0.5);
omp_set_num_threads(omp_thread);
}
}
//set archive config
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册