即時配置 Milvus
Milvus 允許您即時變更某些配置。
在您開始之前
您需要確保: 您已安裝 Birdwatcher。
- 您已安裝 Birdwatcher。詳情請參閱安裝 Birdwatcher、
- 您已安裝 etcdctl。詳情請參閱與 etcd 互動,或
- 您安裝了其他 etcd 用戶端,例如 Python 用戶端。
- 本指南中的示例將
proxy.minPasswordLength
的值更改成8
。您可以使用Applicable configuration items(適用的組態項目)中列出的適用的鍵來替換。 - 本指南的範例假設你的 Milvus 的根目錄為
by-dev
。所有配置都列在路徑by-dev/config
下。Milvus 根路徑會因安裝方式而異。對於使用 Helm 圖表安裝的實體,根目錄預設為by-dev
。如果您不知道根目錄,請參考Connect to etcd。
變更組態
在 Milvus 上,proxy.minPasswordLength
預設設定為6
。要變更此值,您可以執行下列步驟:
$ etcdctl put by-dev/config/proxy/minPasswordLength 8
# or
$ 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
# or
$ 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
# or
$ 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 # List all nodes with their server ID
Milvus(by-dev) > visit querycoord 1 # Visit a node by server ID
QueryCoord-1(ip:port) > configuration # List the configuration of the node
適用的組態項目
目前,您可以即時變更下列組態項目。
組態項目 | 預設值 |
---|---|
pulsar.maxMessageSize | 5242880 |
common.retentionDuration | 86400 |
common.entityExpiration | -1 |
常見的優化時間 | 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 | 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 |
自動索引啟用 | 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 圖表和Docker 配置已安裝的Milvus。