milvus.yaml 13.6 KB
Newer Older
1 2 3 4 5 6
# Licensed to the LF AI & Data foundation 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
F
FluorineDog 已提交
7 8
# with the License. You may obtain a copy of the License at
#
9
#     http://www.apache.org/licenses/LICENSE-2.0
F
FluorineDog 已提交
10
#
11 12 13 14 15
# 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.
F
FluorineDog 已提交
16

17
# Related configuration of etcd, used to store Milvus metadata & service discovery.
B
bigsheeper 已提交
18
etcd:
19 20
  endpoints:
    - localhost:2379
21
  rootPath: by-dev # The root path where data is stored in etcd
C
cai.zhang 已提交
22 23
  metaSubPath: meta # metaRootPath = rootPath + '/' + metaSubPath
  kvSubPath: kv # kvRootPath = rootPath + '/' + kvSubPath
24
  log:
25 26 27 28 29
    # path is one of:
    #  - "default" as os.Stderr,
    #  - "stderr" as os.Stderr,
    #  - "stdout" as os.Stdout,
    #  - file path to append server logs to.
30
    # please adjust in embedded Milvus: /tmp/milvus/logs/etcd.log
31
    path: stdout
32 33
    level: info # Only supports debug, info, warn, error, panic, or fatal. Default 'info'.
  use:
34
    # please adjust in embedded Milvus: true
35
    embed: false # Whether to enable embedded Etcd (an in-process EtcdServer).
36 37 38 39
  data:
    # Embedded Etcd only.
    # please adjust in embedded Milvus: /tmp/milvus/etcdData/
    dir: default.etcd
40 41 42 43 44 45 46 47 48
  ssl:
    enabled: false # Whether to support ETCD secure connection mode
    tlsCert: /path/to/etcd-client.pem # path to your cert file
    tlsKey: /path/to/etcd-client-key.pem # path to your key file
    tlsCACert:  /path/to/ca.pem # path to your CACert file
    # TLS min version
    # Optional values: 1.0, 1.1, 1.2, 1.3。
    # We recommend using version 1.2 and above
    tlsMinVersion: 1.3
N
neza2017 已提交
49

50 51 52 53 54 55 56 57
# Default value: etcd
# Valid values: [etcd, mysql]
metastore:
  type: etcd

# Related configuration of mysql, used to store Milvus metadata.
mysql:
  username: root
58
  password: 123456
59 60 61 62 63 64 65
  address: localhost
  port: 3306
  dbName: milvus_meta
  driverName: mysql
  maxOpenConns: 20
  maxIdleConns: 5

66
# please adjust in embedded Milvus: /tmp/milvus/data/
G
godchen 已提交
67 68 69
localStorage:
  path: /var/lib/milvus/data/

70
# Related configuration of minio, which is responsible for data persistence for Milvus.
X
XuanYang-cn 已提交
71
minio:
72
  address: localhost # Address of MinIO/S3
73
  port: 9000   # Port of MinIO/S3
74
  accessKeyID: minioadmin # accessKeyID of MinIO/S3
75
  secretAccessKey: minioadmin # MinIO/S3 encryption string
76
  useSSL: false # Access to MinIO/S3 with SSL
77
  bucketName: "a-bucket" # Bucket name in MinIO/S3
78
  rootPath: files # The root path where the message is stored in MinIO/S3
79 80
  # Whether to use AWS IAM role to access S3 instead of access/secret keys
  # For more infomation, refer to https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
81 82
  useIAM: false
  # Custom endpoint for fetch IAM role credentials.
83
  # Leave it empty if you want to use AWS default endpoint
84
  iamEndpoint: ""
X
XuanYang-cn 已提交
85

J
jaime 已提交
86 87 88 89 90
# Milvus supports three MQ: rocksmq(based on RockDB), Pulsar and Kafka, which should be reserved in config what you use.
# There is a note about enabling priority if we config multiple mq in this file
# 1. standalone(local) mode: rockskmq(default) > Pulsar > Kafka
# 2. cluster mode:  Pulsar(default) > Kafka (rocksmq is unsupported)

B
Bennu 已提交
91
# Related configuration of pulsar, used to manage Milvus logs of recent mutation operations, output streaming log, and provide log publish-subscribe services.
B
bigsheeper 已提交
92
pulsar:
93
  address: localhost # Address of pulsar
