All Products
Search
Document Center

ApsaraDB for MongoDB:Parameters for MongoDB 8.0

Last Updated:Mar 28, 2026

The following tables list the configurable parameters for ApsaraDB for MongoDB 8.0, organized by deployment type. For each parameter, the table shows the parameter name, whether a restart is required, the default value, the valid value range, the applicable minor version range, and a link to the MongoDB official documentation where available.

Replica set

Parameter nameRestart requiredDefault valueValid valuesMinor version rangeDescriptionOfficial documentation
setParameter.internalDocumentSourceGroupMaxMemoryBytesNo104857600[10485760-10485760000]UnlimitedThe maximum memory available to the $group operator. When this limit is exceeded, excess data spills to disk.Not public
setParameter.timeseriesBucketMaxCountYes1000[1-10000]UnlimitedThe maximum number of measurements stored in a single bucket of a time-series collection.Private
setParameter.timeseriesIdleBucketExpiryMemoryUsageThresholdNo5[0-6710886400]UnlimitedThe memory usage threshold for expiring idle buckets in a time-series collection. The default value of 5 represents 5% of available system memory.Not public
setParameter.timeseriesSideBucketCatalogMemoryUsageThresholdNo104857600[52428800-209715200]UnlimitedThe memory usage threshold for the side bucket catalog of a time-series collection. Defaults to 100 MB. When this threshold is exceeded, idle buckets are expired.Not public
setParameter.internalQueryMaxPushBytesNo104857600[10485760-1048576000]UnlimitedThe maximum memory available to the $push operator.Private
setParameter.internalQueryMaxAddToSetBytesNo104857600[10485760-1048576000]UnlimitedThe maximum memory available to the $addToSet operator.Not public
setParameter.internalDocumentSourceCursorBatchSizeBytesNo4194304[1048576-104857600]UnlimitedThe maximum amount of data that a DocumentSourceCursor can cache from the underlying PlanExecutor before pipeline processing begins.Not public
setParameter.internalQueryMaxBlockingSortMemoryUsageBytesNo104857600[33554432-268435456]UnlimitedThe maximum memory a blocking sort stage can use during a query. Unit: bytes. Defaults to 100 MB.Private
setParameter.internalQueryCacheMaxEntriesPerCollectionNo5000[0-5000]UnlimitedThe maximum number of entries in the query plan cache per collection.
Note

Applies only to the classic query engine, not the slot-based execution (SBE) query engine.

Unpublished
net.compression.compressorsYessnappy,zstd,zlib[snappy|zlib|zstd|snappy,zstd,zlib|disabled]UnlimitedThe network compression algorithm used by mongod or mongos. Valid values: snappy, zlib, zstd, snappy,zstd,zlib (all three in priority order), disabled. When multiple algorithms are specified, they are applied in descending order of priority.net.compression.compressors
operationProfiling.modeYesoff[off|slowOp|all]UnlimitedThe profiling level for the query profiler. Valid values: off (disables profiling), slowOp (logs operations that exceed operationProfiling.slowOpThresholdMs), all (logs all operations).
Warning

Enabling profiling degrades instance performance. Use with caution in production environments.

operationProfiling.mode
operationProfiling.slowOpThresholdMsNo100[0-65536]UnlimitedThe threshold for classifying an operation as slow. Operations that exceed this duration are logged. Unit: milliseconds.operationProfiling.slowOpThresholdMs
replication.oplogGlobalIdEnabledYesfalse[true|false]UnlimitedWhether to enable Global IDs (GIDs) in the oplog to support two-way synchronization for DTS or mongoShake.Self-developed parameter
replication.oplogSizeMBNo10%[1024-1073741824]UnlimitedThe maximum size of the oplog collection. Defaults to 10% of the disk size. Unit: MB.replication.oplogSizeMB
rsconf.writeConcernMajorityJournalDefaultNotrue[true|false]UnlimitedWhether writes using a majority write concern must wait for the journal to be persisted to disk before acknowledging.replSetGetConfig
setParameter.cursorTimeoutMillisNo600000[1-2147483647]UnlimitedThe idle timeout for cursors. Unit: milliseconds. When a cursor is idle beyond this threshold, MongoDB removes it. Any subsequent access to the removed cursor returns a "cursor not found" error.cursorTimeoutMillis
setParameter.flowControlTargetLagSecondsNo10[1-600]UnlimitedThe lag threshold that triggers the flow control mechanism. Unit: seconds. Flow control prevents the majority commit point from falling too far behind.flowControlTargetLagSeconds
setParameter.maxTransactionLockRequestTimeoutMillisNo5[0-60]UnlimitedThe timeout for acquiring a lock within a transaction. Unit: milliseconds.maxTransactionLockRequestTimeoutMillis
setParameter.oplogFetcherUsesExhaustYestrue[true|false]UnlimitedWhether streaming replication is enabled. Defaults to true (enabled).oplogFetcherUsesExhaust
setParameter.replWriterThreadCountYes16[1-256]UnlimitedThe maximum number of threads used for parallel replication during primary-secondary synchronization. The effective upper bound is twice the number of CPU cores for the instance specification.replWriterThreadCount
setParameter.tcmallocAggressiveMemoryDecommitNo0[0|1]UnlimitedWhether aggressive memory decommitment is enabled for tcmalloc. 0 disables this behavior.
Note

