Merge branch 'branch-0.3.1' into 'branch-0.3.1'

MS-249 Check machine hardware during initialize

See merge request megasearch/milvus!260

Former-commit-id: 968826b56a69e561636bca6132d6f763a29e3632
This commit is contained in:
peng.xu 2019-07-22 14:32:59 +08:00
commit d0a5e8613c
2 changed files with 4 additions and 1 deletions

View File

@ -34,7 +34,7 @@ license_config: # license configure
cache_config: # cache configure
cpu_cache_capacity: 16 # how many memory are used as cache, unit: GB, range: 0 ~ less than total memory
cache_free_percent: 0.85 # how much memory should be free when cache is full, range: greater than zero ~ 1.0
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
engine_config:

View File

@ -163,6 +163,9 @@ void Cache::free_memory() {
int64_t threshhold = capacity_ * freemem_percent_;
int64_t delta_size = usage_ - threshhold;
if(delta_size <= 0) {
delta_size = 1;//ensure at least one item erased
}
std::set<std::string> key_array;
int64_t released_size = 0;