94
  port: 6650 # Port of pulsar
X
Xiaofan 已提交
95
  webport: 80 # Web port of pulsar, if you connect direcly without proxy, should use 8080
B
Bennu 已提交
96
  maxMessageSize: 5242880 # 5 * 1024 * 1024 Bytes, Maximum size of each message in pulsar.
N
neza2017 已提交
97

J
jaime 已提交
98 99 100
# If you want to enable kafka, needs to comment the pulsar configs
#kafka:
#  brokerList: localhost1:9092,localhost2:9092,localhost3:9092
101 102
#  saslUsername: username
#  saslPassword: password
103 104
#  saslMechanisms: PLAIN
#  securityProtocol: SASL_SSL
J
jaime 已提交
105

106
rocksmq:
107
  # please adjust in embedded Milvus: /tmp/milvus/rdb_data
108
  path: /var/lib/milvus/rdb_data # The path where the message is stored in rocksmq
109
  rocksmqPageSize: 2147483648 # 2 GB, 2 * 1024 * 1024 * 1024 bytes, The size of each page of messages in rocksmq
110
  retentionTimeInMinutes: 10080 # 7 days, 7 * 24 * 60 minutes, The retention time of the message in rocksmq.
111
  retentionSizeInMB: 8192 # 8 GB, 8 * 1024 MB, The retention size of the message in rocksmq.
112
  lrucacheratio:  0.06 # rocksdb cache memory ratio
113

114
# Related configuration of rootCoord, used to handle data definition language (DDL) and data control language (DCL) requests
115
rootCoord:
B
bigsheeper 已提交
116 117
  address: localhost
  port: 53100
N
neza2017 已提交
118

119 120 121 122
  dmlChannelNum: 256 # The number of dml channels created at system startup
  maxPartitionNum: 4096 # Maximum number of partitions in a collection
  minSegmentSizeToEnableIndex: 1024 # It's a threshold. When the segment size is less than this value, the segment will not be indexed

123
  # (in seconds) Duration after which an import task will expire (be killed). Default 900 seconds (15 minutes).
124
  # Note: If default value is to be changed, change also the default in: internal/util/paramtable/component_param.go
125
  importTaskExpiration: 900
126 127 128 129
  # (in seconds) Milvus will keep the record of import tasks for at least `importTaskRetention` seconds. Default 86400
  # seconds (24 hours).
  # Note: If default value is to be changed, change also the default in: internal/util/paramtable/component_param.go
  importTaskRetention: 86400
130 131 132 133 134 135 136 137 138
  # (in seconds) Check an import task's segment loading state in queryNodes every `importSegmentStateCheckInterval`
  # seconds. Default 10 seconds.
  # Note: If default value is to be changed, change also the default in: internal/util/paramtable/component_param.go
  importSegmentStateCheckInterval: 10
  # (in seconds) Maximum time to wait for segments in a single import task to be loaded in queryNodes.
  # Default 60 seconds (1 minute).
  # Note: If default value is to be changed, change also the default in: internal/util/paramtable/component_param.go
  importSegmentStateWaitLimit: 60
  # (in seconds) Check the building status of a task's segments' indices every `importIndexCheckInterval` seconds.
139
  # Default 10 seconds.
140
  # Note: If default value is to be changed, change also the default in: internal/util/paramtable/component_param.go
141
  importIndexCheckInterval: 10
142
  # (in seconds) Maximum time to wait for indices to be built on a single import task's segments.
143
  # Default 600 seconds (10 minutes).
144
  # Note: If default value is to be changed, change also the default in: internal/util/paramtable/component_param.go
145
  importIndexWaitLimit: 600
146

147
# Related configuration of proxy, used to validate client requests and reduce the returned results.
148
proxy:
149
  port: 19530
E
exia 已提交
150
  internalPort: 19529
151 152
  http:
    enabled: true # Whether to enable the http server
153
    debug_mode: false # Whether to enable http server debug mode
154

155 156 157 158
  timeTickInterval: 200 # ms, the interval that proxy synchronize the time tick
  msgStream:
    timeTick:
      bufSize: 512
159 160 161
  maxNameLength: 255  # Maximum length of name for a collection or alias
  maxFieldNum: 256     # Maximum number of fields in a collection
  maxDimension: 32768 # Maximum dimension of a vector
