From 608c86e8cb04b4672d9887ad0321f86cbd42edc7 Mon Sep 17 00:00:00 2001 From: Cai Yudong Date: Sat, 21 Dec 2019 11:02:01 +0800 Subject: [PATCH] #758 enhance config description (#804) --- CHANGELOG.md | 1 + core/conf/server_cpu_config.template | 162 ++++++++++++++++++++++----- core/conf/server_gpu_config.template | 162 ++++++++++++++++++++++----- 3 files changed, 263 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cfb445d..731d05c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Please mark all change in change log and use the issue from GitHub - \#759 - Put C++ sdk out of milvus/core ## Improvement +- \#758 - Enhance config description ## Task diff --git a/core/conf/server_cpu_config.template b/core/conf/server_cpu_config.template index 9b0d2eeb..1dd82464 100644 --- a/core/conf/server_cpu_config.template +++ b/core/conf/server_cpu_config.template @@ -1,49 +1,149 @@ -# Default values are used when you make no changes to the following parameters. +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. -version: 0.1 # config version +version: 0.1 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Server Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# address | IP address that Milvus server monitors. | String | 0.0.0.0 | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# port | Port that Milvus server monitors. Port range (1024, 65535) | Integer | 19530 | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# deploy_mode | Milvus deployment type: | DeployMode | single | +# | single, cluster_readonly, cluster_writable | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# time_zone | Use UTC-x or UTC+x to specify a time zone. | Timezone | UTC+8 | +#----------------------+------------------------------------------------------------+------------+-----------------+ server_config: - address: 0.0.0.0 # milvus server ip address (IPv4) - port: 19530 # milvus server port, must in range [1025, 65534] - deploy_mode: single # deployment type: single, cluster_readonly, cluster_writable - time_zone: UTC+8 # time zone, must be in format: UTC+X + address: 0.0.0.0 + port: 19530 + deploy_mode: single + time_zone: UTC+8 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# DataBase Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# primary_path | Primary directory used to save meta data, vector data and | Path | /var/lib/milvus | +# | index data. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# secondary_path | A semicolon-separated list of secondary directories used | Path | | +# | to save vector data and index data. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# backend_url | URL for metadata storage, using SQLite (for single server | URL | sqlite://:@:/ | +# | Milvus) or MySQL (for distributed cluster Milvus). | | | +# | Format: dialect://username:password@host:port/database | | | +# | Keep 'dialect://:@:/', 'dialect' can be either 'sqlite' or | | | +# | 'mysql', replace other texts with real values. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# insert_buffer_size | Buffer size used for data insertion. | Integer | 1 (GB) | +# | The sum of 'insert_buffer_size' and 'cpu_cache_capacity' | | | +# | must be less than system memory size. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# preload_table | A comma-separated list of table names that need to be pre- | StringList | | +# | loaded when Milvus server starts up. | | | +# | '*' means preload all existing tables. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ db_config: - primary_path: @MILVUS_DB_PATH@ # path used to store data and meta - secondary_path: # path used to store data only, split by semicolon - - backend_url: sqlite://:@:/ # URI format: dialect://username:password@host:port/database - # Keep 'dialect://:@:/', and replace other texts with real values - # Replace 'dialect' with 'mysql' or 'sqlite' - - insert_buffer_size: 1 # GB, maximum insert buffer size allowed, must be a positive integer - # sum of insert_buffer_size and cpu_cache_capacity cannot exceed total memory - - preload_table: # preload data at startup, '*' means load all tables, empty value means no preload - # you can specify preload tables like this: table1,table2,table3 + primary_path: @MILVUS_DB_PATH@ + secondary_path: + backend_url: sqlite://:@:/ + insert_buffer_size: 1 + preload_table: +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Metric Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# enable_monitor | Enable monitoring function or not. | Boolean | false | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# collector | Connected monitoring system to collect metrics. | String | Prometheus | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# port | Port to visit Prometheus, port range (1024, 65535) | Integer | 8080 | +#----------------------+------------------------------------------------------------+------------+-----------------+ metric_config: - enable_monitor: false # enable monitoring or not, must be a boolean - collector: prometheus # prometheus + enable_monitor: false + collector: prometheus prometheus_config: - port: 8080 # port prometheus uses to fetch metrics, must in range [1025, 65534] + port: 8080 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Cache Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# cpu_cache_capacity | The size of CPU memory used for caching data for faster | Integet | 4 (GB) | +# | query. The sum of 'cpu_cache_capacity' and | | | +# | 'insert_buffer_size' must be less than system memory size. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# cache_insert_data | Whether to load inserted data into cache immediately for | Boolean | false | +# | hot query. If want to simultaneously insert and query | | | +# | vectors, it's recommended to enable this config. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ cache_config: - cpu_cache_capacity: 4 # GB, size of CPU memory used for cache, must be a positive integer - cache_insert_data: false # whether to load inserted data into cache, must be a boolean + cpu_cache_capacity: 4 + cache_insert_data: false +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Engine Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# use_blas_threshold | A Milvus performance tuning parameter. This value will be | Integer | 1100 | +# | compared with 'nq' to decide if OpenBLAS should be used. | | | +# | If nq >= use_blas_threshold, OpenBLAS will be used, search | | | +# | response times will be stable but the search speed will be | | | +# | slower; if nq < use_blas_threshold, SSE will be used, | | | +# | search speed will be faster but search response times will | | | +# | fluctuate. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# gpu_search_threshold | A Milvus performance tuning parameter. This value will be | Integer | 1000 | +# | compared with 'nq' to decide if the search computation will| | | +# | be executed on GPUs only. | | | +# | If nq >= gpu_search_threshold, the search computation will | | | +# | be executed on GPUs only; | | | +# | if nq < gpu_search_threshold, the search computation will | | | +# | be executed on both CPUs and GPUs. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ engine_config: - use_blas_threshold: 1100 # if nq < use_blas_threshold, use SSE, faster with fluctuated response times - # if nq >= use_blas_threshold, use OpenBlas, slower with stable response times - gpu_search_threshold: 1000 # threshold beyond which the search computation is executed on GPUs only + use_blas_threshold: 1100 + gpu_search_threshold: 1000 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# GPU Resource Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# enable | Enable GPU resources or not. | Boolean | false | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# cache_capacity | The size of GPU memory per card used for cache. | Integer | 1 (GB) | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# search_resources | The list of GPU devices used for search computation. | DeviceList | gpu0 | +# | Must be in format gpux. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# build_index_resources| The list of GPU devices used for index building. | DeviceList | gpu0 | +# | Must be in format gpux. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ gpu_resource_config: - enable: false # whether to enable GPU resources - cache_capacity: 1 # GB, size of GPU memory per card used for cache, must be a positive integer - search_resources: # define the GPU devices used for search computation, must be in format gpux + enable: false + cache_capacity: 1 + search_resources: - gpu0 - build_index_resources: # define the GPU devices used for index building, must be in format gpux + build_index_resources: - gpu0 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Tracing Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# json_config_path | Absolute path for tracing config file. | Path | | +# | Leave it empty, a no-op tracer will be created. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ tracing_config: - json_config_path: # Absolute path to tracing config file. Creates a no-op tracer if empty + json_config_path: diff --git a/core/conf/server_gpu_config.template b/core/conf/server_gpu_config.template index bd0e417d..401a89d8 100644 --- a/core/conf/server_gpu_config.template +++ b/core/conf/server_gpu_config.template @@ -1,49 +1,149 @@ -# Default values are used when you make no changes to the following parameters. +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. -version: 0.1 # config version +version: 0.1 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Server Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# address | IP address that Milvus server monitors. | String | 0.0.0.0 | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# port | Port that Milvus server monitors. Port range (1024, 65535) | Integer | 19530 | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# deploy_mode | Milvus deployment type: | DeployMode | single | +# | single, cluster_readonly, cluster_writable | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# time_zone | Use UTC-x or UTC+x to specify a time zone. | Timezone | UTC+8 | +#----------------------+------------------------------------------------------------+------------+-----------------+ server_config: - address: 0.0.0.0 # milvus server ip address (IPv4) - port: 19530 # milvus server port, must in range [1025, 65534] - deploy_mode: single # deployment type: single, cluster_readonly, cluster_writable - time_zone: UTC+8 # time zone, must be in format: UTC+X + address: 0.0.0.0 + port: 19530 + deploy_mode: single + time_zone: UTC+8 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# DataBase Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# primary_path | Primary directory used to save meta data, vector data and | Path | /var/lib/milvus | +# | index data. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# secondary_path | A semicolon-separated list of secondary directories used | Path | | +# | to save vector data and index data. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# backend_url | URL for metadata storage, using SQLite (for single server | URL | sqlite://:@:/ | +# | Milvus) or MySQL (for distributed cluster Milvus). | | | +# | Format: dialect://username:password@host:port/database | | | +# | Keep 'dialect://:@:/', 'dialect' can be either 'sqlite' or | | | +# | 'mysql', replace other texts with real values. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# insert_buffer_size | Buffer size used for data insertion. | Integer | 1 (GB) | +# | The sum of 'insert_buffer_size' and 'cpu_cache_capacity' | | | +# | must be less than system memory size. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# preload_table | A comma-separated list of table names that need to be pre- | StringList | | +# | loaded when Milvus server starts up. | | | +# | '*' means preload all existing tables. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ db_config: - primary_path: @MILVUS_DB_PATH@ # path used to store data and meta - secondary_path: # path used to store data only, split by semicolon - - backend_url: sqlite://:@:/ # URI format: dialect://username:password@host:port/database - # Keep 'dialect://:@:/', and replace other texts with real values - # Replace 'dialect' with 'mysql' or 'sqlite' - - insert_buffer_size: 1 # GB, maximum insert buffer size allowed, must be a positive integer - # sum of insert_buffer_size and cpu_cache_capacity cannot exceed total memory - - preload_table: # preload data at startup, '*' means load all tables, empty value means no preload - # you can specify preload tables like this: table1,table2,table3 + primary_path: @MILVUS_DB_PATH@ + secondary_path: + backend_url: sqlite://:@:/ + insert_buffer_size: 1 + preload_table: +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Metric Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# enable_monitor | Enable monitoring function or not. | Boolean | false | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# collector | Connected monitoring system to collect metrics. | String | Prometheus | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# port | Port to visit Prometheus, port range (1024, 65535) | Integer | 8080 | +#----------------------+------------------------------------------------------------+------------+-----------------+ metric_config: - enable_monitor: false # enable monitoring or not, must be a boolean - collector: prometheus # prometheus + enable_monitor: false + collector: prometheus prometheus_config: - port: 8080 # port prometheus uses to fetch metrics, must in range [1025, 65534] + port: 8080 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Cache Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# cpu_cache_capacity | The size of CPU memory used for caching data for faster | Integet | 4 (GB) | +# | query. The sum of 'cpu_cache_capacity' and | | | +# | 'insert_buffer_size' must be less than system memory size. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# cache_insert_data | Whether to load inserted data into cache immediately for | Boolean | false | +# | hot query. If want to simultaneously insert and query | | | +# | vectors, it's recommended to enable this config. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ cache_config: - cpu_cache_capacity: 4 # GB, size of CPU memory used for cache, must be a positive integer - cache_insert_data: false # whether to load inserted data into cache, must be a boolean + cpu_cache_capacity: 4 + cache_insert_data: false +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Engine Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# use_blas_threshold | A Milvus performance tuning parameter. This value will be | Integer | 1100 | +# | compared with 'nq' to decide if OpenBLAS should be used. | | | +# | If nq >= use_blas_threshold, OpenBLAS will be used, search | | | +# | response times will be stable but the search speed will be | | | +# | slower; if nq < use_blas_threshold, SSE will be used, | | | +# | search speed will be faster but search response times will | | | +# | fluctuate. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# gpu_search_threshold | A Milvus performance tuning parameter. This value will be | Integer | 1000 | +# | compared with 'nq' to decide if the search computation will| | | +# | be executed on GPUs only. | | | +# | If nq >= gpu_search_threshold, the search computation will | | | +# | be executed on GPUs only; | | | +# | if nq < gpu_search_threshold, the search computation will | | | +# | be executed on both CPUs and GPUs. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ engine_config: - use_blas_threshold: 1100 # if nq < use_blas_threshold, use SSE, faster with fluctuated response times - # if nq >= use_blas_threshold, use OpenBlas, slower with stable response times - gpu_search_threshold: 1000 # threshold beyond which the search computation is executed on GPUs only + use_blas_threshold: 1100 + gpu_search_threshold: 1000 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# GPU Resource Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# enable | Enable GPU resources or not. | Boolean | false | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# cache_capacity | The size of GPU memory per card used for cache. | Integer | 1 (GB) | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# search_resources | The list of GPU devices used for search computation. | DeviceList | gpu0 | +# | Must be in format gpux. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# build_index_resources| The list of GPU devices used for index building. | DeviceList | gpu0 | +# | Must be in format gpux. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ gpu_resource_config: - enable: true # whether to enable GPU resources - cache_capacity: 1 # GB, size of GPU memory per card used for cache, must be a positive integer - search_resources: # define the GPU devices used for search computation, must be in format gpux + enable: true + cache_capacity: 1 + search_resources: - gpu0 - build_index_resources: # define the GPU devices used for index building, must be in format gpux + build_index_resources: - gpu0 +#----------------------+------------------------------------------------------------+------------+-----------------+ +# Tracing Config | Description | Type | Default | +#----------------------+------------------------------------------------------------+------------+-----------------+ +# json_config_path | Absolute path for tracing config file. | Path | | +# | Leave it empty, a no-op tracer will be created. | | | +#----------------------+------------------------------------------------------------+------------+-----------------+ tracing_config: - json_config_path: # Absolute path to tracing config file. Creates a no-op tracer if empty \ No newline at end of file + json_config_path: -- GitLab