MongoDB 8.0 parameters

Updated at:

Replica set

Parameter

Restart required

Default

Value range

Minor version range

Description

Documentation

setParameter.internalDocumentSourceGroupMaxMemoryBytes

No

104857600

[10485760-10485760000]

Unlimited

Limits the maximum memory that the $group operator can use. Data exceeding this limit spills to disk.

Not documented

setParameter.timeseriesBucketMaxCount

Yes

1000

[1-10000]

Unlimited

The maximum number of measurements that a single bucket in a time series collection can store.

Not documented

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 documented

setParameter.timeseriesSideBucketCatalogMemoryUsageThreshold

No

104857600

[52428800-209715200]

Unlimited

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

Not documented

setParameter.internalQueryMaxPushBytes

No

104857600

[10485760-1048576000]

Unlimited

Limits the maximum memory that the $push operator can use.

Not documented

setParameter.internalQueryMaxAddToSetBytes

No

104857600

[10485760-1048576000]

Unlimited

Limits the maximum memory that the $addToSet operator can use.

Not documented

setParameter.internalDocumentSourceCursorBatchSizeBytes

No

4194304

[1048576-104857600]

Unlimited

The maximum amount of data in bytes that DocumentSourceCursor caches from the underlying PlanExecutor before pipeline processing.

Not documented

setParameter.internalQueryMaxBlockingSortMemoryUsageBytes

No

104857600

[33554432-268435456]

Unlimited

The maximum amount of memory, in bytes, that a blocking sort stage can use during a query. The default value is 100 MB.

Not documented

setParameter.internalQueryCacheMaxEntriesPerCollection

No

5000

[0-5000]

Unlimited

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

Note

This applies only to the classic query engine, not the Slot-Based Query Execution (SBE) engine.

Not documented

net.compression.compressors

Yes

snappy,zstd,zlib

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

Unlimited

Sets the network compression algorithm for mongod or mongos. When multiple algorithms are selected, they are prioritized in descending order.

net.compression.compressors

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.mode

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

Defines the threshold in milliseconds for a slow operation. Operations that run longer than this threshold are considered slow.

operationProfiling.slowOpThresholdMs

replication.oplogGlobalIdEnabled

Yes

false

[true|false]

Unlimited

Specifies whether to enable GID to support bidirectional synchronization for DTS or mongoShake.

Proprietary parameter

replication.oplogSizeMB

No

10%

[1024-1073741824]

Unlimited

The maximum size of the oplog, in MB. Defaults to 10% of the disk size.

replication.oplogSizeMB

rsconf.writeConcernMajorityJournalDefault

No

true

[true|false]

Unlimited

Specifies whether the journal must be persisted to disk when the write concern is majority.

replSetGetConfig

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold for an idle cursor, in milliseconds.

If a cursor is idle for longer than this threshold, MongoDB removes it. Any subsequent attempt to access the cursor results in a "cursor not found" error.

cursorTimeoutMillis

setParameter.flowControlTargetLagSeconds

No

10

[1-600]

Unlimited

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

flowControlTargetLagSeconds

setParameter.maxTransactionLockRequestTimeoutMillis

No

5

[0-60]

Unlimited

The timeout in milliseconds for a transaction to acquire a lock.

maxTransactionLockRequestTimeoutMillis

setParameter.oplogFetcherUsesExhaust

Yes

true

[true|false]

Unlimited

Enables or disables streaming replication. The default value is true.

oplogFetcherUsesExhaust

setParameter.replWriterThreadCount

Yes

16

[1-256]

Unlimited

The maximum number of threads for parallel replication. The actual effective maximum is twice the number of CPU cores for the instance.

replWriterThreadCount

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Enables or disables aggressive memory decommitment for tcmalloc. The default value is 0 (disabled).

Note

As of MongoDB 8.0, this parameter has no effect. Consider adjusting the setParameter.tcmallocReleaseRate parameter instead.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

10485760

[0-549755813888]

Unlimited

Sets the rate in bytes per second at which tcmalloc releases memory to the OS.

tcmallocReleaseRate

setParameter.transactionLifetimeLimitSeconds

No

60

[1-300]

Unlimited

The maximum lifetime of a transaction, in seconds. Transactions that exceed this limit are aborted to relieve pressure on the WiredTiger cache.

transactionLifetimeLimitSeconds

storage.oplogMinRetentionHours

No

0

