MongoDB 8.0 parameters
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 |
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 |
Not documented |
|
setParameter.internalQueryMaxAddToSetBytes |
No |
104857600 |
[10485760-1048576000] |
Unlimited |
Limits the maximum memory that the |
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. |
|
|
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 |
Defines the threshold in milliseconds for a slow operation. Operations that run longer than this threshold are considered slow. |
|
|
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. |
|
|
rsconf.writeConcernMajorityJournalDefault |
No |
true |
[true|false] |
Unlimited |
Specifies whether the journal must be persisted to disk when the write concern is |
|
|
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. |
|
|
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. |
|
|
setParameter.maxTransactionLockRequestTimeoutMillis |
No |
5 |
[0-60] |
Unlimited |
The timeout in milliseconds for a transaction to acquire a lock. |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
Unlimited |
Enables or disables streaming replication. The default value is |
|
|
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. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Enables or disables aggressive memory decommitment for tcmalloc. The default value is Note
As of MongoDB 8.0, this parameter has no effect. Consider adjusting the |
|
|
setParameter.tcmallocReleaseRate |
No |
10485760 |
[0-549755813888] |
Unlimited |
Sets the rate in bytes per second at which tcmalloc releases memory to the OS. |
|
|
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. |
|
|
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.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 |
|
|
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. |
|
|
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. |
|
|
setParameter.periodicNoopIntervalSecs |
Yes |
10 |
[1-10] |
Unlimited |
The interval, in seconds, for no-op writes. |
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. |
|
|
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.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. |
|
|
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. |
|
|
rsconf.writeConcernMajorityJournalDefault |
No |
true |
[true|false] |
Unlimited |
Specifies whether the journal must be persisted to disk when the write concern is |
|
|
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. |
|
|
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. |
|
|
setParameter.maxTransactionLockRequestTimeoutMillis |
No |
5 |
[0-60] |
Unlimited |
The timeout, in milliseconds, for a transaction to acquire a lock. |
|
|
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. |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
Unlimited |
Specifies whether to enable streaming replication. The default value |
|
|
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 |
|
|
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). |
|
|
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. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Enables or disables aggressive memory decommitment for tcmalloc. The default value is Note
As of MongoDB 8.0, this parameter has no effect. Consider adjusting the |
|
|
setParameter.tcmallocReleaseRate |
No |
10485760 |
[0-549755813888] |
Unlimited |
Sets the rate in bytes per second at which tcmalloc releases memory to the OS. |
|
|
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. |
|
|
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.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 |
|
|
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. |
|
|
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. |
|
|
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. |
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. |
|
|
setParameter.readHedgingMode |
No |
on |
[on|off] |
Unlimited |
Specifies whether to enable Hedged Reads. |
|
|
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. |
|
|
operationProfiling.slowOpThresholdMs |
No |
100 |
[0-65536] |
Unlimited |
The threshold in milliseconds for an operation to be considered a slow operation. |
|
|
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. |
|
|
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. |
|
|
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. |
|
|
setParameter.ShardingTaskExecutorPoolMaxSize |
No |
32767 |
[1-32767] |
Unlimited |
The maximum number of connections in each TaskExecutor connection pool on a mongos instance. |
|
|
setParameter.ShardingTaskExecutorPoolMinSize |
No |
1 |
[1-256] |
Unlimited |
The minimum number of connections in each TaskExecutor connection pool on a mongos instance. |
|
|
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. |
|
|
setParameter.ShardingTaskExecutorPoolRefreshTimeoutMS |
No |
20000 |
[5000-600000] |
Unlimited |
The time, in milliseconds, a mongos instance waits for a heartbeat response. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Enables or disables aggressive memory decommitment for tcmalloc. The default value is Note
As of MongoDB 8.0, this parameter has no effect. Consider adjusting the |
|
|
setParameter.tcmallocReleaseRate |
No |
10485760 |
[0-549755813888] |
Unlimited |
Sets the rate in bytes per second at which tcmalloc releases memory to the OS. |
Sharded cluster (ConfigServer)
|
Parameter |
Restart required |
Default |
Value |
Minor version range |
Description |
Documentation |
|
net.compression.compressors |
Yes |
[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. |
||
|
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.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. |
|
|
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). |
|
|
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. |
|
|
setParameter.flowControlTargetLagSeconds |
No |
10 |
[1-600] |
Unlimited |
Specifies the replication lag time, in seconds, that triggers flow control. |
|
|
setParameter.maxTransactionLockRequestTimeoutMillis |
No |
5 |
[0-60] |
Unlimited |
Specifies the maximum time in milliseconds that a transaction waits to acquire a lock. |
|
|
setParameter.oplogFetcherUsesExhaust |
Yes |
true |
[true|false] |
Unlimited |
Specifies whether to enable streaming replication. The default value |
|
|
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. |
|
|
setParameter.tcmallocAggressiveMemoryDecommit |
No |
0 |
[0|1] |
Unlimited |
Enables or disables aggressive memory decommitment for tcmalloc. The default value is Note
As of MongoDB 8.0, this parameter has no effect. Consider adjusting the |
|
|
setParameter.tcmallocReleaseRate |
No |
10485760 |
[0-549755813888] |
Unlimited |
Sets the rate in bytes per second at which tcmalloc releases memory to the OS. |
|
|
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. |
|
|
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 |