add conf stat_optimizer_enable (#3986)

* add conf stat_optimizer_enable

Signed-off-by: shengjun.li <shengjun.li@zilliz.com>

* modify the blas threshold

Signed-off-by: shengjun.li <shengjun.li@zilliz.com>
This commit is contained in:
shengjun.li 2020-10-14 17:50:23 +08:00 committed by GitHub
parent cfe8b0a364
commit cdb2b98a3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 5 deletions

View File

@ -170,12 +170,15 @@ InitConfig() {
&config.engine.search_combine_nq.value, 64)},
{"engine.use_blas_threshold",
CreateIntegerConfig("engine.use_blas_threshold", 0, std::numeric_limits<int64_t>::max(),
&config.engine.use_blas_threshold.value, 1100)},
&config.engine.use_blas_threshold.value, 16385)},
{"engine.omp_thread_num", CreateIntegerConfig("engine.omp_thread_num", 0, std::numeric_limits<int64_t>::max(),
&config.engine.omp_thread_num.value, 0)},
{"engine.simd_type",
CreateEnumConfig("engine.simd_type", &SimdMap, &config.engine.simd_type.value, SimdType::AUTO)},
{"engine.stat_optimizer_enable",
CreateBoolConfig("engine.stat_optimizer_enable", &config.engine.stat_optimizer_enable.value, true)},
{"system.lock.enable", CreateBoolConfig("system.lock.enable", &config.system.lock.enable.value, true)},
{"transcript.enable", CreateBoolConfig("transcript.enable", &config.transcript.enable.value, false)},

View File

@ -119,6 +119,7 @@ struct ServerConfig {
Integer use_blas_threshold{0};
Integer omp_thread_num{0};
Integer simd_type{0};
Bool stat_optimizer_enable{true};
} engine;
struct GPU {

View File

@ -26,7 +26,6 @@
#include "db/snapshot/Snapshots.h"
#include "insert/MemManagerFactory.h"
#include "knowhere/index/vector_index/helpers/BuilderSuspend.h"
#include "knowhere/index/vector_index/helpers/FaissIO.h"
#include "metrics/Metrics.h"
#include "metrics/SystemInfo.h"
#include "scheduler/Definition.h"
@ -99,8 +98,6 @@ DBImpl::Start() {
return Status::OK();
}
knowhere::enable_faiss_logging();
// LOG_ENGINE_TRACE_ << "DB service start";
SetAvailable(true);

View File

@ -16,6 +16,7 @@
#include "config/ServerConfig.h"
#include "faiss/FaissHook.h"
#include "knowhere/index/vector_index/helpers/FaissIO.h"
#include "scheduler/Utils.h"
#include "utils/Error.h"
#include "utils/Log.h"
@ -97,6 +98,10 @@ KnowhereResource::Initialize() {
}
#endif
if (config.engine.stat_optimizer_enable()) {
knowhere::enable_faiss_logging();
}
return Status::OK();
}

View File

@ -23,7 +23,7 @@ class AdvancedConfigDto : public ODTO {
DTO_FIELD(Int64, cpu_cache_capacity) = VALUE_CONFIG_CPU_CACHE_CAPACITY_DEFAULT;
DTO_FIELD(Boolean, cache_insert_data) = VALUE_CONFIG_CACHE_INSERT_DATA_DEFAULT;
DTO_FIELD(Int64, use_blas_threshold) = 1100;
DTO_FIELD(Int64, use_blas_threshold) = 16385;
#ifdef MILVUS_GPU_VERSION
DTO_FIELD(Int64, gpu_search_threshold) = 1000;