[0.00-720.00]

Unlimited

The retention period for the oplog, in hours. The value can be a floating-point number.

storage.oplogMinRetentionHours

storage.wiredTiger.collectionConfig.blockCompressor

Yes

snappy

[snappy|zlib|zstd|none]

Unlimited

Sets the default storage compression algorithm for collection data. This change affects only new collections. To use different compression algorithms for different collections, you must use the createCollection command with the appropriate options.

storage.wiredTiger.collectionConfig.blockCompressor

setParameter.minSnapshotHistoryWindowInSeconds

No

300

[0-600]

Unlimited

The duration, in seconds, for which the WiredTiger engine retains snapshot history. 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 can be replicated from a primary to a secondary and then to a hidden member, or from a primary to a hidden member and then to a secondary.

rsconf.chainingAllowed

setParameter.periodicNoopIntervalSecs

Yes

10

[1-10]

Unlimited

The interval, in seconds, for no-op writes.

periodicNoopIntervalSecs

Sharded cluster

Parameter

Restart required

Default

Value

Minor version range

Description

Official documentation

setParameter.internalDocumentSourceGroupMaxMemoryBytes

No

104857600

[10485760-10485760000]

Unlimited

Limits the maximum amount of memory that the $group operator can use. Data that exceeds this limit is spilled to disk.

Not publicly documented

setParameter.timeseriesBucketMaxCount

Yes

1000

[1-10000]

Unlimited

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

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 documented

setParameter.timeseriesSideBucketCatalogMemoryUsageThreshold

No

104857600

[52428800-209715200]

Unlimited

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

Not publicly documented

setParameter.internalQueryMaxPushBytes

No

104857600

[10485760-1048576000]

Unlimited

Limits the maximum amount of memory that the $push operator can use.

Not publicly documented

setParameter.internalQueryMaxAddToSetBytes

No

104857600

[10485760-1048576000]

Unlimited

Limits the maximum amount of memory that the $addToSet operator can use.

Not publicly documented

setParameter.internalDocumentSourceCursorBatchSizeBytes

No

4194304

[1048576-104857600]

Unlimited

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

The maximum amount of memory, in bytes, that a blocking sort stage can use during a query.

Not publicly documented

setParameter.internalQueryCacheMaxEntriesPerCollection

No

5000

[0-5000]

Unlimited

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

Note

This applies only to the classic query engine, not the Slot-Based Query Execution (SBE) engine.

Not publicly documented

net.compression.compressors

Yes

snappy,zstd,zlib

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

Unlimited

Sets the network compression algorithm for a mongod or mongos instance. When the list contains multiple algorithms, the instance negotiates with the client and uses the first one in the list that both support.

net.compression.compressors

operationProfiling.mode

Yes

off

[off|slowOp|all]

Unlimited

Controls which operations the query profiler records.

Note

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

operationProfiling.mode

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The time threshold, in milliseconds, for slow operations. An operation is considered slow if its execution time exceeds this threshold.

operationProfiling.slowOpThresholdMs

replication.oplogGlobalIdEnabled

Yes

false

[true|false]

Unlimited

Specifies whether to enable Global IDs (GID) to support bidirectional synchronization for DTS or mongoShake.

self-developed parameter

replication.oplogSizeMB

No

10%

[1024-1073741824]

Unlimited

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

replication.oplogSizeMB

rsconf.writeConcernMajorityJournalDefault

No

true

[true|false]

Unlimited

Specifies whether the journal must be persisted to disk when the write concern is majority.

replSetGetConfig

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold for an idle cursor, in milliseconds.

If a cursor is idle for longer than this threshold, MongoDB removes it. Any subsequent attempt to access the cursor results in a "cursor not found" error.

cursorTimeoutMillis

setParameter.flowControlTargetLagSeconds

No

10

[1-600]

Unlimited

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

flowControlTargetLagSeconds

setParameter.maxTransactionLockRequestTimeoutMillis

No

5

[0-60]

Unlimited

The timeout, in milliseconds, for a transaction to acquire a lock.

maxTransactionLockRequestTimeoutMillis

setParameter.migrateCloneInsertionBatchSize

No

0

[0-1000]

Unlimited

The maximum number of documents in a single batch during the cloning phase of chunk migration. A value of 0 means the batch 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 this feature.

oplogFetcherUsesExhaust

setParameter.rangeDeleterBatchDelayMS

No

20