Starting from MongoDB 8.0, this parameter has no effect by default. Adjust setParameter.tcmallocReleaseRate instead.

tcmallocAggressiveMemoryDecommit
setParameter.tcmallocReleaseRateNo10485760[0-549755813888]UnlimitedThe amount of memory that tcmalloc releases to the operating system (OS) per second. Unit: bytes.tcmallocReleaseRate
setParameter.transactionLifetimeLimitSecondsNo60[1-300]UnlimitedThe maximum lifetime of a transaction. Unit: seconds. Transactions that exceed this limit are aborted to reduce pressure on the WiredTiger (WT) cache.transactionLifetimeLimitSeconds
storage.oplogMinRetentionHoursNo0[0.00-720.00]UnlimitedThe minimum retention period for the oplog collection. Accepts floating-point values. Unit: hours.storage.oplogMinRetentionHours
storage.wiredTiger.collectionConfig.blockCompressorYessnappy[snappy|zlib|zstd|none]UnlimitedThe block compression algorithm for collection data. Valid values: snappy, zlib, zstd, none. This setting applies only to new collections created after the change. To apply a different algorithm to a specific collection, use the createCollection command with the relevant options.storage.wiredTiger.collectionConfig.blockCompressor
setParameter.minSnapshotHistoryWindowInSecondsNo300[0-600]UnlimitedThe duration for which the WiredTiger (WT) engine retains snapshot history. Unit: seconds. Set to 0 to disable the snapshot history window.minSnapshotHistoryWindowInSeconds
rsconf.chainingAllowedNotrue[true|false]UnlimitedWhether chained replication is allowed in the replica set. When enabled, a secondary node can replicate from another secondary node rather than directly from the primary node. For example, data can flow from the primary to a secondary, and then from that secondary to a hidden node. Alternatively, data can flow from the primary to a hidden node, and then from that hidden node to a secondary node.rsconf.chainingAllowed

Sharded cluster (Shard)

Parameter nameRestart requiredDefault valueValid valuesMinor version rangeDescriptionOfficial documentation
setParameter.internalDocumentSourceGroupMaxMemoryBytesNo104857600[10485760-10485760000]UnlimitedThe maximum memory available to the $group operator. When this limit is exceeded, excess data spills to disk.Not public
setParameter.timeseriesBucketMaxCountYes1000[1-10000]UnlimitedThe maximum number of measurements stored in a single bucket of a time-series collection.Private
setParameter.timeseriesIdleBucketExpiryMemoryUsageThresholdNo5[0-6710886400]UnlimitedThe memory usage threshold for expiring idle buckets in a time-series collection. The default value of 5 represents 5% of available system memory.Not public
setParameter.timeseriesSideBucketCatalogMemoryUsageThresholdNo104857600[52428800-209715200]UnlimitedThe memory usage threshold for the side bucket catalog of a time-series collection. Defaults to 100 MB. When this threshold is exceeded, idle buckets are expired.Private
setParameter.internalQueryMaxPushBytesNo104857600[10485760-1048576000]UnlimitedThe maximum memory available to the $push operator.Not public
setParameter.internalQueryMaxAddToSetBytesNo104857600[10485760-1048576000]UnlimitedThe maximum memory available to the $addToSet operator.Not public
setParameter.internalDocumentSourceCursorBatchSizeBytesNo4194304[1048576-104857600]UnlimitedThe maximum amount of data that a DocumentSourceCursor can cache from the underlying PlanExecutor before pipeline processing begins.Private
setParameter.internalQueryMaxBlockingSortMemoryUsageBytesNo104857600[33554432-268435456]UnlimitedThe maximum memory a blocking sort stage can use during a query. Unit: bytes. Defaults to 100 MB.Not public
setParameter.internalQueryCacheMaxEntriesPerCollectionNo5000[0-5000]UnlimitedThe maximum number of entries in the query plan cache per collection.
Note

