mirror of https://github.com/milvus-io/milvus.git
MS-249 Check machine hardware during initialize
Former-commit-id: e513499fb015a6867a762a10b629dd774182f21apull/191/head
parent
fe63fb509a
commit
eb1d1e393f
|
@ -84,12 +84,12 @@ ServerError ServerConfig::ValidateConfig() const {
|
|||
|
||||
size_t gpu_mem = 0;
|
||||
ValidationUtil::GetGpuMemory(gpu_index, gpu_mem);
|
||||
if(index_building_threshold >= gpu_mem/3) {
|
||||
std::cout << "Warnning: index_building_threshold is greater than 1/3 of gpu memory, "
|
||||
<< "some index type(such as IVFLAT) may cause cuda::bad_alloc() error" << std::endl;
|
||||
} else if(index_building_threshold >= gpu_mem) {
|
||||
if(index_building_threshold >= gpu_mem) {
|
||||
std::cout << "Error: index_building_threshold execeed gpu memory" << std::endl;
|
||||
return SERVER_INVALID_ARGUMENT;
|
||||
} else if(index_building_threshold >= gpu_mem/3) {
|
||||
std::cout << "Warnning: index_building_threshold is greater than 1/3 of gpu memory, "
|
||||
<< "some index type(such as IVFLAT) may cause cuda::bad_alloc() error" << std::endl;
|
||||
}
|
||||
|
||||
//cache config validation
|
||||
|
@ -103,7 +103,7 @@ ServerError ServerConfig::ValidateConfig() const {
|
|||
std::cout << "Warnning: cpu_cache_capacity value is too aggressive" << std::endl;
|
||||
}
|
||||
|
||||
if(insert_buffer_size + cache_cap >= total_mem) if(cache_cap >= total_mem) {
|
||||
if(insert_buffer_size + cache_cap >= total_mem) {
|
||||
std::cout << "Error: sum of cpu_cache_capacity and insert_buffer_size execeed system memory" << std::endl;
|
||||
return SERVER_INVALID_ARGUMENT;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue