MongoDB 6.0 parameters
This topic describes the parameters for ApsaraDB for MongoDB 6.0.
Replica set
|
Parameter |
Restart required |
Default |
Value range |
Minor version range |
Description |
Official documentation |
|
setParameter.internalDocumentSourceGroupMaxMemoryBytes |
No |
104857600 |
[10485760-10485760000] |
Unlimited |
Specifies the maximum memory that the |
Not public |
|
setParameter.timeseriesBucketMaxCount |
Yes |
1000 |
[1-10000] |
Unlimited |
Specifies the maximum number of measurements per bucket in a time-series collection. |
Not public |
|
setParameter.timeseriesIdleBucketExpiryMemoryUsageThreshold |
No |
5 |
[0-6710886400] |
Unlimited |
Specifies the memory usage threshold that triggers the expiration of idle buckets in a time-series collection. The default value is 5% of the available system memory. |
Not public |
|
setParameter.internalQueryMaxPushBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum memory that the |
Not public |
|
setParameter.internalQueryMaxAddToSetBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum memory that the |
Not public |
|
setParameter.internalDocumentSourceCursorBatchSizeBytes |
No |
4194304 |
[1048576-104857600] |
Unlimited |
Specifies the maximum amount of data in bytes that a |
Not public |
|
setParameter.internalQueryMaxBlockingSortMemoryUsageBytes |
No |
104857600 |
[33554432-268435456] |
Unlimited |
Specifies the maximum amount of memory in bytes that a blocking sort operation can use. The default value is equivalent to 100 MB. |
Not public |
|
setParameter.internalQueryCacheMaxEntriesPerCollection |
No |
5000 |
[0-5000] |
Unlimited |
Specifies the maximum number of query plan cache entries for a collection. Note
This parameter applies only to the classic query engine, not the SBE query engine. |
Not public |
|
net.compression.compressors |
Yes |
snappy,zstd,zlib |
[snappy|zlib|zstd|snappy,zstd,zlib|disabled] |
Unlimited |
Specifies the network compression algorithm for |
|
|
operationProfiling.mode |
Yes |
off |
[off|slowOp|all] |
Unlimited |
Specifies the database profiler level. Note
Enabling this parameter can degrade instance performance. Use this parameter with caution in a production environment. |
|
|
operationProfiling.slowOpThresholdMs |
No |
100 |
[0-65536] |
Unlimited |
Specifies the duration in milliseconds after which an operation is considered a slow operation. |
|
|
replication.oplogGlobalIdEnabled |
Yes |
false |
[true|false] |
Unlimited |
Specifies whether to enable GID, which is required for two-way synchronization using DTS or mongoShake. |
Self-developed parameter. |
|
replication.oplogSizeMB |
No |
10% |
[1024-1073741824] |
Unlimited |
Specifies the maximum size of the oplog in MB. The default is 10% of the total disk size. |
|
|
rsconf.writeConcernMajorityJournalDefault |
No |
true |
[true|false] |
Unlimited |
Specifies whether write operations with a |
|
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
Unlimited |
Specifies the time in milliseconds after which an idle cursor expires and is deleted by MongoDB. Attempting to access an expired cursor returns a |
|
|
setParameter.flowControlTargetLagSeconds |
No |
10 |
[1-600] |
Unlimited |
Specifies the replication lag in seconds that triggers flow control. This mechanism prevents the majority commit point from lagging too far behind. |
|
|
setParameter.maxTransactionLockRequestTimeoutMillis |
No |
5 |
[0-60] |
Unlimited |
Specifies the timeout in milliseconds for a transaction to acquire a lock. |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
Unlimited |
Specifies whether to enable streaming replication. This feature is enabled by default. |
|
|
setParameter.replWriterThreadCount |
Yes |
16 |
[1-256] |
Unlimited |
Specifies the maximum number of threads for parallel replication. The effective maximum number of threads is twice the number of instance CPU cores. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Specifies whether to enable aggressive memory decommit for tcmalloc. This feature is disabled by default. |
|
|
setParameter.tcmallocReleaseRate |
No |
1 |
[1-10] |
Unlimited |
Sets the rate at which tcmalloc releases memory to the operating system. A higher value results in a faster release rate. |
|
|
setParameter.transactionLifetimeLimitSeconds |
No |
60 |
[1-300] |
Unlimited |
Specifies the maximum lifetime of a transaction in seconds. Transactions that exceed this limit are aborted to reduce pressure on the WiredTiger cache. |
|
|
storage.oplogMinRetentionHours |
No |
0 |
[0.00-720.00] |
Unlimited |
Specifies the retention period in hours for oplog entries. The value can be a floating-point number. |
|
|
storage.wiredTiger.collectionConfig.blockCompressor |
Yes |
snappy |
[snappy|zlib|zstd|none] |
Unlimited |
Set the storage compression algorithm for collection data (this setting applies only to new tables). If you want to use different compression algorithms for different tables, you need to use an explicit |
|
|
setParameter.minSnapshotHistoryWindowInSeconds |
No |
300 |
[0-600] |
Unlimited |
Specifies the duration in seconds for which the WiredTiger storage engine retains snapshot history. A value of |
|
|
rsconf.chainingAllowed |
No |
true |
[true|false] |
Unlimited |
Specifies whether to allow chained replication in the replica set. For example, data can be replicated from the primary to a secondary, which then replicates to a hidden member. Alternatively, a hidden member can replicate from the primary and then pass the data to another secondary. |
|
|
setParameter.periodicNoopIntervalSecs |
Yes |
10 |
[1-10] |
Unlimited |
Specifies the interval in seconds for writing noop operations. |
Sharded cluster
|
Parameter |
Restart required |
Default |
Range |
Minor version range |
Description |
Official documentation |
|
setParameter.internalDocumentSourceGroupMaxMemoryBytes |
No |
104857600 |
[10485760-10485760000] |
Unlimited |
Specifies the maximum amount of memory in bytes that the |
Not publicly documented |
|
setParameter.timeseriesBucketMaxCount |
Yes |
1000 |
[1-10000] |
Unlimited |
Specifies the maximum number of measurements that can be stored in a single bucket of a time series collection. |
Not publicly documented |
|
setParameter.timeseriesIdleBucketExpiryMemoryUsageThreshold |
No |
5 |
[0-6710886400] |
Unlimited |
Specifies the memory usage threshold that triggers the expiration of idle buckets in a time series collection. The default value is 5% of the available system memory. |
Not publicly documented |
|
setParameter.internalQueryMaxPushBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum amount of memory in bytes that the |
Not publicly documented |
|
setParameter.internalQueryMaxAddToSetBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum amount of memory in bytes that the |
Not publicly documented |
|
setParameter.internalDocumentSourceCursorBatchSizeBytes |
No |
4194304 |
[1048576-104857600] |
Unlimited |
Specifies the maximum amount of data in bytes that DocumentSourceCursor caches from the underlying PlanExecutor before pipeline processing. |
Not publicly documented |
|
setParameter.internalQueryMaxBlockingSortMemoryUsageBytes |
No |
104857600 |
[33554432-268435456] |
Unlimited |
Specifies the maximum amount of memory, in bytes, that blocking sort operations can use during query execution. The default value is 100 MB. |
Not publicly documented |
|
setParameter.internalQueryCacheMaxEntriesPerCollection |
No |
5000 |
[0-5000] |
Unlimited |
Specifies the maximum number of query plan cache entries for a collection. Note
Applies only to the classic query engine and not to SBE. |
Not publicly documented |
|
net.compression.compressors |
Yes |
snappy,zstd,zlib |
[snappy|zlib|zstd|snappy,zstd,zlib|disabled] |
Unlimited |
Specifies the network compression algorithms for a |
|
|
operationProfiling.mode |
Yes |
off |
[off|slowOp|all] |
Unlimited |
Specifies the profiling level for database operations. Note
Enabling this parameter can degrade instance performance. Use this parameter with caution in a production environment. |
|
|
operationProfiling.slowOpThresholdMs |
No |
100 |
[0-65536] |
Unlimited |
Specifies the threshold in milliseconds for slow operations. An operation is considered slow if its execution time exceeds this threshold. |
|
|
replication.oplogGlobalIdEnabled |
Yes |
false |
[true|false] |
Unlimited |
Specifies whether to enable GID to support two-way synchronization with DTS or mongoShake. |
Proprietary parameter |
|
replication.oplogSizeMB |
No |
10% |
[1024-1073741824] |
Unlimited |
Specifies the maximum size of the oplog collection in MB. The default is 10% of the total disk size. |
|
|
rsconf.writeConcernMajorityJournalDefault |
No |
true |
[true|false] |
Unlimited |
Specifies whether a write concern of |
|
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
Unlimited |
Specifies the expiration threshold in milliseconds for idle cursors. If a cursor remains idle for longer than this threshold, MongoDB deletes the cursor. A subsequent attempt to access the cursor returns a |
|
|
setParameter.flowControlTargetLagSeconds |
No |
10 |
[1-600] |
Unlimited |
Specifies the threshold in seconds that triggers the flow control mechanism. Flow control ensures that the majority commit point does not lag too far behind. |
|
|
setParameter.maxTransactionLockRequestTimeoutMillis |
No |
5 |
[0-60] |
Unlimited |
Specifies the timeout in milliseconds for a transaction to acquire a lock. |
|
|
setParameter.migrateCloneInsertionBatchSize |
No |
0 |
[0-1000] |
Unlimited |
Specifies the maximum number of documents in a single batch during the cloning step of a chunk migration. A value of |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
Unlimited |
Specifies whether to enable streaming replication. This feature is enabled by default. |
|
|
setParameter.rangeDeleterBatchDelayMS |
No |
20 |
[0-600000] |
Unlimited |
Specifies the delay in milliseconds between batch deletions during the cleanup step of a chunk migration. This also affects the |
|
|
setParameter.rangeDeleterBatchSize |
No |
0 |
[0-2147483647] |
Unlimited |
Specifies the maximum number of documents per batch for asynchronous deletion during the cleanup step of a chunk migration. A value of |
|
|
setParameter.replWriterThreadCount |
Yes |
16 |
[1-256] |
Unlimited |
Specifies the maximum number of threads for parallel replication. The effective maximum number of threads is twice the number of CPU cores of the instance. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Specifies whether to enable aggressive memory decommit for tcmalloc. This feature is disabled by default. |
|
|
setParameter.tcmallocReleaseRate |
No |
1 |
[1-10] |
Unlimited |
Specifies the rate at which tcmalloc releases memory to the operating system. A higher value indicates a faster release rate. |
|
|
setParameter.transactionLifetimeLimitSeconds |
No |
60 |
[1-300] |
Unlimited |
Specifies the total lifetime of a transaction in seconds. Transactions that run longer than this limit are aborted to relieve pressure on the WiredTiger cache. |
|
|
storage.oplogMinRetentionHours |
No |
0 |
[0.00-720.00] |
Unlimited |
Specifies the retention period in hours for the oplog. Floating-point numbers are supported. |
|
|
storage.wiredTiger.collectionConfig.blockCompressor |
Yes |
snappy |
[snappy|zlib|zstd|none] |
Unlimited |
Sets the storage compression algorithm for collection data. This change takes effect only for all newly created tables. If you want to use different compression algorithms for different tables, you need to use the explicit |
|
|
setParameter.receiveChunkWaitForRangeDeleterTimeoutMS |
No |
10000 |
[10000-3600000] |
Unlimited |
Specifies the timeout in milliseconds to wait for orphaned document deletion before a chunk migration begins. |
Not publicly documented |
|
setParameter.minSnapshotHistoryWindowInSeconds |
No |
300 |
[0-600] |
Unlimited |
Specifies the window in seconds for which the WiredTiger engine retains snapshot history. A value of |
|
|
rsconf.chainingAllowed |
No |
true |
[true|false] |
Unlimited |
Specifies whether to allow chained replication in a shard. For example, data is replicated from a primary node to a secondary node, and then from that secondary node to a hidden node. Alternatively, data can be replicated from a primary node to a hidden node, and then to a secondary node. |
|
|
setParameter.periodicNoopIntervalSecs |
Yes |
10 |
[1-10] |
Unlimited |
Specifies the interval in seconds at which noop operations are written. |
Sharded cluster (mongos)
|
Parameter |
Restart required |
Default |
Valid values |
Minor engine version |
Description |
Documentation |
|
setParameter.readHedgingMode |
No |
on |
[on|off] |
N/A |
Specifies whether to enable Hedged Reads. |
|
|
net.compression.compressors |
Yes |
snappy,zstd,zlib |
[snappy|zlib|zstd|snappy,zstd,zlib|disabled] |
N/A |
Specifies the network compression algorithm for a mongod or mongos. If multiple compressors are specified, they are prioritized in the order they are listed. |
|
|
operationProfiling.slowOpThresholdMs |
No |
100 |
[0-65536] |
N/A |
The threshold in milliseconds for slow operations. An operation is slow if its duration exceeds this value. |
|
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
N/A |
The timeout threshold in milliseconds for idle cursors. If a cursor remains idle for longer than this threshold, MongoDB removes the cursor. Subsequent attempts to access the cursor result in a "cursor not found" error. |
|
|
setParameter.ShardingTaskExecutorPoolHostTimeoutMS |
No |
300000 |
[60000-3600000] |
N/A |
The timeout in milliseconds after which a mongos drops all connections to a host's TaskExecutor connection pool. |
|
|
setParameter.ShardingTaskExecutorPoolMaxConnecting |
No |
2 |
[1-32] |
N/A |
The maximum number of concurrent connections that a mongos can open when initializing the TaskExecutor connection pool for a shard. This parameter controls the speed at which mongos establishes connections to mongod. |
|
|
setParameter.ShardingTaskExecutorPoolMaxSize |
No |
32767 |
[1-32767] |
N/A |
The maximum number of connections in each TaskExecutor connection pool for a shard. |
|
|
setParameter.ShardingTaskExecutorPoolMinSize |
No |
1 |
[1-256] |
N/A |
The minimum number of connections in each TaskExecutor connection pool for a shard. |
|
|
setParameter.ShardingTaskExecutorPoolRefreshRequirementMS |
No |
60000 |
[30000-3600000] |
N/A |
The interval in milliseconds at which a mongos performs a heartbeat check on idle connections in the TaskExecutor connection pool. |
|
|
setParameter.ShardingTaskExecutorPoolRefreshTimeoutMS |
No |
20000 |
[5000-600000] |
N/A |
The timeout in milliseconds for a mongos to wait for a heartbeat response. |
|
|
setParameter.taskExecutorPoolSize |
Yes |
1 |
[1-32] |
N/A |
The number of TaskExecutor connection pools for a mongos. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
N/A |
Specifies whether to enable aggressive memory decommit for tcmalloc. A value of 0 disables this feature. |
|
|
setParameter.tcmallocReleaseRate |
No |
1 |
[1-10] |
N/A |
Specifies the rate at which tcmalloc releases memory to the operating system. A higher value results in a faster release rate. |
Sharded cluster (ConfigServer)
|
Parameter |
Restart required |
Default |
Value |
Minor version |
Description |
Official documentation |
|
net.compression.compressors |
Yes |
snappy,zstd,zlib |
[snappy|zlib|zstd|snappy,zstd,zlib|disabled] |
Unlimited |
Specifies the network compression algorithm for mongod or mongos. If you specify multiple algorithms, they are prioritized in the order listed. |
|
|
operationProfiling.mode |
Yes |
off |
[off|slowOp|all] |
Unlimited |
Specifies the level for the query profiler. Note
Enabling this parameter can degrade instance performance. Use this parameter with caution in a production environment. |
|
|
operationProfiling.slowOpThresholdMs |
No |
100 |
[0-65536] |
Unlimited |
Sets the threshold in milliseconds for what is considered a slow operation. Operations that take longer than this value are considered slow. |
|
|
replication.oplogGlobalIdEnabled |
Yes |
false |
[true|false] |
Unlimited |
Specifies whether to enable global identifiers (GIDs) to support two-way synchronization with DTS or mongoShake. |
Self-developed parameter |
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
Unlimited |
Specifies the idle time in milliseconds before MongoDB closes an inactive cursor. Subsequent attempts to use the closed cursor will result in a "cursor not found" error. |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
Unlimited |
Specifies whether to enable streaming replication. The default value is true. |
|
|
storage.wiredTiger.collectionConfig.blockCompressor |
Yes |
snappy |
[snappy|zlib|zstd|none] |
Unlimited |
Specifies the default compression algorithm for collections. This setting only affects newly created collections. To use a different compression algorithm for a specific collection, use the |