Applies only to the classic query engine, not the SBE query engine.

Not public
net.compression.compressorsYessnappy,zstd,zlib[snappy|zlib|zstd|snappy,zstd,zlib|disabled]UnlimitedThe network compression algorithm used by mongod or mongos. Valid values: snappy, zlib, zstd, snappy,zstd,zlib (all three in priority order), disabled. When multiple algorithms are specified, they are applied in descending order of priority.net.compression.compressors
operationProfiling.modeYesoff[off|slowOp|all]UnlimitedThe profiling level for the query profiler. Valid values: off (disables profiling), slowOp (logs operations that exceed operationProfiling.slowOpThresholdMs), all (logs all operations).
Warning

Enabling profiling degrades instance performance. Use with caution in production environments.

operationProfiling.mode
operationProfiling.slowOpThresholdMsNo100[0-65536]UnlimitedThe threshold for classifying an operation as slow. Operations that exceed this duration are logged. Unit: milliseconds.operationProfiling.slowOpThresholdMs
replication.oplogGlobalIdEnabledYesfalse[true|false]UnlimitedWhether to enable Global IDs (GIDs) in the oplog to support two-way synchronization for DTS or mongoShake.Self-developed parameter
replication.oplogSizeMBNo10%[1024-1073741824]UnlimitedThe maximum size of the oplog collection. Defaults to 10% of the disk size. Unit: MB.replication.oplogSizeMB
setParameter.cursorTimeoutMillisNo600000[1-2147483647]UnlimitedThe idle timeout for cursors. Unit: milliseconds. When a cursor is idle beyond this threshold, MongoDB removes it. Any subsequent access to the removed cursor returns a "cursor not found" error.cursorTimeoutMillis
setParameter.flowControlTargetLagSecondsNo10[1-600]UnlimitedThe lag threshold that triggers the flow control mechanism. Unit: seconds. Flow control prevents the majority commit point from falling too far behind.flowControlTargetLagSeconds
setParameter.maxTransactionLockRequestTimeoutMillisNo5[0-60]UnlimitedThe timeout for acquiring a lock within a transaction. Unit: milliseconds.maxTransactionLockRequestTimeoutMillis
setParameter.migrateCloneInsertionBatchSizeNo0[0-1000]UnlimitedThe maximum number of documents per batch during the clone step of a chunk migration. A value of 0 means the batch size is bounded only by the 16 MB document size limit.migrateCloneInsertionBatchSize
setParameter.oplogFetcherUsesExhaustYestrue[true|false]UnlimitedWhether streaming replication is enabled. Defaults to true (enabled).oplogFetcherUsesExhaust
setParameter.rangeDeleterBatchDelayMSNo20[0-600000]UnlimitedThe delay between batch deletions during the cleanup step of a chunk migration. Unit: milliseconds. This setting also affects the cleanupOrphaned command.rangeDeleterBatchDelayMS
setParameter.rangeDeleterBatchSizeNo0[0-1000]UnlimitedThe maximum number of documents per batch for asynchronous deletion during the cleanup step of a chunk migration. A value of 0 lets the system choose a batch size, which is typically 128.rangeDeleterBatchSize
setParameter.replWriterThreadCountYes16[1-256]UnlimitedThe maximum number of threads used for parallel replication during primary-secondary synchronization. The effective upper bound is twice the number of CPU cores for the instance specification.replWriterThreadCount
setParameter.tcmallocAggressiveMemoryDecommitNo0[0|1]UnlimitedWhether aggressive memory decommitment is enabled for tcmalloc. 0 disables this behavior.
Note

Starting from MongoDB 8.0, this parameter has no effect by default. Adjust setParameter.tcmallocReleaseRate instead.

