remove gpu_cache_capacity config

Former-commit-id: 94abdd662201c9b19c79d7b7170f3e9af2c39e81
This commit is contained in:
starlord 2019-09-12 11:25:21 +08:00
parent d4ea0151eb
commit a7ea9b2817
5 changed files with 8 additions and 15 deletions

View File

@ -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}

View File

@ -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

View File

@ -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 -f 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}"

View File

@ -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<Cache>(cap, 1UL<<32);

View File

@ -305,7 +305,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;