diff --git a/cpp/build.sh b/cpp/build.sh index f21e2234faf7f087660c059e2a0e2d939e632315..86af2d42e0e15203e71412716e4b0422db252e3d 100755 --- a/cpp/build.sh +++ b/cpp/build.sh @@ -9,15 +9,12 @@ DB_PATH="/opt/milvus" PROFILING="OFF" BUILD_FAISS_WITH_MKL="OFF" USE_JFROG_CACHE="OFF" -KNOWHERE_BUILD_DIR="`pwd`/src/core/cmake_build" -KNOWHERE_OPTIONS="-t ${BUILD_TYPE}" -while getopts "p:d:t:k:uhrcgmj" arg +while getopts "p:d:t:uhrcgmj" arg do case $arg in t) BUILD_TYPE=$OPTARG # BUILD_TYPE - KNOWHERE_OPTIONS="-t ${BUILD_TYPE}" ;; u) echo "Build and run unittest cases" ; @@ -41,15 +38,11 @@ do g) PROFILING="ON" ;; - k) - KNOWHERE_BUILD_DIR=$OPTARG - ;; m) BUILD_FAISS_WITH_MKL="ON" ;; j) USE_JFROG_CACHE="ON" - KNOWHERE_OPTIONS="${KNOWHERE_OPTIONS} -j" ;; h) # help echo " @@ -62,7 +55,6 @@ parameter: -r: remove previous build directory(default: OFF) -c: code coverage(default: OFF) -g: profiling(default: OFF) --k: specify knowhere header/binary path -m: build faiss with MKL(default: OFF) -j: use jfrog cache build directory @@ -96,7 +88,6 @@ if [[ ${MAKE_CLEAN} == "ON" ]]; then -DMILVUS_DB_PATH=${DB_PATH} \ -DMILVUS_ENABLE_PROFILING=${PROFILING} \ -DBUILD_FAISS_WITH_MKL=${BUILD_FAISS_WITH_MKL} \ - -DKNOWHERE_BUILD_DIR=${KNOWHERE_BUILD_DIR} \ -DUSE_JFROG_CACHE=${USE_JFROG_CACHE} \ ../" echo ${CMAKE_CMD} diff --git a/cpp/conf/server_config.template b/cpp/conf/server_config.template index 7b59f17a053163e8f7b1de03594f4e5486e8e733..8f10e4cc6c447b0816dbf88c3c41d4897f733efc 100644 --- a/cpp/conf/server_config.template +++ b/cpp/conf/server_config.template @@ -31,8 +31,6 @@ cache_config: cpu_cache_capacity: 16 # how many memory are used as cache, unit: GB, range: 0 ~ less than total memory cpu_cache_free_percent: 0.85 # old data will be erased from cache when cache is full, this value specify how much memory should be kept, range: greater than zero ~ 1.0 insert_cache_immediately: false # insert data will be load into cache immediately for hot query - gpu_cache_capacity: 5 # how many memory are used as cache in gpu, unit: GB, RANGE: 0 ~ less than total memory - gpu_cache_free_percent: 0.85 # old data will be erased from cache when cache is full, this value specify how much memory should be kept, range: greater than zero ~ 1.0 engine_config: use_blas_threshold: 20 diff --git a/cpp/coverage.sh b/cpp/coverage.sh index 701416921ff70f72292bebb5b43b4b49b92d5723..d83d1a3d8eae40b4f165ff5cf10e9fe149e571aa 100755 --- a/cpp/coverage.sh +++ b/cpp/coverage.sh @@ -13,6 +13,10 @@ DIR_LCOV_OUTPUT="lcov_out" DIR_GCNO="cmake_build" DIR_UNITTEST="milvus/unittest" + +# delete old code coverage info files +rm -rf lcov_out +rm FILE_INFO_BASE FILE_INFO_MILVUS FILE_INFO_OUTPUT FILE_INFO_OUTPUT_NEW MYSQL_USER_NAME=root MYSQL_PASSWORD=Fantast1c @@ -84,7 +88,7 @@ done mysql_exc "DROP DATABASE IF EXISTS ${MYSQL_DB_NAME};" -# gen test converage +# gen code coverage ${LCOV_CMD} -d ${DIR_GCNO} -o "${FILE_INFO_MILVUS}" -c # merge coverage ${LCOV_CMD} -a ${FILE_INFO_BASE} -a ${FILE_INFO_MILVUS} -o "${FILE_INFO_OUTPUT}" diff --git a/cpp/src/cache/GpuCacheMgr.cpp b/cpp/src/cache/GpuCacheMgr.cpp index 0b6a6132d80665bd5deb6a2f0e7e61ef9eb42168..5c1afa3f5c962694f90de8e715b080ea71a004ee 100644 --- a/cpp/src/cache/GpuCacheMgr.cpp +++ b/cpp/src/cache/GpuCacheMgr.cpp @@ -23,7 +23,7 @@ namespace { GpuCacheMgr::GpuCacheMgr() { server::ConfigNode& config = server::ServerConfig::GetInstance().GetConfig(server::CONFIG_CACHE); - int64_t cap = config.GetInt64Value(server::CONFIG_GPU_CACHE_CAPACITY, 2); + int64_t cap = config.GetInt64Value(server::CONFIG_GPU_CACHE_CAPACITY, 0); cap *= G_BYTE; cache_ = std::make_shared(cap, 1UL<<32); diff --git a/cpp/src/server/ServerConfig.cpp b/cpp/src/server/ServerConfig.cpp index fbe35dab333533d2129e540fddfa6fce681a4adc..13076db2997f20c446f1e03825560c8ef980d5a9 100644 --- a/cpp/src/server/ServerConfig.cpp +++ b/cpp/src/server/ServerConfig.cpp @@ -304,7 +304,7 @@ ServerConfig::CheckCacheConfig() { okay = false; } - std::string gpu_cache_capacity_str = cache_config.GetValue(CONFIG_GPU_CACHE_CAPACITY, "5"); + std::string gpu_cache_capacity_str = cache_config.GetValue(CONFIG_GPU_CACHE_CAPACITY, "0"); if (ValidationUtil::ValidateStringIsNumber(gpu_cache_capacity_str) != SERVER_SUCCESS) { std::cerr << "ERROR: gpu_cache_capacity " << gpu_cache_capacity_str << " is not a number" << std::endl; okay = false;