tcmallocAggressiveMemoryDecommit
setParameter.tcmallocReleaseRateNo10485760[0-549755813888]UnlimitedThe amount of memory that tcmalloc releases to the operating system (OS) per second. Unit: bytes.tcmallocReleaseRate
setParameter.transactionLifetimeLimitSecondsNo60[1-300]UnlimitedThe maximum lifetime of a transaction. Unit: seconds. Transactions that exceed this limit are aborted to reduce pressure on the WT cache.transactionLifetimeLimitSeconds
storage.oplogMinRetentionHoursNo0[0.00-720.00]UnlimitedThe minimum retention period for the oplog collection. Accepts floating-point values. Unit: hours.storage.oplogMinRetentionHours
storage.wiredTiger.collectionConfig.blockCompressorYessnappy[snappy|zlib|zstd|none]UnlimitedThe block compression algorithm for collection data. Valid values: snappy, zlib, zstd, none. This setting applies only to new collections created after the change. To apply a different algorithm to a specific collection, use the createCollection command with the relevant options.storage.wiredTiger.collectionConfig.blockCompressor
setParameter.receiveChunkWaitForRangeDeleterTimeoutMSNo10000[10000-3600000]UnlimitedThe timeout for waiting for orphaned documents to be deleted before a chunk migration proceeds. Unit: milliseconds.Unpublished
setParameter.minSnapshotHistoryWindowInSecondsNo300[0-600]UnlimitedThe duration for which the WiredTiger (WT) engine retains snapshot history. Unit: seconds. Set to 0 to disable the snapshot history window.minSnapshotHistoryWindowInSeconds
rsconf.chainingAllowedNotrue[true|false]UnlimitedWhether chained replication is allowed in the shard. When enabled, a secondary node can replicate from another secondary node rather than directly from the primary node. For example, data can flow from the primary to a secondary, and then from that secondary to a hidden node. Alternatively, data can flow from the primary to a hidden node, and then from that hidden node to a secondary node.rsconf.chainingAllowed

Sharded cluster (Mongos)

Parameter nameRestart requiredDefault valueValid valuesMinor version rangeDescriptionOfficial documentation
setParameter.taskExecutorPoolSizeYes1[1-32]Base version 8.0.13 and laterThe number of TaskExecutor connection pools on a mongos instance.taskExecutorPoolSize
setParameter.readHedgingModeNoon[on|off]UnlimitedWhether support for hedged reads is enabled. Valid values: on (enables hedged reads), off (disables hedged reads).readHedgingMode
net.compression.compressorsYessnappy,zstd,zlib[snappy|zlib|zstd|snappy,zstd,zlib|disabled]UnlimitedThe network compression algorithm used by mongod or mongos. Valid values: snappy, zlib, zstd, snappy,zstd,zlib (all three in priority order), disabled. When multiple algorithms are specified, they are applied in descending order of priority.net.compression.compressors
operationProfiling.slowOpThresholdMsNo100[0-65536]UnlimitedThe threshold for classifying an operation as slow. Operations that exceed this duration are logged. Unit: milliseconds.operationProfiling.slowOpThresholdMs
setParameter.cursorTimeoutMillisNo600000[1-2147483647]UnlimitedThe idle timeout for cursors. Unit: milliseconds. When a cursor is idle beyond this threshold, MongoDB removes it. Any subsequent access to the removed cursor returns a "cursor not found" error.cursorTimeoutMillis
setParameter.ShardingTaskExecutorPoolHostTimeoutMSNo300000[60000-3600000]UnlimitedThe timeout after which a mongos instance drops all connections to a host's TaskExecutor connection pool. Unit: milliseconds.ShardingTaskExecutorPoolHostTimeoutMS
setParameter.ShardingTaskExecutorPoolMaxConnectingNo2[1-32]UnlimitedThe maximum number of connections that can be established concurrently during the initialization of a shard's TaskExecutor connection pool. This controls the rate at which mongos establishes connections to mongod.ShardingTaskExecutorPoolMaxConnecting
setParameter.ShardingTaskExecutorPoolMaxSizeNo32767[1-32767]UnlimitedThe maximum number of connections in each TaskExecutor connection pool for a shard instance.ShardingTaskExecutorPoolMaxSize
setParameter.ShardingTaskExecutorPoolMinSizeNo1[1-256]UnlimitedThe minimum number of connections in each TaskExecutor connection pool for a shard instance.ShardingTaskExecutorPoolMinSize
setParameter.ShardingTaskExecutorPoolRefreshRequirementMSNo60000[30000-3600000]UnlimitedThe interval at which a mongos instance sends heartbeat checks to idle connections in the TaskExecutor connection pool. Unit: milliseconds.ShardingTaskExecutorPoolRefreshRequirementMS
setParameter.ShardingTaskExecutorPoolRefreshTimeoutMSNo20000[5000-600000]UnlimitedThe timeout for waiting for a heartbeat response from a connection in the TaskExecutor connection pool. Unit: milliseconds.ShardingTaskExecutorPoolRefreshTimeoutMS
setParameter.tcmallocAggressiveMemoryDecommitNo0[0|1]UnlimitedWhether aggressive memory decommitment is enabled for tcmalloc. 0 disables this behavior.
Note

