This topic describes the parameters for ApsaraDB for MongoDB 5.0.
Replica set
|
Parameter |
Restart required |
Default |
Value |
Version |
Description |
Documentation |
|
setParameter.internalDocumentSourceGroupMaxMemoryBytes |
No |
104857600 |
[10485760-10485760000] |
Unlimited |
Specifies the maximum amount of memory 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.internalQueryMaxPushBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum amount of memory that the |
Not publicly documented |
|
setParameter.internalQueryMaxAddToSetBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum amount of memory that the |
Not publicly documented |
|
setParameter.internalDocumentSourceCursorBatchSizeBytes |
No |
4194304 |
[1048576-104857600] |
Unlimited |
Specifies the maximum amount of data that a DocumentSourceCursor caches from the underlying PlanExecutor before pipeline processing. |
Not publicly documented |
|
setParameter.internalQueryMaxBlockingSortMemoryUsageBytes |
No |
104857600 |
[33554432-268435456] |
Unlimited |
Specifies the maximum memory in bytes that a blocking sort stage can use. The default value is 100 MiB. |
Not publicly documented |
|
setParameter.internalQueryCacheMaxEntriesPerCollection |
No |
5000 |
[0-5000] |
Unlimited |
Specifies the maximum number of entries in the query plan cache for a collection. Note
This parameter applies only to the classic query engine, not the Slot-Based Execution (SBE) engine. |
Not publicly documented |
|
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. |
|
|
net.serviceExecutor |
Yes |
synchronous |
[synchronous|adaptive] |
Unlimited |
Determines the threading and execution model used by mongod or mongos. |
|
|
operationProfiling.mode |
Yes |
off |
[off|slowOp|all] |
Unlimited |
Specifies the level for the database 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 |
Defines the threshold in milliseconds, above which an operation is considered a slow operation. |
|
|
replication.oplogGlobalIdEnabled |
Yes |
false |
[true|false] |
Unlimited |
Specifies whether to enable Global IDs (GIDs) to support two-way synchronization with services like Data Transmission Service (DTS) or mongoShake. |
Proprietary parameter |
|
replication.oplogSizeMB |
No |
10% |
[1024-1073741824] |
Unlimited |
The maximum size of the oplog in megabytes (MB). The default is 10% of the total disk size. |
|
|
rsconf.writeConcernMajorityJournalDefault |
No |
true |
[true|false] |
Unlimited |
Determines whether writes with |
|
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
Unlimited |
The timeout threshold in milliseconds for idle cursors. If a cursor is idle for longer than this threshold, MongoDB closes it. Subsequent attempts to use the closed cursor result in a "cursor not found" error. |
|
|
setParameter.flowControlTargetLagSeconds |
No |
10 |
[1-600] |
Unlimited |
The threshold in seconds that triggers the flow control mechanism. Flow control is used to ensure the |
|
|
setParameter.maxTransactionLockRequestTimeoutMillis |
No |
5 |
[0-60] |
Unlimited |
The lock wait timeout for transactions, in milliseconds. |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
Unlimited |
Specifies whether to use streaming replication. A value of |
|
|
setParameter.replWriterThreadCount |
Yes |
16 |
[1-256] |
Unlimited |
The maximum number of threads for applying replicated operations in parallel. The effective maximum is twice the number of available CPU cores. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Specifies whether to enable aggressive memory decommitment for tcmalloc. A value of |
|
|
setParameter.tcmallocReleaseRate |
No |
1 |
[1-10] |
Unlimited |
Sets the rate at which tcmalloc returns memory to the operating system. A higher value corresponds to a faster release rate. |
|
|
setParameter.transactionLifetimeLimitSeconds |
No |
60 |
[1-300] |
Unlimited |
The total lifetime of a transaction in seconds. Transactions that exceed this limit are automatically aborted to relieve pressure on the WiredTiger cache. |
|
|
storage.oplogMinRetentionHours |
No |
0 |
[0.00-720.00] |
Unlimited |
The minimum retention period for oplog entries, in hours. The value can be a floating-point number. |
|
|
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 new collections. To use different compression algorithms for different collections, you must use the explicit |
|
|
setParameter.minSnapshotHistoryWindowInSeconds |
No |
300 |
[0-600] |
Unlimited |
Specifies the duration in seconds that the WiredTiger engine retains snapshot history. A value of |
|
|
rsconf.chainingAllowed |
No |
true |
[true|false] |
Unlimited |
Specifies whether to allow chained replication in a replica set. For example, a secondary member can replicate data from the primary member and, in turn, serve as the replication source for another secondary member. |
|
setParameter.periodicNoopIntervalSecs |
Yes |
10 |
[1-10] |
Unlimited |
The interval in seconds at which a noop operation is performed. |
Sharded cluster
|
Parameter |
Restart required |
Default |
Value |
Minor version range |
Description |
Documentation |
|
setParameter.internalDocumentSourceGroupMaxMemoryBytes |
No |
104857600 |
[10485760-10485760000] |
Unlimited |
Specifies the maximum memory the $group operator can use. Data that exceeds this limit spills to disk. |
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.internalQueryMaxPushBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum amount of memory that the $push operator can use. |
Not publicly documented |
|
setParameter.internalQueryMaxAddToSetBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Specifies the maximum amount of memory that the $addToSet operator can use. |
Not publicly documented |
|
setParameter.internalDocumentSourceCursorBatchSizeBytes |
No |
4194304 |
[1048576-104857600] |
Unlimited |
Specifies the maximum amount of data that a 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 a blocking sort stage can use during a query. The default value is 100 MiB. |
Not publicly documented |
|
setParameter.internalQueryCacheMaxEntriesPerCollection |
No |
5000 |
[0-5000] |
Unlimited |
Specifies the maximum number of entries in the query plan cache for a collection. Note
This parameter applies only to the classic query engine, not SBE. |
Not publicly documented |
|
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. |
|
|
net.serviceExecutor |
Yes |
synchronous |
[synchronous|adaptive] |
Unlimited |
Determines the threading and execution model used by mongod or mongos. |
|
|
operationProfiling.mode |
Yes |
off |
[off|slowOp|all] |
Unlimited |
Specifies the level for the database 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 |
The time in milliseconds after which an operation is considered slow. |
|
|
replication.oplogGlobalIdEnabled |
Yes |
false |
[true|false] |
Unlimited |
Specifies whether to enable Global IDs (GIDs), which support bidirectional synchronization with services like DTS and mongoShake. |
Proprietary parameter |
|
replication.oplogSizeMB |
No |
10% |
[1024-1073741824] |
Unlimited |
The maximum size of the oplog in megabytes (MB). The default is 10% of the total disk size. |
|
|
rsconf.writeConcernMajorityJournalDefault |
No |
true |
[true|false] |
Unlimited |
Determines whether writes with a majority write concern must be committed to the on-disk journal before being acknowledged. |
|
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
Unlimited |
The idle timeout in milliseconds for cursors. MongoDB closes a cursor that is idle for longer than this period, and subsequent attempts to use it fail with a "cursor not found" error. |
|
|
setParameter.flowControlTargetLagSeconds |
No |
10 |
[1-600] |
Unlimited |
The replication lag, in seconds, that triggers flow control. This mechanism ensures the majority commit point does not fall too far behind. |
|
|
setParameter.maxTransactionLockRequestTimeoutMillis |
No |
5 |
[0-60] |
Unlimited |
The maximum time in milliseconds a transaction waits for necessary locks. |
|
|
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 means the batch size is limited only by the 16 MB document size limit. |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
Unlimited |
Specifies whether to enable streaming replication. |
|
|
setParameter.rangeDeleterBatchDelayMS |
No |
20 |
[0-600000] |
Unlimited |
The delay in milliseconds between batches of deletions during the cleanup phase of a chunk migration. This also affects the |
|
|
setParameter.rangeDeleterBatchSize |
No |
0 |
[0-1000] |
Unlimited |
The maximum number of documents in a single batch for asynchronous deletion during the cleanup phase of a chunk migration. A value of 0 allows the system to automatically select a reasonable batch size, which is typically 128. |
|
|
setParameter.replWriterThreadCount |
Yes |
16 |
[1-256] |
Unlimited |
The maximum number of threads for applying replicated operations in parallel. The effective maximum is twice the number of available CPU cores. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Specifies whether to enable aggressive memory decommitment for tcmalloc. |
|
|
setParameter.tcmallocReleaseRate |
No |
1 |
[1-10] |
Unlimited |
Sets the rate at which tcmalloc returns memory to the operating system. A higher value indicates a faster release rate. |
|
|
setParameter.transactionLifetimeLimitSeconds |
No |
60 |
[1-300] |
Unlimited |
The maximum lifetime of a transaction in seconds. The system aborts transactions that exceed this limit to relieve pressure on the WiredTiger cache. |
|
|
storage.oplogMinRetentionHours |
No |
0 |
[0.00-720.00] |
Unlimited |
The minimum retention period for oplog entries, in hours. The value can be a floating-point number. |
|
|
storage.wiredTiger.collectionConfig.blockCompressor |
Yes |
snappy |
[snappy|zlib|zstd|none] |
Unlimited |
Sets the default storage compression algorithm for collections. This setting applies only to newly created collections. To use a different compression algorithm for a specific collection, you must specify it when you run the |
|
|
setParameter.receiveChunkWaitForRangeDeleterTimeoutMS |
No |
10000 |
[10000-3600000] |
Unlimited |
The time in milliseconds to wait for orphaned documents to be deleted 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 0 disables the snapshot history window. |
|
|
rsconf.chainingAllowed |
No |
true |
[true|false] |
Unlimited |
Specifies whether to allow chained replication within a shard. For example, data can be replicated from the primary to a secondary member, and then from that secondary to a hidden member; or from the primary to a hidden member, and then to a secondary member. |
|
setParameter.periodicNoopIntervalSecs |
Yes |
10 |
[1-10] |
Unlimited |
The interval, in seconds, at which a no-op write is performed. |
Sharded cluster (mongos)
|
Parameter |
Restart required |
Default |
Value |
Minor version range |
Description |
Official documentation |
|
setParameter.readHedgingMode |
No |
on |
[on|off] |
Unlimited |
Specifies whether to enable Hedged Reads support. |
|
|
net.compression.compressors |
Yes |
snappy,zstd,zlib |
[snappy|zlib|zstd|snappy,zstd,zlib|disabled] |
Unlimited |
Specifies the network compression algorithm for |
|
|
net.serviceExecutor |
Yes |
synchronous |
[synchronous|adaptive] |
Unlimited |
Sets the threading and execution model for |
|
|
operationProfiling.slowOpThresholdMs |
No |
100 |
[0-65536] |
Unlimited |
The threshold in milliseconds for slow operations. Operations whose duration exceeds this value are considered slow. |
|
|
setParameter.cursorTimeoutMillis |
No |
600000 |
[1-2147483647] |
Unlimited |
Specifies the idle time in milliseconds before the server automatically closes a cursor. Attempting to use a closed cursor returns a "cursor not found" error. |
|
|
setParameter.ShardingTaskExecutorPoolHostTimeoutMS |
No |
300000 |
[60000-3600000] |
Unlimited |
Specifies the time in milliseconds before |
|
|
setParameter.ShardingTaskExecutorPoolMaxConnecting |
No |
2 |
[1-32] |
Unlimited |
Specifies the maximum number of concurrent connections that the TaskExecutor connection pool can establish. This parameter controls the rate at which |
|
|
setParameter.ShardingTaskExecutorPoolMaxSize |
No |
32767 |
[1-32767] |
Unlimited |
Specifies the maximum number of connections in each TaskExecutor connection pool. |
|
|
setParameter.ShardingTaskExecutorPoolMinSize |
No |
1 |
[1-256] |
Unlimited |
Specifies the minimum number of connections in each TaskExecutor connection pool. |
|
|
setParameter.ShardingTaskExecutorPoolRefreshRequirementMS |
No |
60000 |
[30000-3600000] |
Unlimited |
Specifies the interval in milliseconds at which |
|
|
setParameter.ShardingTaskExecutorPoolRefreshTimeoutMS |
No |
20000 |
[5000-600000] |
Unlimited |
Specifies the duration, in milliseconds, that |
|
|
setParameter.taskExecutorPoolSize |
Yes |
1 |
[1-32] |
Unlimited |
Specifies the number of TaskExecutor connection pools on a |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Controls whether to enable aggressive memory decommitment for |
|
|
setParameter.tcmallocReleaseRate |
No |
1 |
[1-10] |
Unlimited |
Sets the rate at which |
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 |