mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
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:
parent
cfe8b0a364
commit
cdb2b98a3e
@ -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)},
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user