Starting from MongoDB 8.0, this parameter has no effect by default. Adjust setParameter.tcmallocReleaseRate instead.

tcmallocAggressiveMemoryDecommit
setParameter.tcmallocReleaseRateNo10485760[0-549755813888]UnlimitedThe amount of memory that tcmalloc releases to the operating system (OS) per second. Unit: bytes.tcmallocReleaseRate

Sharded cluster (Configserver)

Parameter nameRestart requiredDefault valueValid valuesMinor version rangeDescriptionOfficial documentation
net.compression.compressorsYessnappy,zstd,zlib[snappy|zlib|zstd|snappy,zstd,zlib|disabled]UnlimitedThe network compression algorithm used by mongod or mongos. Valid values: snappy, zlib, zstd, snappy,zstd,zlib (all three in priority order), disabled. When multiple algorithms are specified, they are applied in descending order of priority.net.compression.compressors
operationProfiling.modeYesoff[off|slowOp|all]UnlimitedThe profiling level for the query profiler. Valid values: off (disables profiling), slowOp (logs operations that exceed operationProfiling.slowOpThresholdMs), all (logs all operations).
Warning

Enabling profiling degrades instance performance. Use with caution in production environments.

operationProfiling.mode
operationProfiling.slowOpThresholdMsNo100[0-65536]UnlimitedThe threshold for classifying an operation as slow. Operations that exceed this duration are logged. Unit: milliseconds.operationProfiling.slowOpThresholdMs
replication.oplogGlobalIdEnabledYesfalse[true|false]UnlimitedWhether to enable Global IDs (GIDs) in the oplog to support two-way synchronization for DTS or mongoShake.Self-developed parameter
replication.oplogSizeMBNo10%[1024-1073741824]UnlimitedThe maximum size of the oplog collection. Defaults to 10% of the disk size. Unit: MB.replication.oplogSizeMB
setParameter.cursorTimeoutMillisNo600000[1-2147483647]UnlimitedThe idle timeout for cursors. Unit: milliseconds. When a cursor is idle beyond this threshold, MongoDB removes it. Any subsequent access to the removed cursor returns a "cursor not found" error.cursorTimeoutMillis
setParameter.flowControlTargetLagSecondsNo10[1-600]UnlimitedThe lag threshold that triggers the flow control mechanism. Unit: seconds. Flow control prevents the majority commit point from falling too far behind.flowControlTargetLagSeconds
setParameter.maxTransactionLockRequestTimeoutMillisNo5[0-60]UnlimitedThe timeout for acquiring a lock within a transaction. Unit: milliseconds.maxTransactionLockRequestTimeoutMillis
setParameter.oplogFetcherUsesExhaustYestrue[true|false]UnlimitedWhether streaming replication is enabled. Defaults to true (enabled).oplogFetcherUsesExhaust
setParameter.replWriterThreadCountYes16[1-256]UnlimitedThe maximum number of threads used for parallel replication during primary-secondary synchronization. The effective upper bound is twice the number of CPU cores for the instance specification.replWriterThreadCount
setParameter.tcmallocAggressiveMemoryDecommitNo0[0|1]UnlimitedWhether aggressive memory decommitment is enabled for tcmalloc. 0 disables this behavior.
Note

Starting from MongoDB 8.0, this parameter has no effect by default. Adjust setParameter.tcmallocReleaseRate instead.

tcmallocAggressiveMemoryDecommit
setParameter.tcmallocReleaseRateNo10485760[0-549755813888]UnlimitedThe amount of memory that tcmalloc releases to the operating system (OS) per second. Unit: bytes.tcmallocReleaseRate
setParameter.transactionLifetimeLimitSecondsNo60[1-300]UnlimitedThe maximum lifetime of a transaction. Unit: seconds. Transactions that exceed this limit are aborted to reduce pressure on the WT cache.transactionLifetimeLimitSeconds
storage.wiredTiger.collectionConfig.blockCompressorYessnappy[snappy|zlib|zstd|none]UnlimitedThe block compression algorithm for collection data. Valid values: snappy, zlib, zstd, none. This setting applies only to new collections created after the change. To apply a different algorithm to a specific collection, use the createCollection command with the relevant options.storage.wiredTiger.collectionConfig.blockCompressor