[0-600000]

Unlimited

The delay in milliseconds between batch deletions during the cleanup phase of chunk migration. This also affects the cleanupOrphaned command for removing orphaned documents.

rangeDeleterBatchDelayMS

setParameter.rangeDeleterBatchSize

No

0

[0-2147483647]

Unlimited

The maximum number of documents in a single batch for asynchronous deletion during the cleanup phase of chunk migration. A value of 0 uses the kernel-preset batch size (equivalent to 2147483647, meaning no limit on the number of documents deleted per batch).

rangeDeleterBatchSize

setParameter.replWriterThreadCount

Yes

16

[1-256]

Unlimited

Defines the maximum number of threads for applying replicated operations in parallel. The actual number of threads used cannot exceed twice the number of CPU cores.

replWriterThreadCount

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Enables or disables aggressive memory decommitment for tcmalloc. The default value is 0 (disabled).

Note

As of MongoDB 8.0, this parameter has no effect. Consider adjusting the setParameter.tcmallocReleaseRate parameter instead.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

10485760

[0-549755813888]

Unlimited

Sets the rate in bytes per second at which tcmalloc releases memory to the OS.

tcmallocReleaseRate

setParameter.transactionLifetimeLimitSeconds

No

60

[1-300]

Unlimited

The total timeout for a transaction, in seconds. Transactions exceeding this limit are aborted to relieve pressure on the WiredTiger cache.

transactionLifetimeLimitSeconds

storage.oplogMinRetentionHours

No

0

[0.00-720.00]

Unlimited

The retention period for the oplog, in hours. The value can be a floating-point number.

storage.oplogMinRetentionHours

storage.wiredTiger.collectionConfig.blockCompressor

Yes

snappy

[snappy|zlib|zstd|none]

Unlimited

Sets the default storage compression algorithm for collections. Changes to this parameter apply only to newly created collections. To use different compression algorithms for different collections, you must explicitly use the createCollection command with the appropriate options.

storage.wiredTiger.collectionConfig.blockCompressor

setParameter.receiveChunkWaitForRangeDeleterTimeoutMS

No

10000

[10000-3600000]

Unlimited

The maximum time, in milliseconds, to wait for orphaned document cleanup to complete before a chunk migration begins.

Not publicly documented

setParameter.minSnapshotHistoryWindowInSeconds

No

300

[0-600]

Unlimited

The duration, in seconds, for which the WiredTiger engine retains snapshot history. A value of 0 disables the snapshot history window.

minSnapshotHistoryWindowInSeconds

rsconf.chainingAllowed

No

true

[true|false]

Unlimited

Specifies whether to allow chained replication for a shard.

For example, a secondary member can replicate data from another secondary member instead of from the primary.

rsconf.chainingAllowed

setParameter.periodicNoopIntervalSecs

Yes

10

[1-10]

Unlimited

The interval, in seconds, at which the primary writes a no-op operation to the oplog during periods of inactivity. This ensures a consistent time window for tailable cursors.

periodicNoopIntervalSecs

Sharded cluster (mongos)

Parameter

Restart required

Default

Value

Applicable versions

Description

Documentation

setParameter.taskExecutorPoolSize

Yes

1

[1-32]

MongoDB 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 Hedged Reads.

readHedgingMode

net.compression.compressors

Yes

snappy,zstd,zlib

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

Unlimited

Sets the network compression algorithm for mongod or mongos. If you select multiple algorithms, they are prioritized in the order listed.

net.compression.compressors

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The threshold in milliseconds for an operation to be considered a slow operation.

operationProfiling.slowOpThresholdMs

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The time in milliseconds that a cursor can remain idle before MongoDB automatically closes it. Attempts to use a closed cursor result in a "cursor not found" error.

cursorTimeoutMillis

setParameter.ShardingTaskExecutorPoolHostTimeoutMS

No

300000

[60000-3600000]

Unlimited

The duration, in milliseconds, after which a mongos instance drops all connections in the TaskExecutor connection pool for a host.

ShardingTaskExecutorPoolHostTimeoutMS

setParameter.ShardingTaskExecutorPoolMaxConnecting

No

2

[1-32]

Unlimited

The maximum number of concurrent new connections that a mongos instance can establish to a shard. This setting controls the connection initialization rate.

ShardingTaskExecutorPoolMaxConnecting

setParameter.ShardingTaskExecutorPoolMaxSize

