All Products
Search
Document Center

ApsaraDB for MongoDB:Parameters for MongoDB 8.0

Last Updated:Jan 24, 2026

Replica set

Parameter name

Restart required

Default value

Valid values

Minor version range

Description

Official documentation

setParameter.internalDocumentSourceGroupMaxMemoryBytes

No

104857600

[10485760-10485760000]

Unlimited

The maximum memory that the `$group` operator can use. Excess data overflows to the disk.

Not public

setParameter.timeseriesBucketMaxCount

Yes

1000

[1-10000]

Unlimited

The maximum number of measurements stored in a single bucket of a time-series collection.

Private

setParameter.timeseriesIdleBucketExpiryMemoryUsageThreshold

No

5

[0-6710886400]

Unlimited

The memory usage threshold for expiring idle buckets in a time-series collection. The default value is 5% of the available system memory.

Not public

setParameter.timeseriesSideBucketCatalogMemoryUsageThreshold

No

104857600

[52428800-209715200]

Unlimited

The memory usage threshold for the side bucket catalog of a time-series collection. The default value is 100 MB. If this threshold is exceeded, idle buckets are expired.

Not public

setParameter.internalQueryMaxPushBytes

No

104857600

[10485760-1048576000]

Unlimited

The maximum memory that the `$push` operator can use.

Private

setParameter.internalQueryMaxAddToSetBytes

No

104857600

[10485760-1048576000]

Unlimited

The maximum memory that the `$addToSet` operator can use.

Not public

setParameter.internalDocumentSourceCursorBatchSizeBytes

No

4194304

[1048576-104857600]

Unlimited

The maximum amount of data that a DocumentSourceCursor can cache from the underlying PlanExecutor before pipeline processing.

Not public

setParameter.internalQueryMaxBlockingSortMemoryUsageBytes

No

104857600

[33554432-268435456]

Unlimited

The maximum memory that a blocking sort stage can use during a query. Unit: bytes. The default value is 100 MB.

Private

setParameter.internalQueryCacheMaxEntriesPerCollection

No

5000

[0-5000]

Unlimited

The maximum number of entries for the query plan cache of a collection.

Note

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

Unpublished

net.compression.compressors

Yes

snappy,zstd,zlib

[snappy|zlib|zstd|snappy,zstd,zlib|disabled]

Unlimited

The network compression algorithm used by mongod or mongos. If you specify multiple compression algorithms, they are listed in descending order of priority.

net.compression.compressors

operationProfiling.mode

Yes

off

[off|slowOp|all]

Unlimited

Specifies the level for the query profiler.

Note

Enabling this parameter degrades instance performance. Use with caution in a production environment.

operationProfiling.mode

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The threshold for slow operations. An operation is considered slow if its duration exceeds this threshold. Unit: milliseconds.

operationProfiling.slowOpThresholdMs

replication.oplogGlobalIdEnabled

Yes

false

[true|false]

Unlimited

Specifies whether to enable Global IDs (GIDs) to support two-way synchronization for DTS or mongoShake.

Self-developed parameter

replication.oplogSizeMB

No

10%

[1024-1073741824]

Unlimited

The maximum size of the oplog collection in megabytes (MB). The default value is 10% of the disk size.

replication.oplogSizeMB

rsconf.writeConcernMajorityJournalDefault

No

true

[true|false]

Unlimited

Specifies whether writes with a `majority` write concern require that the journal is persisted to disk.

replSetGetConfig

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold for idle cursors. Unit: milliseconds.

If a cursor is idle for longer than this threshold, MongoDB deletes the cursor. An attempt to access the deleted cursor returns a "cursor not found" error.

cursorTimeoutMillis

setParameter.flowControlTargetLagSeconds

No

10

[1-600]

Unlimited

The threshold that triggers the flow control mechanism. Unit: seconds. Flow control ensures that the majority commit point does not lag too far behind.

flowControlTargetLagSeconds

setParameter.maxTransactionLockRequestTimeoutMillis

No

5

[0-60]

Unlimited

