管理员手册 (Administration Guide)
动态配置(Dynamic_config)

动态配置 Milvus

Milvus 允许你在运行过程中更改一些配置。

开始之前

你需要确保:

  • 本指南中的示例将 proxy.minPasswordLength 的值更改为 8。你可以按照 适用配置项 中列出的适用键替换该键。
  • 本指南中的示例假设你的 Milvus 根路径是 by-dev。所有配置都列在 by-dev/config 下。Milvus 的根路径根据你安装的方式而不同。对于使用 Helm charts 安装的实例,默认的根路径为 by-dev。如果你不知道根路径,请参阅 连接 etcd

更改配置

在 Milvus 上,默认情况下 proxy.minPasswordLength 设置为 6。要更改此值,可以按如下操作:

$ etcdctl put by-dev/config/proxy/minPasswordLength 8
# 或者
$ birdwatcher -olc "#connect --etcd 127.0.0.1:2379 --rootPath=by-dev,set config-etcd --key by-dev/config/proxy/minPasswordLength --value 8"

然后,你可以通过以下方式检查配置:

$ etcdctl get by-dev/config/proxy/minPasswordLength

回滚配置

Milvus 还允许你回滚配置,以便恢复先前的值。

$ etcdctl del by-dev/config/proxy/minPasswordLength 
# 或者 
$ birdwatcher -olc "#connect --etcd 127.0.0.1:2379 --rootPath=by-dev,remove config-etcd --key by-dev/config/proxy/minPasswordLength"

然后,你可以通过以下方式检查配置:

$ etcdctl get by-dev/config/proxy/minPasswordLength

查看配置

除了查看特定配置项的值,你还可以列出所有配置项。

$ etcdctl get --prefix by-dev/config
# 或者
$ birdwatcher -olc "#connect --etcd 127.0.0.1:2379 --rootPath=by-dev,show config-etcd"

要查看特定节点的配置:

Offline > connect --etcd ip:port 
Milvus(by-dev) > show session          # 列出所有带有服务器ID的节点
Milvus(by-dev) > visit querycoord 1    # 使用服务器ID访问节点
QueryCoord-1(ip:port) > configuration  # 列出该节点的配置

适用配置项

当前,你可以即时更改以下配置项。

配置项默认值
pulsar.maxMessageSize5242880
common.retentionDuration86400
common.entityExpiration-1
common.gracefulTime5000
common.gracefulStopTimeout30
quotaAndLimits.ddl.enabledFALSE
quotaAndLimits.indexRate.enabledFALSE
quotaAndLimits.flushRate.enabledFALSE
quotaAndLimits.compactionRate.enabledFALSE
quotaAndLimits.dml.enabledFALSE
quotaAndLimits.dql.enabledFALSE
quotaAndLimits.limits.collection.maxNum64
quotaAndLimits.limitWriting.forceDenyFALSE
quotaAndLimits.limitWriting.ttProtection.enabledFALSE
quotaAndLimits.limitWriting.ttProtection.maxTimeTickDelay9223372036854775807
quotaAndLimits.limitWriting.memProtection.enabledTRUE
quotaAndLimits.limitWriting.memProtection.dataNodeMemoryLowWaterLevel0.85
quotaAndLimits.limitWriting.memProtection.dataNodeMemoryHighWaterLevel0.95
quotaAndLimits.limitWriting.memProtection.queryNodeMemoryLowWaterLevel0.85
quotaAndLimits.limitWriting.memProtection.queryNodeMemoryHighWaterLevel0.95
quotaAndLimits.limitWriting.diskProtection.enabledTRUE
quotaAndLimits.limitWriting.diskProtection.diskQuota+INF
quotaAndLimits.limitReading.forceDenyFALSE
quotaAndLimits.limitReading.queueProtection.enabledFALSE
quotaAndLimits.limitReading.queueProtection.nqInQueueThreshold9223372036854775807
quotaAndLimits.limitReading.queueProtection.queueLatencyThreshold+INF
quotaAndLimits.limitReading.resultProtection.enabledFALSE
quotaAndLimits.limitReading.resultProtection.maxReadResultRate+INF
quotaAndLimits.limitReading.coolOffSpeed0.9
autoIndex.enableFALSE
autoIndex.params.build""
autoIndex.params.extra""
autoIndex.params.search""
proxy.maxNameLength255
proxy.maxUsernameLength32
proxy.minPasswordLength6
proxy.maxPasswordLength256
proxy.maxFieldNum64
proxy.maxShardNum256
proxy.maxDimension32768
proxy.maxUserNum100
proxy.maxRoleNum10
queryNode.enableDiskTRUE
dataCoord.segment.diskSegmentMaxSize2048
dataCoord.compaction.enableAutoCompactionTRUE

下一步