162 163
  maxShardNum: 256 # Maximum number of shards in a collection
  maxTaskNum: 1024 # max task number of proxy task queue
164
  # please adjust in embedded Milvus: false
165
  ginLogging: true # Whether to produce gin logs.
166

167

168
# Related configuration of queryCoord, used to manage topology and load balancing for the query nodes, and handoff from growing segments to sealed segments.
169
queryCoord:
X
xige-16 已提交
170 171
  address: localhost
  port: 19531
172
  autoHandoff: true # Enable auto handoff
173
  autoBalance: true # Enable auto balance
174
  overloadedMemoryThresholdPercentage: 90 # The threshold percentage that memory overload
175 176
  balanceIntervalSeconds: 60
  memoryUsageMaxDifferencePercentage: 30
X
xige-16 已提交
177

178
# Related configuration of queryNode, used to run hybrid search between vector and scalar data.
B
bigsheeper 已提交
179
queryNode:
180
  cacheSize: 32 # GB, default 32 GB, `cacheSize` is the memory used for caching data for faster query. The `cacheSize` must be less than system memory size.
Z
zhenshan.cao 已提交
181
  port: 21123
182
  loadMemoryUsageFactor: 3 # The multiply factor of calculating the memory usage while loading segments
183

184 185 186 187 188 189
  stats:
    publishInterval: 1000 # Interval for querynode to report node information (milliseconds)
  dataSync:
    flowGraph:
      maxQueueLength: 1024 # Maximum length of task queue in flowgraph
      maxParallelism: 1024 # Maximum number of tasks executed in parallel in the flowgraph
190
  # Segcore will divide a segment into multiple chunks to enbale small index
191
  segcore:
J
Jiquan Long 已提交
192
    chunkRows: 1024 # The number of vectors in a chunk.
193 194
    # Note: we have disabled segment small index since @2022.05.12. So below related configurations won't work.
    # We won't create small index for growing segments and search on these segments will directly use bruteforce scan.
195
    smallIndex:
J
Jiquan Long 已提交
196
      nlist: 128 # small index nlist, recommend to set sqrt(chunkRows), must smaller than chunkRows/8
197
      nprobe: 16 # nprobe to search small index, based on your accuracy requirement, must smaller than nlist
G
godchen 已提交
198 199 200
  cache:
    enabled: true
    memoryLimit: 2147483648 # 2 GB, 2 * 1024 *1024 *1024
G
godchen 已提交
201

202
  scheduler:
203 204
    receiveChanSize: 10240
    unsolvedQueueSize: 10240
205 206 207 208 209
    maxReadConcurrency: 0 # maximum concurrency of read task. if set to less or equal 0, it means no uppper limit.
    cpuRatio: 10.0 # ratio used to estimate read task cpu usage.

  grouping:
    enabled: true
210 211 212
    maxNQ: 1000
    topKMergeRatio: 10.0

213
indexCoord:
214
  address: localhost
C
cai.zhang 已提交
215
  port: 31000
X
XuanYang-cn 已提交
216

217 218 219
  gc:
    interval: 600 # gc interval in seconds

Z
zhenshan.cao 已提交
220 221 222
indexNode:
  port: 21121

223 224 225
  scheduler:
    buildParallel: 1

226
dataCoord:
X
xige-16 已提交
227 228
  address: localhost
  port: 13333
229
  enableCompaction: true # Enable data segment compression
230
  enableGarbageCollection: true
231

232 233
  segment:
    maxSize: 512 # Maximum size of a segment in MB
234
    sealProportion: 0.25 # It's the minimum proportion for a segment which can be sealed
235
    assignmentExpiration: 2000 # The time of the assignment expiration in ms
236
    maxLife: 86400 # The max lifetime of segment in seconds, 24*60*60
237

238
  compaction:
T
ThreadDao 已提交
239
    enableAutoCompaction: true
240

241 242 243 244 245 246
  gc:
    interval: 3600 # gc interval in seconds
    missingTolerance: 86400 # file meta missing tolerance duration in seconds, 60*24
    dropTolerance: 86400 # file belongs to dropped entity tolerance duration in seconds, 60*24


X
XuanYang-cn 已提交
247 248
dataNode:
  port: 21124
249

