提交 d0a5e861 编写于 作者: P peng.xu

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
......@@ -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:
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册