The timeout for acquiring a transaction lock. Unit: milliseconds.

maxTransactionLockRequestTimeoutMillis

setParameter.oplogFetcherUsesExhaust

Yes

true

[true|false]

Unlimited

Specifies whether to enable streaming replication. The default value `true` enables it.

oplogFetcherUsesExhaust

setParameter.replWriterThreadCount

Yes

16

[1-256]

Unlimited

The maximum number of threads for parallel replication in primary-secondary synchronization. The effective maximum number of threads is twice the number of CPU cores for the instance specification.

replWriterThreadCount

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Specifies whether to enable aggressive memory decommitment for tcmalloc. A value of 0 disables this feature.

Note

Starting from MongoDB 8.0, this parameter is ineffective by default. Consider adjusting the setParameter.tcmallocReleaseRate parameter instead.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

10485760

[0-549755813888]

Unlimited

The amount of memory that tcmalloc releases to the operating system (OS) per second. Unit: bytes.

tcmallocReleaseRate

setParameter.transactionLifetimeLimitSeconds

No

60

[1-300]

Unlimited

The total timeout for a transaction, which defines its lifecycle. Unit: seconds. Transactions that exceed this time limit are aborted to reduce pressure on the WiredTiger (WT) cache.

transactionLifetimeLimitSeconds

storage.oplogMinRetentionHours

No

0

[0.00-720.00]

Unlimited

The retention period for the oplog collection. This value can be a floating-point number. Unit: hours.

storage.oplogMinRetentionHours

storage.wiredTiger.collectionConfig.blockCompressor

Yes

snappy

[snappy|zlib|zstd|none]

Unlimited

The storage compression algorithm for collection data. Changes to this parameter affect only new collections. To use a different compression algorithm for a specific collection, run the createCollection command with the relevant options.

storage.wiredTiger.collectionConfig.blockCompressor

setParameter.minSnapshotHistoryWindowInSeconds

No

300

[0-600]

Unlimited

The window size for retaining snapshot history in the WT engine. Unit: seconds. A value of 0 disables the snapshot history window.

minSnapshotHistoryWindowInSeconds

rsconf.chainingAllowed

No

true

[true|false]

Unlimited

Specifies whether to allow chained replication in the replica set.

For example, data is replicated from the primary node to a secondary node, and then from the secondary node to a hidden node. Alternatively, data is replicated from the primary node to a hidden node, and then from the hidden node to a secondary node.

rsconf.chainingAllowed

Sharded cluster (Shard)

Parameter name

Restart required

Default value

Valid values

Minor version range

Description

Official documentation

setParameter.internalDocumentSourceGroupMaxMemoryBytes

No

104857600

[10485760-10485760000]

Unlimited

The maximum memory that the `$group` operator can use. Excess data overflows to the disk.

Not public

setParameter.timeseriesBucketMaxCount

Yes

1000

[1-10000]

Unlimited

The maximum number of measurements stored in a single bucket of a time-series collection.

Private

setParameter.timeseriesIdleBucketExpiryMemoryUsageThreshold

No

5

[0-6710886400]

Unlimited

The memory usage threshold for expiring idle buckets in a time-series collection. The default value is 5% of the available system memory.

Not public

setParameter.timeseriesSideBucketCatalogMemoryUsageThreshold

No

104857600

[52428800-209715200]

Unlimited

The memory usage threshold for the side bucket catalog of a time-series collection. The default value is 100 MB. If this threshold is exceeded, idle buckets are expired.

Private

setParameter.internalQueryMaxPushBytes

No

104857600

[10485760-1048576000]

Unlimited

The maximum memory that the `$push` operator can use.

Not public

setParameter.internalQueryMaxAddToSetBytes

No

104857600

[10485760-1048576000]

Unlimited

The maximum memory that the `$addToSet` operator can use.

Not public

setParameter.internalDocumentSourceCursorBatchSizeBytes

No

4194304

[1048576-104857600]

Unlimited

The maximum amount of data that a DocumentSourceCursor can cache from the underlying PlanExecutor before pipeline processing.

