This topic describes the parameters for ApsaraDB for MongoDB 7.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 (shard)
|
Parameter |
Restart required |
Default |
Values |
Minor engine version |
Description |
Documentation |
|
setParameter.internalDocumentSourceGroupMaxMemoryBytes |
No |
104857600 |
[10485760-10485760000] |
Unlimited |
Specifies the maximum memory in bytes that the $group operator can use. If this limit is exceeded, the excess data spills to disk. |
Not publicly available |
|
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 available |
|
setParameter.timeseriesIdleBucketExpiryMemoryUsageThreshold |
No |
5 |
[0-6710886400] |
Unlimited |
Specifies the memory usage threshold for expiring idle buckets in a time series collection. The default value is 5% of the available system memory. |
Not publicly available |
|
setParameter.internalQueryMaxPushBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum amount of memory in bytes that the $push operator can use. |
Not publicly available |
|
setParameter.internalQueryMaxAddToSetBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum amount of memory in bytes that the $addToSet operator can use. |
Not publicly available |
|
setParameter.internalDocumentSourceCursorBatchSizeBytes |
No |
4194304 |
[1048576-104857600] |
Unlimited |
Specifies the maximum data size in bytes that a |
Not publicly available |
|
setParameter.internalQueryMaxBlockingSortMemoryUsageBytes |
No |
104857600 |
[33554432-268435456] |
Unlimited |
Specifies the maximum amount of memory in bytes that a blocking sort stage can use during a query. The default value is 100 MB. |
Not publicly available |
|
setParameter.internalQueryCacheMaxEntriesPerCollection |
No |
5000 |
[0-5000] |
Unlimited |
Specifies the maximum number of entries in the query plan cache for a single collection. Note
This parameter applies only to the classic query engine, not the Slot-Based Execution (SBE) engine. |
Not publicly available |
|
net.compression.compressors |
Yes |
snappy,zstd,zlib |
[snappy|zlib|zstd|snappy,zstd,zlib|disabled] |
Unlimited |
Specifies the network compression algorithm for mongod or mongos instances. If you specify multiple algorithms, they are prioritized in descending order. |
|
|
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 |
Specifies the threshold in milliseconds for slow operations. Operations that take longer than this threshold are considered slow operations. |
|
|
replication.oplogGlobalIdEnabled |
Yes |
false |
[true|false] |
Unlimited |
Specifies whether to enable Global IDs (GIDs) to support bidirectional synchronization for services like Data Transmission Service (DTS) or mongoShake. |
self-developed parameter |
|
replication.oplogSizeMB |
No |
10% |
[1024-1073741824] |
Unlimited |
Specifies the maximum size of the oplog in megabytes (MB). The default value is 10% of the total disk size. |
|
|
rsconf.writeConcernMajorityJournalDefault |
No |
true |
[true|false] |
Unlimited |
Determines whether writes with a |
|
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
Unlimited |
Specifies the expiration threshold in milliseconds for idle cursors. MongoDB automatically closes a cursor that remains idle longer than this threshold. Attempting to use a closed cursor causes a "cursor not found" error. |
|
|
setParameter.flowControlTargetLagSeconds |
No |
10 |
[1-600] |
Unlimited |
Specifies the threshold in seconds that triggers the flowControl mechanism. This mechanism keeps the majority commit point from falling too far behind. |
|
|
setParameter.maxTransactionLockRequestTimeoutMillis |
No |
5 |
[0-60] |
Unlimited |
Specifies the timeout in milliseconds for acquiring locks within a transaction. |
|
|
setParameter.migrateCloneInsertionBatchSize |
No |
0 |
[0-1000] |
Unlimited |
Specifies the maximum number of documents in a single batch during the cloning stage of a chunk migration. A value of 0 (the default) means the batch size is limited only by the 16 MB BSON document size limit. |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
Unlimited |
Specifies whether to enable streaming replication, which is enabled by default ( |
|
|
setParameter.rangeDeleterBatchDelayMS |
No |
20 |
[0-600000] |
Unlimited |
Specifies the delay in milliseconds between batch deletions during the cleanup stage of a chunk migration. This also affects the |
|
|
setParameter.rangeDeleterBatchSize |
No |
0 |
[0-2147483647] |
Unlimited |
Specifies the maximum number of documents in a single batch for asynchronous deletions during the cleanup stage of a chunk migration. A value of 0 (the default) uses the kernel-preset batch size (equivalent to 2147483647, meaning no limit on the number of documents deleted per batch). |
|
|
setParameter.replWriterThreadCount |
Yes |
16 |
[1-256] |
Unlimited |
Specifies the maximum number of threads for parallel replication. The effective maximum is twice the number of the instance's CPU cores. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Specifies whether to enable aggressive memory decommitment for |
|
|
setParameter.tcmallocReleaseRate |
No |
1 |
[1-10] |
Unlimited |
Sets the rate at which |
|
|
setParameter.transactionLifetimeLimitSeconds |
No |
60 |
[1-300] |
Unlimited |
Specifies the lifetime of a transaction in seconds. The system aborts transactions that exceed this time limit to reduce pressure on the WiredTiger cache. |
|
|
storage.oplogMinRetentionHours |
No |
0 |
[0.00-720.00] |
Unlimited |
Specifies the minimum retention period in hours for oplog entries. Supports floating-point numbers. |
|
|
storage.wiredTiger.collectionConfig.blockCompressor |
Yes |
snappy |
[snappy|zlib|zstd|none] |
Unlimited |
Sets the default storage compression algorithm for collection data. This change affects only newly created collections. To use a different compression algorithm for a specific collection, use the explicit |
|
|
setParameter.receiveChunkWaitForRangeDeleterTimeoutMS |
No |
10000 |
[10000-3600000] |
Unlimited |
Specifies the timeout in milliseconds to wait for the deletion of orphaned documents before a chunk migration begins. |
Not publicly available |
|
setParameter.minSnapshotHistoryWindowInSeconds |
No |
300 |
[0-600] |
Unlimited |
Specifies the minimum duration in seconds that the WiredTiger engine retains snapshot history. A value of 0 disables history retention. |
|
|
rsconf.chainingAllowed |
No |
true |
[true|false] |
Unlimited |
Specifies whether chained replication is allowed in the shard. For example, a primary member replicates to a secondary member, which in turn replicates to a hidden member; or a primary member replicates to a hidden member, which then replicates to a secondary member. |
|
|
setParameter.periodicNoopIntervalSecs |
Yes |
10 |
[1-10] |
Unlimited |
Specifies the interval in seconds for no-op writes. |
Sharded cluster (mongos)
|
Parameter |
Restart required |
Default |
Value |
Minor version |
Description |
Documentation |
|
setParameter.taskExecutorPoolSize |
Yes |
1 |
[1-32] |
Base version 7.0.26 and later |
Specifies the number of TaskExecutor connection pools on a mongos instance. |
|
|
setParameter.readHedgingMode |
No |
on |
[on|off] |
N/A |
Controls 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 mongod or mongos instances. If you specify multiple algorithms, they are prioritized in descending order. |
|
|
operationProfiling.slowOpThresholdMs |
No |
100 |
[0-65536] |
N/A |
Specifies the threshold in milliseconds for slow operations. Operations exceeding this threshold are considered slow. |
|
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
N/A |
Specifies the expiration threshold in milliseconds for idle cursors. If a cursor remains idle for longer than this threshold, MongoDB automatically closes the cursor. Subsequent attempts to use the closed cursor result in a "cursor not found" error. |
|
|
setParameter.ShardingTaskExecutorPoolHostTimeoutMS |
No |
300000 |
[60000-3600000] |
N/A |
Specifies the timeout in milliseconds after which a mongos instance drops all connections in the TaskExecutor connection pool for a specific host. |
|
|
setParameter.ShardingTaskExecutorPoolMaxConnecting |
No |
2 |
[1-32] |
N/A |
Specifies the maximum number of concurrent connections that can be established when initializing the TaskExecutor connection pool for a sharded instance. This parameter controls the rate at which a mongos instance establishes connections to a mongod instance. |
|
|
setParameter.ShardingTaskExecutorPoolMaxSize |
No |
32767 |
[1-32767] |
N/A |
Specifies the maximum number of connections in each TaskExecutor connection pool for a sharded instance. |
|
|
setParameter.ShardingTaskExecutorPoolMinSize |
No |
1 |
[1-256] |
N/A |
Specifies the minimum number of connections in each TaskExecutor connection pool for a sharded instance. |
|
|
setParameter.ShardingTaskExecutorPoolRefreshRequirementMS |
No |
60000 |
[30000-3600000] |
N/A |
Specifies the interval in milliseconds at which a mongos instance sends heartbeats to check idle connections in the TaskExecutor connection pool. |
|
|
setParameter.ShardingTaskExecutorPoolRefreshTimeoutMS |
No |
20000 |
[5000-600000] |
N/A |
Specifies how long, in milliseconds, a mongos instance waits for a heartbeat response. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
N/A |
Controls whether to enable aggressive memory decommit for tcmalloc. A value of 0 (the default) disables this feature. |
|
|
setParameter.tcmallocReleaseRate |
No |
1 |
[1-10] |
N/A |
Sets the rate at which tcmalloc releases memory back to the operating system. A higher value indicates a faster release rate. |
Sharded cluster (ConfigServer)
|
Parameter |
Requires restart |
Default |
Value |
Minor version |
Description |
Documentation |
|
net.compression.compressors |
Yes |
snappy,zstd,zlib |
[snappy|zlib|zstd|snappy,zstd,zlib|disabled] |
N/A |
Sets the network compression algorithms for mongod or mongos. The algorithms are applied in the order listed. |
|
|
operationProfiling.mode |
Yes |
off |
[off|slowOp|all] |
N/A |
Sets the mode 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] |
N/A |
Sets the threshold in milliseconds that defines a slow operation. |
|
|
replication.oplogGlobalIdEnabled |
Yes |
false |
[true|false] |
N/A |
Controls whether to enable GID, which is required for two-way synchronization with services like Data Transmission Service (DTS) or mongoShake. |
self-developed parameter |
|
replication.oplogSizeMB |
No |
10% |
[1024-1073741824] |
N/A |
The maximum size of the oplog collection in MB. The default value is 10% of the total disk size. |
|
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
N/A |
The expiration threshold in milliseconds for an idle cursor. If a cursor remains idle for longer than this threshold, MongoDB automatically closes the cursor. Subsequent attempts to use the closed cursor result in a "cursor not found" error. |
|
|
setParameter.flowControlTargetLagSeconds |
No |
10 |
[1-600] |
N/A |
The threshold in seconds that triggers the flow control mechanism. Flow control is used to ensure that the majority commit point does not fall too far behind. |
|
|
setParameter.maxTransactionLockRequestTimeoutMillis |
No |
5 |
[0-60] |
N/A |
The time in milliseconds a transaction will wait to acquire a lock before timing out. |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
N/A |
Enables or disables streaming replication. |
|
|
setParameter.replWriterThreadCount |
Yes |
16 |
[1-256] |
N/A |
The maximum number of threads for parallel replication in primary-secondary synchronization. The effective maximum number of threads is twice the number of the instance's CPU cores. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
N/A |
Enables or disables aggressive memory decommit for tcmalloc. |
|
|
setParameter.tcmallocReleaseRate |
No |
1 |
[1-10] |
N/A |
The rate at which tcmalloc releases memory to the OS. A higher value means a faster rate. |
|
|
setParameter.transactionLifetimeLimitSeconds |
No |
60 |
[1-300] |
N/A |
The lifetime of a transaction in seconds. A transaction that runs longer than this limit is aborted to relieve pressure on the WT cache. |
|
|
storage.wiredTiger.collectionConfig.blockCompressor |
Yes |
snappy |
[snappy|zlib|zstd|none] |
N/A |
Sets the default storage compression algorithm for newly created collections. This change does not affect existing collections. To use different compression algorithms for different collections, you must explicitly run the |