即时配置 Milvus
Milvus 允许您即时更改其某些配置。
开始之前
您需要确保:
- 您已安装 Birdwatcher。有关详细信息,请参阅 安装 Birdwatcher,
- 您已安装 etcdctl。有关详细信息,请参阅 与 etcd 交互,或
- 您已安装其他 etcd 客户端,例如 Python 客户端。
更改配置
在 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.maxMessageSize | 5242880 |
common.retentionDuration | 86400 |
common.entityExpiration | -1 |
common.gracefulTime | 5000 |
common.gracefulStopTimeout | 30 |
quotaAndLimits.ddl.enabled | FALSE |
quotaAndLimits.indexRate.enabled | FALSE |
quotaAndLimits.flushRate.enabled | FALSE |
quotaAndLimits.compactionRate.enabled | FALSE |
quotaAndLimits.dml.enabled | FALSE |
quotaAndLimits.dql.enabled | FALSE |
quotaAndLimits.limits.collection.maxNum | 64 |
quotaAndLimits.limitWriting.forceDeny | FALSE |
quotaAndLimits.limitWriting.ttProtection.enabled | FALSE |
quotaAndLimits.limitWriting.ttProtection.maxTimeTickDelay | 9223372036854775807 |
quotaAndLimits.limitWriting.memProtection.enabled | TRUE |
quotaAndLimits.limitWriting.memProtection.dataNodeMemoryLowWaterLevel | 0.85 |
quotaAndLimits.limitWriting.memProtection.dataNodeMemoryHighWaterLevel | 0.95 |
quotaAndLimits.limitWriting.memProtection.queryNodeMemoryLowWaterLevel | 0.85 |
quotaAndLimits.limitWriting.memProtection.queryNodeMemoryHighWaterLevel | 0.95 |
quotaAndLimits.limitWriting.diskProtection.enabled | TRUE |
quotaAndLimits.limitWriting.diskProtection.diskQuota | +INF |
quotaAndLimits.limitReading.forceDeny | FALSE |
quotaAndLimits.limitReading.queueProtection.enabled | FALSE |
quotaAndLimits.limitReading.queueProtection.nqInQueueThreshold | 9223372036854775807 |
quotaAndLimits.limitReading.queueProtection.queueLatencyThreshold | +INF |
quotaAndLimits.limitReading.resultProtection.enabled | FALSE |
quotaAndLimits.limitReading.resultProtection.maxReadResultRate | +INF |
quotaAndLimits.limitReading.coolOffSpeed | 0.9 |
autoIndex.enable | FALSE |
autoIndex.params.build | "" |
autoIndex.params.extra | "" |
autoIndex.params.search | "" |
proxy.maxNameLength | 255 |
proxy.maxUsernameLength | 32 |
proxy.minPasswordLength | 6 |
proxy.maxPasswordLength | 256 |
proxy.maxFieldNum | 64 |
proxy.maxShardNum | 256 |
proxy.maxDimension | 32768 |
proxy.maxUserNum | 100 |
proxy.maxRoleNum | 10 |
queryNode.enableDisk | TRUE |
dataCoord.segment.diskSegmentMaxSize | 2048 |
dataCoord.compaction.enableAutoCompaction | TRUE |
下一步
- 了解更多关于系统配置的信息。
- 了解如何配置使用 Milvus Operator、Helm charts 和 Docker 安装的 Milvus。