Private

setParameter.internalQueryMaxBlockingSortMemoryUsageBytes

No

104857600

[33554432-268435456]

Unlimited

The maximum memory that a blocking sort stage can use during a query. Unit: bytes. The default value is 100 MB.

Not public

setParameter.internalQueryCacheMaxEntriesPerCollection

No

5000

[0-5000]

Unlimited

The maximum number of entries for the query plan cache of a collection.

Note

This 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

The network compression algorithm used by mongod or mongos. If you specify multiple compression algorithms, they are listed in descending order of priority.

net.compression.compressors

operationProfiling.mode

Yes

off

[off|slowOp|all]

Unlimited

Specifies the level for the query profiler.

Note

Enabling this parameter degrades instance performance. Use with caution in a production environment.

operationProfiling.mode

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The threshold for slow operations. An operation is considered slow if its duration exceeds this threshold. Unit: milliseconds.

operationProfiling.slowOpThresholdMs

replication.oplogGlobalIdEnabled

Yes

false

[true|false]

Unlimited

Specifies whether to enable GIDs to support two-way synchronization for DTS or mongoShake.

Self-developed parameter

replication.oplogSizeMB

No

10%

[1024-1073741824]

Unlimited

The maximum size of the oplog collection in MB. The default value is 10% of the disk size.

replication.oplogSizeMB

rsconf.writeConcernMajorityJournalDefault

No

true

[true|false]

Unlimited

Specifies whether writes with a `majority` write concern require that the journal is persisted to disk.

replSetGetConfig

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold for idle cursors. Unit: milliseconds.

If a cursor is idle for longer than this threshold, MongoDB deletes the cursor. An attempt to access the deleted cursor returns a "cursor not found" error.

cursorTimeoutMillis

setParameter.flowControlTargetLagSeconds

No

10

[1-600]

Unlimited

The threshold that triggers the flow control mechanism. Unit: seconds. Flow control ensures that the majority commit point does not lag too far behind.

flowControlTargetLagSeconds

setParameter.maxTransactionLockRequestTimeoutMillis

No

5

[0-60]

Unlimited

The timeout for acquiring a transaction lock. Unit: milliseconds.

maxTransactionLockRequestTimeoutMillis

setParameter.migrateCloneInsertionBatchSize

No

0

[0-1000]

Unlimited

The maximum number of documents in a single batch during the clone step of a chunk migration. A value of 0 means the batch size is limited only by the 16 MB document size limit.

migrateCloneInsertionBatchSize

setParameter.oplogFetcherUsesExhaust

Yes

true

[true|false]

Unlimited

Specifies whether to enable streaming replication. The default value `true` enables it.

oplogFetcherUsesExhaust

setParameter.rangeDeleterBatchDelayMS

No

20

[0-600000]

Unlimited

The delay between batch deletions during the cleanup step of a chunk migration. Unit: milliseconds. This also affects the cleanupOrphaned command, which cleans up orphaned documents.

rangeDeleterBatchDelayMS

setParameter.rangeDeleterBatchSize

No

0

[0-1000]

Unlimited

The maximum number of documents in a single batch for asynchronous deletion during the cleanup step of a chunk migration. A value of 0 allows the system to automatically select a reasonable batch size, which is typically 128.

rangeDeleterBatchSize

setParameter.replWriterThreadCount

Yes

16

[1-256]

Unlimited

The maximum number of threads for parallel replication in primary-secondary synchronization. The effective maximum number of threads is twice the number of CPU cores for the instance specification.

replWriterThreadCount

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Specifies whether to enable aggressive memory decommitment for tcmalloc. A value of 0 disables this feature.

Note

Starting from MongoDB 8.0, this parameter is ineffective by default. Consider adjusting the setParameter.tcmallocReleaseRate parameter instead.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

10485760

[0-549755813888]

Unlimited

The amount of memory that tcmalloc releases to the operating system (OS) per second. Unit: bytes.

tcmallocReleaseRate

setParameter.transactionLifetimeLimitSeconds

No

60

[1-300]

Unlimited

