提交 9620a673 编写于 作者: J jinhai

Merge branch 'branch-0.3.1' into branch-0.4.0


Former-commit-id: d3f1d181c97f95d9bee881adb0ff9be20aa0d951
......@@ -56,6 +56,7 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-305 - Add CPU core percent metric
- MS-310 - Add milvus CPU utilization ratio and CPU/GPU temperature metrics
- MS-324 - Show error when there is not enough gpu memory to build index
- MS-328 - Check metric type on server start
## New Feature
- MS-180 - Add new mem manager
......
......@@ -66,6 +66,18 @@ 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);
}
}
std::string metric_type = engine_config.GetValue(CONFIG_METRICTYPE, "L2");
if(metric_type != "L2" && metric_type != "IP") {
std::cout << "ERROR! Illegal metric type: " << metric_type << ", available options: L2 or IP" << std::endl;
kill(0, SIGUSR1);
}
//set archive config
......@@ -95,6 +107,7 @@ DBWrapper::DBWrapper() {
}
}
//create db instance
std::string msg = opt.meta.path;
try {
zilliz::milvus::engine::DB::Open(opt, &db_);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册