No

32767

[1-32767]

Unlimited

The maximum number of connections in each TaskExecutor connection pool on a mongos instance.

ShardingTaskExecutorPoolMaxSize

setParameter.ShardingTaskExecutorPoolMinSize

No

1

[1-256]

Unlimited

The minimum number of connections in each TaskExecutor connection pool on a mongos instance.

ShardingTaskExecutorPoolMinSize

setParameter.ShardingTaskExecutorPoolRefreshRequirementMS

No

60000

[30000-3600000]

Unlimited

The interval, in milliseconds, at which a mongos instance performs heartbeat checks on idle connections in its TaskExecutor connection pools.

ShardingTaskExecutorPoolRefreshRequirementMS

setParameter.ShardingTaskExecutorPoolRefreshTimeoutMS

No

20000

[5000-600000]

Unlimited

The time, in milliseconds, a mongos instance waits for a heartbeat response.

ShardingTaskExecutorPoolRefreshTimeoutMS

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Enables or disables aggressive memory decommitment for tcmalloc. The default value is 0 (disabled).

Note

As of MongoDB 8.0, this parameter has no effect. Consider adjusting the setParameter.tcmallocReleaseRate parameter instead.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

10485760

[0-549755813888]

Unlimited

Sets the rate in bytes per second at which tcmalloc releases memory to the OS.

tcmallocReleaseRate

Sharded cluster (ConfigServer)

Parameter

Restart required

Default

Value

Minor version range

Description

Documentation

net.compression.compressors

Yes

snappy,zstd,zlib

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

Unlimited

Sets the network compression algorithm for mongod or mongos. If multiple algorithms are specified, they are prioritized in the order listed.

net.compression.compressors

operationProfiling.mode

Yes

off

[off|slowOp|all]

Unlimited

Specifies the profiling level for the query profiler.

Note

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

operationProfiling.mode

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

Specifies the threshold in milliseconds for a slow operation. An operation is considered slow if its duration exceeds this value.

operationProfiling.slowOpThresholdMs

replication.oplogGlobalIdEnabled

Yes

false

[true|false]

Unlimited

Specifies whether to enable GID to support two-way synchronization for Data Transmission Service (DTS) or mongoShake.

Custom parameter

replication.oplogSizeMB

No

10%

[1024-1073741824]

Unlimited

Specifies the maximum size of the oplog collection in megabytes (MB).

replication.oplogSizeMB

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

Specifies the time in milliseconds before an idle cursor is automatically closed. Subsequent attempts to use the expired cursor result in a "cursor not found" error.

cursorTimeoutMillis

setParameter.flowControlTargetLagSeconds

No

10

[1-600]

Unlimited

Specifies the replication lag time, in seconds, that triggers flow control.

flowControlTargetLagSeconds

setParameter.maxTransactionLockRequestTimeoutMillis

No

5

[0-60]

Unlimited

Specifies the maximum time in milliseconds that a transaction waits to acquire a lock.

maxTransactionLockRequestTimeoutMillis

setParameter.oplogFetcherUsesExhaust

Yes

true

[true|false]

Unlimited

Specifies whether to enable streaming replication. The default value true enables this feature.

oplogFetcherUsesExhaust

setParameter.replWriterThreadCount

Yes

16

[1-256]

Unlimited

Specifies the maximum number of writer threads for parallel replication. The effective maximum is twice the number of CPU cores in the instance.

replWriterThreadCount

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Enables or disables aggressive memory decommitment for tcmalloc. The default value is 0 (disabled).

Note

As of MongoDB 8.0, this parameter has no effect. Consider adjusting the setParameter.tcmallocReleaseRate parameter instead.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

10485760

[0-549755813888]

Unlimited

Sets the rate in bytes per second at which tcmalloc releases memory to the OS.

tcmallocReleaseRate

setParameter.transactionLifetimeLimitSeconds

No

60

[1-300]

Unlimited

Specifies the maximum lifetime of a transaction in seconds. The system aborts transactions that exceed this limit to relieve pressure on the WiredTiger cache.

transactionLifetimeLimitSeconds

storage.wiredTiger.collectionConfig.blockCompressor

Yes

snappy

[snappy|zlib|zstd|none]

Unlimited

Sets the default compression algorithm for new collections. To specify a different algorithm for a particular collection, use the createCollection command.

storage.wiredTiger.collectionConfig.blockCompressor