The total timeout for a transaction, which defines its lifecycle. Unit: seconds. Transactions that exceed this time limit are aborted to reduce pressure on the WT cache.

transactionLifetimeLimitSeconds

storage.oplogMinRetentionHours

No

0

[0.00-720.00]

Unlimited

The retention period for the oplog collection. This value can be a floating-point number. Unit: hours.

storage.oplogMinRetentionHours

storage.wiredTiger.collectionConfig.blockCompressor

Yes

snappy

[snappy|zlib|zstd|none]

Unlimited

The storage compression algorithm for collection data. Changes to this parameter affect only new collections. To use a different compression algorithm for a specific collection, run the createCollection command with the relevant options.

storage.wiredTiger.collectionConfig.blockCompressor

setParameter.receiveChunkWaitForRangeDeleterTimeoutMS

No

10000

[10000-3600000]

Unlimited

The timeout for waiting to delete orphaned documents before a chunk migration. Unit: milliseconds.

Unpublished

setParameter.minSnapshotHistoryWindowInSeconds

No

300

[0-600]

Unlimited

The window size for retaining snapshot history in the WT engine. Unit: seconds. A value of 0 disables the snapshot history window.

minSnapshotHistoryWindowInSeconds

rsconf.chainingAllowed

No

true

[true|false]

Unlimited

Specifies whether to allow chained replication in the shard.

For example, data is replicated from the primary node to a secondary node, and then from the secondary node to a hidden node. Alternatively, data is replicated from the primary node to a hidden node, and then from the hidden node to a secondary node.

rsconf.chainingAllowed

Sharded cluster (Mongos)

Parameter name

Restart required

Default value

Valid values

Minor version range

Description

Official documentation

setParameter.taskExecutorPoolSize

Yes

1

[1-32]

Base version 8.0.13 and later

The number of TaskExecutor connection pools on a mongos instance.

taskExecutorPoolSize

setParameter.readHedgingMode

No

on

[on|off]

Unlimited

Specifies whether to enable support for Hedged Reads.

readHedgingMode

net.compression.compressors

Yes

snappy,zstd,zlib

[snappy|zlib|zstd|snappy,zstd,zlib|disabled]

Unlimited

The network compression algorithm used by mongod or mongos. If you specify multiple compression algorithms, they are listed in descending order of priority.

net.compression.compressors

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The threshold for slow operations. An operation is considered slow if its duration exceeds this threshold. Unit: milliseconds.

operationProfiling.slowOpThresholdMs

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold for idle cursors. Unit: milliseconds. If a cursor is idle for longer than this threshold, MongoDB deletes the cursor. An attempt to access the deleted cursor returns a "cursor not found" error.

cursorTimeoutMillis

setParameter.ShardingTaskExecutorPoolHostTimeoutMS

No

300000

[60000-3600000]

Unlimited

The timeout after which a mongos instance drops all connections to a host's TaskExecutor connection pool.

ShardingTaskExecutorPoolHostTimeoutMS

setParameter.ShardingTaskExecutorPoolMaxConnecting

No

2

[1-32]

Unlimited

The maximum number of concurrent connections during the initialization of a shard's TaskExecutor connection pool. This controls the speed at which connections are established from mongos to mongod.

ShardingTaskExecutorPoolMaxConnecting

setParameter.ShardingTaskExecutorPoolMaxSize

No

32767

[1-32767]

Unlimited

The maximum number of connections in each TaskExecutor connection pool for a shard instance.

ShardingTaskExecutorPoolMaxSize

setParameter.ShardingTaskExecutorPoolMinSize

No

1

[1-256]

Unlimited

The minimum number of connections in each TaskExecutor connection pool for a shard instance.

ShardingTaskExecutorPoolMinSize

setParameter.ShardingTaskExecutorPoolRefreshRequirementMS

No

60000

[30000-3600000]

Unlimited

The interval at which a mongos instance performs a heartbeat check on idle connections in the TaskExecutor connection pool.

ShardingTaskExecutorPoolRefreshRequirementMS