250 251 252 253 254 255 256 257
  dataSync:
    flowGraph:
      maxQueueLength: 1024 # Maximum length of task queue in flowgraph
      maxParallelism: 1024 # Maximum number of tasks executed in parallel in the flowgraph
  flush:
    # Max buffer size to flush for a single segment.
    insertBufSize: 16777216 # Bytes, 16 MB

S
shiyu22 已提交
258
# Configures the system log output.
259
log:
260
  level: debug # Only supports debug, info, warn, error, panic, or fatal. Default 'info'.
261
  file:
262
    # please adjust in embedded Milvus: /tmp/milvus/logs
263
    rootPath: "" # default to stdout, stderr
264
    maxSize: 300 # MB
265
    maxAge: 10 # Maximum time for log retention in day.
266
    maxBackups: 20
Z
zhenshan.cao 已提交
267
  format: text # text/json
268

X
Xiaofan 已提交
269 270 271 272 273 274 275 276 277 278 279 280
grpc:
  log:
    level: WARNING

  serverMaxRecvSize: 2147483647 # math.MaxInt32
  serverMaxSendSize: 2147483647 # math.MaxInt32
  clientMaxRecvSize: 104857600 # 100 MB, 100 * 1024 * 1024
  clientMaxSendSize: 104857600 # 100 MB, 100 * 1024 * 1024

  client:
    dialTimeout:      5000
    keepAliveTime:    10000
281
    keepAliveTimeout: 20000
282 283 284 285
    maxMaxAttempts: 5
    initialBackOff: 1.0
    maxBackoff: 60.0
    backoffMultiplier: 2.0
X
Xiaofan 已提交
286

E
exia 已提交
287 288 289 290 291 292 293
# Configure the proxy tls enable.
tls:
  serverPemPath: configs/cert/server.pem
  serverKeyPath: configs/cert/server.key
  caPemPath: configs/cert/ca.pem


294
common:
295
  # Channel name generation rule: ${namePrefix}-${ChannelIdx}
296
  chanNamePrefix:
297
    cluster: "by-dev"
298 299 300
    rootCoordTimeTick: "rootcoord-timetick"
    rootCoordStatistics: "rootcoord-statistics"
    rootCoordDml: "rootcoord-dml"
301
    rootCoordDelta: "rootcoord-delta"
302 303 304 305
    search: "search"
    searchResult: "searchResult"
    queryTimeTick: "queryTimeTick"
    queryNodeStats: "query-node-stats"
306
    # Cmd for loadIndex, flush, etc...
307 308 309 310 311
    cmd: "cmd"
    dataCoordStatistic: "datacoord-statistics-channel"
    dataCoordTimeTick: "datacoord-timetick-channel"
    dataCoordSegmentInfo: "segment-info-channel"

312
  # Sub name generation rule: ${subNamePrefix}-${NodeID}
313 314 315 316 317 318 319 320
  subNamePrefix:
    rootCoordSubNamePrefix: "rootCoord"
    proxySubNamePrefix: "proxy"
    queryNodeSubNamePrefix: "queryNode"
    dataNodeSubNamePrefix: "dataNode"
    dataCoordSubNamePrefix: "dataCoord"

  defaultPartitionName: "_default"  # default partition name for a collection
321
  defaultIndexName: "_default_idx"  # default index name
322
  retentionDuration: 86400 # time travel reserved time, insert/delete will not be cleaned in this period. 1 days in seconds
X
Xiaofan 已提交
323 324
  entityExpiration:  -1     # Entity expiration in seconds, CAUTION make sure entityExpiration >= retentionDuration and -1 means never expire

325
  gracefulTime: 5000 # milliseconds. it represents the interval (in ms) by which the request arrival time needs to be subtracted in the case of Bounded Consistency.
X
Xiaofan 已提交
326 327

  # Default value: auto
328
  # Valid values: [auto, avx512, avx2, avx, sse4_2]
X
Xiaofan 已提交
329 330
  # This configuration is only used by querynode and indexnode, it selects CPU instruction set for Searching and Index-building.
  simdType: auto
331
  indexSliceSize: 16 # MB
G
godchen 已提交
332

333
  # please adjust in embedded Milvus: local
J
jaime 已提交
334 335
  storageType: minio

C
codeman 已提交
336 337
  security:
    authorizationEnabled: false
338 339 340
    # tls mode values [0, 1, 2]
    # 0 is close, 1 is one-way authentication, 2 is two-way authentication.
    tlsMode: 0