修改实例配置
更新时间:2026-07-20
概述
Milvus 引擎实例提供了通过控制台的方式查询和修改实例的配置信息。本文将介绍如何在控制台上更新 Milvus 引擎实例配置,以满足不同的业务需求。
前提条件
- 已创建 Milvus 引擎实例。
- 实例状态为运行中。
操作步骤
按以下步骤在控制台上更新 Milvus 引擎实例的配置信息:
- 登录云管理控制台,选择"产品服务 > 数据库 > 向量数据库 VectorDB"。
- 选择云服务器所在的区域。
- 在实例列表中找到对应的 Milvus 引擎实例,点击实例名称进入实例详情页。
- 在左侧导航栏选择"实例配置"页签。
-
在"实例配置"输入框内输入需要覆盖默认配置的参数,然后点击"保存配置"。
- 参数格式:配置参数需遵循 YAML 格式。
- 在弹出的"提示"对话框中,输入变更原因,点击"确定"。
说明:配置修改请求提交后,若所修改配置项需要重启以生效,则在配置修改完成后将重启实例。此时实例将暂时进入升级中状态,待配置更新完成后,集群将自动恢复至运行中状态。
YAML
1# Related configuration of rootCoord, used to handle data definition language (DDL) and data control language (DCL) requests
2rootCoord:
3 maxDatabaseNum: 64 # Maximum number of database
4 maxPartitionNum: 4096 # Maximum number of partitions in a collection
5 minSegmentSizeToEnableIndex: 1024 # It's a threshold. When the segment size is less than this value, the segment will not be indexed
6 maxGeneralCapacity: 65536 # upper limit for the sum of of product of partitionNumber and shardNumber
7 grpc:
8 serverMaxSendSize: 536870912
9 serverMaxRecvSize: 268435456
10 clientMaxSendSize: 268435456
11 clientMaxRecvSize: 536870912
12
13# Related configuration of proxy, used to validate client requests and reduce the returned results.
14proxy:
15 timeTickInterval: 200 # ms, the interval that proxy synchronize the time tick
16 healthCheckTimeout: 3000 # ms, the interval that to do component healthy check
17 maxNameLength: 255 # The maximum length of the name or alias that can be created in Milvus, including the collection name, collection alias, partition name, and field name.
18 maxFieldNum: 64 # The maximum number of field can be created when creating in a collection. It is strongly DISCOURAGED to set maxFieldNum >= 64.
19 maxTaskNum: 1024 # max task number of proxy task queue
20 maxDimension: 32768 # The maximum number of dimensions of a vector can have when creating in a collection.
21 slowQuerySpanInSeconds: 1 # threshold for slow query detection in seconds.
22 grpc:
23 serverMaxSendSize: 268435456
24 serverMaxRecvSize: 67108864
25 clientMaxSendSize: 268435456
26 clientMaxRecvSize: 67108864
27
28# Related configuration of queryCoord, used to manage topology and load balancing for the query nodes, and handoff from growing segments to sealed segments.
29queryCoord:
30 autoHandoff: true # Enable auto handoff
31 autoBalance: true # Enable auto balance
32 autoBalanceChannel: true # Enable auto balance channel
33 balancer: ScoreBasedBalancer # Balancer to use
34 overloadedMemoryThresholdPercentage: 90 # The threshold percentage that memory overload
35 balanceIntervalSeconds: 60
36 memoryUsageMaxDifferencePercentage: 30
37 checkInterval: 1000
38 brokerTimeout: 5000 # 5000ms, querycoord broker rpc timeout
39 channelTaskTimeout: 60000 # 1 minute
40 segmentTaskTimeout: 120000 # 2 minute
41 distPullInterval: 500
42 heartbeatAvailableInterval: 10000 # 10s, Only QueryNodes which fetched heartbeats within the duration are available
43 loadTimeoutSeconds: 600
44 checkHandoffInterval: 5000
45 enableActiveStandby: false
46 channelExclusiveNodeFactor: 4 # the least node number for enable channel's exclusive mode
47 updateCollectionLoadStatusInterval: 5 # 5m, max interval of updating collection loaded status for check health
48 checkExecutedFlagInterval: 100 # the interval of check executed flag to force to pull dist
49 channelTaskCapFraction: 0.3 # fraction of total task execution capacity reserved for channel tasks per node (0.0-1.0)
50 checkHealthInterval: 3000 # 3s, the interval when query coord try to check health of query node
51 checkHealthRPCTimeout: 2000 # 100ms, the timeout of check health rpc to query node
52 collectionObserverInterval: 200 # the interval of collection observer
53 collectionRecoverTimes: 3 # if collection recover times reach the limit during loading state, release it
54 observerTaskParallel: 16 # the parallel observer dispatcher task number
55 resourceExhaustionPenaltyDuration: 30
56 resourceExhaustionCleanupInterval: 10 # Interval (in seconds) for cleaning up expired resource exhaustion marks on query nodes.
57 grpc:
58 serverMaxSendSize: 536870912
59 serverMaxRecvSize: 268435456
60 clientMaxSendSize: 268435456
61 clientMaxRecvSize: 536870912
62
63# Related configuration of queryNode, used to run hybrid search between vector and scalar data.
64queryNode:
65 dataSync:
66 flowGraph:
67 maxQueueLength: 16 # The maximum size of task queue cache in flow graph in query node.
68 maxParallelism: 1024 # Maximum number of tasks executed in parallel in the flowgraph
69 maxParallelSyncMgrTasksPerCPUCore: 16 # The max concurrent sync task number of datanode sync mgr per CPU core
70 stats:
71 publishInterval: 1000 # The interval that query node publishes the node statistics information, including segment status, cpu usage, memory usage, health status, etc. Unit: ms.
72 segcore:
73 knowhereThreadPoolNumRatio: 4
74 # Use more threads to make better use of SSD throughput in disk index.
75 # This parameter is only useful when enable-disk = true.
76 # And this value should be a number greater than 1 and less than 32.
77 chunkRows: 128 # The number of vectors in a chunk.
78 interimIndex: # build a vector temperate index for growing segment or binlog to accelerate search
79 enableIndex: true
80 nlist: 128 # segment index nlist
81 nprobe: 16 # nprobe to search segment, based on your accuracy requirement, must smaller than nlist
82 memExpansionRate: 1.15 # the ratio of building interim index memory usage to raw data
83 loadMemoryUsageFactor: 1 # The multiply factor of calculating the memory usage while loading segments
84 enableDisk: false # enable querynode load disk index, and search on disk index
85 maxDiskUsagePercentage: 95
86 grouping:
87 maxNQ: 1000
88 topKMergeRatio: 20
89 scheduler:
90 receiveChanSize: 10240
91 unsolvedQueueSize: 10240
92 # maxReadConcurrentRatio is the concurrency ratio of read task (search task and query task).
93 # Max read concurrency would be the value of runtime.NumCPU * maxReadConcurrentRatio.
94 # It defaults to 2.0, which means max read concurrency would be the value of runtime.NumCPU * 2.
95 # Max read concurrency must greater than or equal to 1, and less than or equal to runtime.NumCPU * 100.
96 # (0, 100]
97 maxReadConcurrentRatio: 1
98 cpuRatio: 10 # ratio used to estimate read task cpu usage.
99 maxTimestampLag: 86400
100 # read task schedule policy: fifo(by default), user-task-polling.
101 scheduleReadPolicy:
102 # fifo: A FIFO queue support the schedule.
103 # user-task-polling:
104 # The user's tasks will be polled one by one and scheduled.
105 # Scheduling is fair on task granularity.
106 # The policy is based on the username for authentication.
107 # And an empty username is considered the same user.
108 # When there are no multi-users, the policy decay into FIFO
109 name: fifo
110 # user-task-polling configure:
111 taskQueueExpire: 60 # 1 min by default, expire time of inner user task queue since queue is empty.
112 enableCrossUserGrouping: false # false by default Enable Cross user grouping when using user-task-polling policy. (close it if task of any user can not merge others).
113 maxPendingTaskPerUser: 1024 # 50 by default, max pending task in scheduler per user.
114 grpc:
115 serverMaxSendSize: 536870912
116 serverMaxRecvSize: 268435456
117 clientMaxSendSize: 268435456
118 clientMaxRecvSize: 536870912
119
120indexCoord:
121 bindIndexNodeMode:
122 enable: false
123 withCred: false
124 segment:
125 minSegmentNumRowsToEnableIndex: 1024 # It's a threshold. When the segment num rows is less than this value, the segment will not be indexed
126
127indexNode:
128 scheduler:
129 buildParallel: 1
130
131dataCoord:
132 channel:
133 watchTimeoutInterval: 300 # Timeout on watching channels (in seconds). Datanode tickler update watch progress will reset timeout timer.
134 balanceSilentDuration: 300 # The duration before the channelBalancer on datacoord to run
135 balanceInterval: 360 #The interval for the channelBalancer on datacoord to check balance status
136 segment:
137 maxSize: 1024 # Maximum size of a segment in MB
138 diskSegmentMaxSize: 2048 # Maximum size of a segment in MB for collection which has Disk index
139 sealProportion: 0.12
140 # The time of the assignment expiration in ms
141 # Warning! this parameter is an expert variable and closely related to data integrity. Without specific
142 # target and solid understanding of the scenarios, it should not be changed. If it's necessary to alter
143 # this parameter, make sure that the newly changed value is larger than the previous value used before restart
144 # otherwise there could be a large possibility of data loss
145 assignmentExpiration: 2000
146 maxLife: 86400 # The max lifetime of segment in seconds, 24*60*60
147 # If a segment didn't accept dml records in maxIdleTime and the size of segment is greater than
148 # minSizeFromIdleToSealed, Milvus will automatically seal it.
149 # The max idle time of segment in seconds, 10*60.
150 maxIdleTime: 600
151 minSizeFromIdleToSealed: 16 # The min size in MB of segment which can be idle from sealed.
152 # The max number of binlog file for one segment, the segment will be sealed if
153 # the number of binlog file reaches to max value.
154 maxBinlogFileNumber: 32
155 smallProportion: 0.5 # The segment is considered as "small segment" when its # of rows is smaller than
156 # (smallProportion * segment max # of rows).
157 # A compaction will happen on small segments if the segment after compaction will have
158 compactableProportion: 0.85
159 # over (compactableProportion * segment max # of rows) rows.
160 # MUST BE GREATER THAN OR EQUAL TO <smallProportion>!!!
161 # During compaction, the size of segment # of rows is able to exceed segment max # of rows by (expansionRate-1) * 100%.
162 expansionRate: 1.25
163 enableCompaction: true # Enable data segment compaction
164 compaction:
165 enableAutoCompaction: true
166 rpcTimeout: 10 # compaction rpc request timeout in seconds
167 maxParallelTaskNum: 10 # max parallel compaction task number
168 indexBasedCompaction: true
169
170 levelzero:
171 forceTrigger:
172 minSize: 8 # The minmum size in MB to force trigger a LevelZero Compaction
173 deltalogMinNum: 10 # the minimum number of deltalog files to force trigger a LevelZero Compaction
174
175 enableGarbageCollection: true
176 gc:
177 interval: 3600 # gc interval in seconds
178 missingTolerance: 3600 # file meta missing tolerance duration in seconds, 3600
179 dropTolerance: 10800 # file belongs to dropped entity tolerance duration in seconds. 10800
180 enableActiveStandby: false
181 grpc:
182 serverMaxSendSize: 536870912
183 serverMaxRecvSize: 268435456
184 clientMaxSendSize: 268435456
185 clientMaxRecvSize: 536870912
186
187dataNode:
188 dataSync:
189 flowGraph:
190 maxQueueLength: 16 # Maximum length of task queue in flowgraph
191 maxParallelism: 1024 # Maximum number of tasks executed in parallel in the flowgraph
192 skipMode:
193 # when there are only timetick msg in flowgraph for a while (longer than coldTime),
194 # flowGraph will turn on skip mode to skip most timeticks to reduce cost, especially there are a lot of channels
195 enable: true
196 skipNum: 4
197 coldTime: 60
198 segment:
199 insertBufSize: 16777216 # Max buffer size to flush for a single segment.
200 deleteBufBytes: 16777216 # Max buffer size to flush del for a single channel
201 syncPeriod: 600 # The period to sync segments if buffer is not empty.
202 # can specify ip for example
203 # ip: 127.0.0.1
204 grpc:
205 serverMaxSendSize: 536870912
206 serverMaxRecvSize: 268435456
207 clientMaxSendSize: 268435456
208 clientMaxRecvSize: 536870912
209 memory:
210 forceSyncEnable: true # Set true to force sync if memory usage is too high
211 forceSyncSegmentNum: 1 # number of segments to sync, segments with top largest buffer will be synced.
212 forceSyncWatermark: 0.5 # memory watermark for standalone, upon reaching this watermark, segments will be synced.
213 channel:
214 # specify the size of global work pool of all channels
215 # if this parameter <= 0, will set it as the maximum number of CPUs that can be executing
216 # suggest to set it bigger on large collection numbers to avoid blocking
217 workPoolSize: -1
218 # specify the size of global work pool for channel checkpoint updating
219 # if this parameter <= 0, will set it as 1000
220 # suggest to set it bigger on large collection numbers to avoid blocking
221 updateChannelCheckpointMaxParallel: 10
222
223grpc:
224 client:
225 compressionEnabled: false
226 dialTimeout: 200
227 keepAliveTime: 10000
228 keepAliveTimeout: 20000
229 maxMaxAttempts: 10
230 initialBackoff: 0.2
231 initialBackOff: 0.2 # seconds
232 maxBackoff: 10 # seconds
233
234quotaAndLimits:
235 enabled: true # `true` to enable quota and limits, `false` to disable.
236 limits:
237 maxCollectionNum: 65536
238 maxCollectionNumPerDB: 65536
239 # quotaCenterCollectInterval is the time interval that quotaCenter
240 # collects metrics from Proxies, Query cluster and Data cluster.
241 # seconds, (0 ~ 65536)
242 quotaCenterCollectInterval: 3
243 # FactorChangeThreshold defines the minimum relative change in factor to trigger an update.
244 # If the factor change is less than this threshold (e.g., 5%), the update is skipped
245 # to reduce unnecessary proxy updates. Range: (0, 1]
246 factorChangeThreshold: 0.05
247 ddl:
248 enabled: false
249 collectionRate: -1 # qps, default no limit, rate for CreateCollection, DropCollection, LoadCollection, ReleaseCollection
250 partitionRate: -1 # qps, default no limit, rate for CreatePartition, DropPartition, LoadPartition, ReleasePartition
251 indexRate:
252 enabled: false
253 max: -1 # qps, default no limit, rate for CreateIndex, DropIndex
254 flushRate:
255 enabled: false
256 max: -1 # qps, default no limit, rate for flush
257 compactionRate:
258 enabled: false
259 max: -1 # qps, default no limit, rate for manualCompaction
260 dml:
261 # dml limit rates, default no limit.
262 # The maximum rate will not be greater than max.
263 enabled: false
264 insertRate:
265 collection:
266 max: -1 # MB/s, default no limit
267 max: -1 # MB/s, default no limit
268 deleteRate:
269 collection:
270 max: -1 # MB/s, default no limit
271 max: -1 # MB/s, default no limit
272 bulkLoadRate:
273 collection:
274 max: -1 # MB/s, default no limit, not support yet. TODO: limit bulkLoad rate
275 max: -1 # MB/s, default no limit, not support yet. TODO: limit bulkLoad rate
276 dql:
277 # dql limit rates, default no limit.
278 # The maximum rate will not be greater than max.
279 enabled: false
280 searchRate:
281 collection:
282 max: -1 # vps (vectors per second), default no limit
283 max: -1 # vps (vectors per second), default no limit
284 queryRate:
285 collection:
286 max: -1 # qps, default no limit
287 max: -1 # qps, default no limit
288 limitWriting:
289 # forceDeny false means dml requests are allowed (except for some
290 # specific conditions, such as memory of nodes to water marker), true means always reject all dml requests.
291 forceDeny: false
292 ttProtection:
293 enabled: false
294 # maxTimeTickDelay indicates the backpressure for DML Operations.
295 # DML rates would be reduced according to the ratio of time tick delay to maxTimeTickDelay,
296 # if time tick delay is greater than maxTimeTickDelay, all DML requests would be rejected.
297 # seconds
298 maxTimeTickDelay: 1200
299 memProtection:
300 # When memory usage > memoryHighWaterLevel, all dml requests would be rejected;
301 # When memoryLowWaterLevel < memory usage < memoryHighWaterLevel, reduce the dml rate;
302 # When memory usage < memoryLowWaterLevel, no action.
303 enabled: true
304 dataNodeMemoryLowWaterLevel: 0.85 # (0, 1], memoryLowWaterLevel in DataNodes
305 dataNodeMemoryHighWaterLevel: 0.95 # (0, 1], memoryHighWaterLevel in DataNodes
306 queryNodeMemoryLowWaterLevel: 0.85 # (0, 1], memoryLowWaterLevel in QueryNodes
307 queryNodeMemoryHighWaterLevel: 0.95 # (0, 1], memoryHighWaterLevel in QueryNodes
308 growingSegmentsSizeProtection:
309 # No action will be taken if the growing segments size is less than the low watermark.
310 # When the growing segments size exceeds the low watermark, the dml rate will be reduced,
311 # but the rate will not be lower than `minRateRatio * dmlRate`.
312 enabled: false
313 minRateRatio: 0.5
314 lowWaterLevel: 0.2
315 highWaterLevel: 0.4
316 diskProtection:
317 enabled: true # When the total file size of object storage is greater than `diskQuota`, all dml requests would be rejected;
318 diskQuota: -1 # MB, (0, +inf), default no limit
319 diskQuotaPerCollection: -1 # MB, (0, +inf), default no limit
320 loadedDiskQuota: -1 # MB, (0, +inf), default no limit
321 limitReading:
322 # forceDeny false means dql requests are allowed (except for some
323 # specific conditions, such as collection has been dropped), true means always reject all dql requests.
324 forceDeny: false
评价此篇文章