setParameter.ShardingTaskExecutorPoolRefreshTimeoutMS

No

20000

[5000-600000]

Unlimited

The timeout for a mongos instance to wait for a heartbeat response.

ShardingTaskExecutorPoolRefreshTimeoutMS

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Specifies whether to enable aggressive memory decommitment for tcmalloc. A value of 0 disables this feature.

Note

Starting from MongoDB 8.0, this parameter is ineffective by default. Consider adjusting the setParameter.tcmallocReleaseRate parameter instead.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

10485760

[0-549755813888]

Unlimited

The amount of memory that tcmalloc releases to the operating system (OS) per second. Unit: bytes.

tcmallocReleaseRate

Sharded cluster (Configserver)

Parameter name

Restart required

Default value

Valid values

Minor version range

Description

Official documentation

net.compression.compressors

Yes

snappy,zstd,zlib

[snappy|zlib|zstd|snappy,zstd,zlib|disabled]

Unlimited

The network compression algorithm used by mongod or mongos. If you specify multiple compression algorithms, they are listed in descending order of priority.

net.compression.compressors

operationProfiling.mode

Yes

off

[off|slowOp|all]

Unlimited

Specifies the level for the query profiler.

Note

Enabling this parameter degrades instance performance. Use with caution in a production environment.

operationProfiling.mode

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The threshold for slow operations. An operation is considered slow if its duration exceeds this threshold. Unit: milliseconds.

operationProfiling.slowOpThresholdMs

replication.oplogGlobalIdEnabled

Yes

false

[true|false]

Unlimited

Specifies whether to enable GIDs to support two-way synchronization for DTS or mongoShake.

Self-developed parameter

replication.oplogSizeMB

No

10%

[1024-1073741824]

Unlimited

The maximum size of the oplog collection in MB. The default value is 10% of the disk size.

replication.oplogSizeMB

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold for idle cursors. Unit: milliseconds. If a cursor is idle for longer than this threshold, MongoDB deletes the cursor. An attempt to access the deleted cursor returns a "cursor not found" error.

cursorTimeoutMillis

setParameter.flowControlTargetLagSeconds

No

10

[1-600]

Unlimited

The threshold that triggers the flow control mechanism. Unit: seconds. Flow control ensures that the majority commit point does not lag too far behind.

flowControlTargetLagSeconds

setParameter.maxTransactionLockRequestTimeoutMillis

No

5

[0-60]

Unlimited

The timeout for acquiring a transaction lock. Unit: milliseconds.

maxTransactionLockRequestTimeoutMillis

setParameter.oplogFetcherUsesExhaust

Yes

true

[true|false]

Unlimited

Specifies whether to enable streaming replication. The default value `true` enables it.

oplogFetcherUsesExhaust

setParameter.replWriterThreadCount

Yes

16

[1-256]

Unlimited

The maximum number of threads for parallel replication in primary-secondary synchronization. The effective maximum number of threads is twice the number of CPU cores for the instance specification.

replWriterThreadCount

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Specifies whether to enable aggressive memory decommitment for tcmalloc. A value of 0 disables this feature.

Note

Starting from MongoDB 8.0, this parameter is ineffective by default. Consider adjusting the setParameter.tcmallocReleaseRate parameter instead.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

10485760

[0-549755813888]

Unlimited

The amount of memory that tcmalloc releases to the operating system (OS) per second. Unit: bytes.

tcmallocReleaseRate

setParameter.transactionLifetimeLimitSeconds

No

60

[1-300]

Unlimited

The total timeout for a transaction, which defines its lifecycle. Unit: seconds. Transactions that exceed this time limit are aborted to reduce pressure on the WT cache.

transactionLifetimeLimitSeconds

storage.wiredTiger.collectionConfig.blockCompressor

Yes

snappy

[snappy|zlib|zstd|none]

Unlimited

The storage compression algorithm for collection data. Changes to this parameter affect only new collections. To use a different compression algorithm for a specific collection, run the createCollection command with the relevant options.

storage.wiredTiger.collectionConfig.blockCompressor