mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 03:18:29 +08:00
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:
commit
d0a5e8613c
@ -34,7 +34,7 @@ license_config: # license configure
|
|||||||
|
|
||||||
cache_config: # cache configure
|
cache_config: # cache configure
|
||||||
cpu_cache_capacity: 16 # how many memory are used as cache, unit: GB, range: 0 ~ less than total memory
|
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
|
insert_cache_immediately: false # insert data will be load into cache immediately for hot query
|
||||||
|
|
||||||
engine_config:
|
engine_config:
|
||||||
|
3
cpp/src/cache/Cache.cpp
vendored
3
cpp/src/cache/Cache.cpp
vendored
@ -163,6 +163,9 @@ void Cache::free_memory() {
|
|||||||
|
|
||||||
int64_t threshhold = capacity_ * freemem_percent_;
|
int64_t threshhold = capacity_ * freemem_percent_;
|
||||||
int64_t delta_size = usage_ - threshhold;
|
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;
|
std::set<std::string> key_array;
|
||||||
int64_t released_size = 0;
|
int64_t released_size = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user