Configurar Milvus sobre la marcha
Milvus le permite cambiar algunas de sus configuraciones sobre la marcha.
Antes de empezar
Necesita asegurarse de que:
- Tiene Birdwatcher instalado. Para más detalles, consulte Instalar Birdwatcher,
- Tiene instalado etcdctl. Para más detalles, consulte Interacción con etcd, o
- Tiene instalados otros clientes etcd, como el cliente Python.
- Los ejemplos de esta guía cambian el valor de
proxy.minPasswordLengtha8. Puede reemplazar la clave por las que correspondan que se enumeran en Elementos de configuración aplicables. - Los ejemplos de esta guía asumen que la ruta raíz de su Milvus es
by-dev. Todas las configuraciones se listan bajo la rutaby-dev/config. La ruta raíz de Milvus varía según la forma en que lo instale. Para las instancias instaladas utilizando las tablas Helm, la ruta raíz por defecto esby-dev. Si no conoce la ruta raíz, consulte Conectarse a etcd.
Cambiar configuraciones
En Milvus, proxy.minPasswordLength está configurado por defecto a 6. Para cambiar este valor, puede hacer lo siguiente:
$ 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"
A continuación, puede comprobar las configuraciones del siguiente modo:
$ etcdctl get by-dev/config/proxy/minPasswordLength
Deshacer configuraciones
Milvus también le permite deshacer sus configuraciones en caso de que el valor cambiado ya no se aplique.
$ 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"
A continuación, puede comprobar las configuraciones de la siguiente manera:
$ etcdctl get by-dev/config/proxy/minPasswordLength
Ver configuraciones
En lugar de ver el valor de un elemento de configuración específico, también puede listarlos todos.
$ etcdctl get --prefix by-dev/config
# or
$ birdwatcher -olc "#connect --etcd 127.0.0.1:2379 --rootPath=by-dev,show config-etcd"
Para ver las configuraciones de un nodo específico:
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
Elementos de configuración aplicables
Actualmente, puede modificar sobre la marcha los siguientes elementos de configuración.
| Elemento de configuración | Valor por defecto |
|---|---|
| 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.maxLongitudContraseña | 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 |
Más información
- Aprenda más sobre Configuraciones del Sistema.
- Aprenda a configurar Milvus instalado usando Milvus Operator, gráficos Helm y Docker.