Parameters available in MongoDB 7.0

Updated at: 2025-03-25 07:20

This topic describes parameters available in MongoDB 7.0 up to when this topic is updated.

Replica set instance
Sharded cluster instance (parameters available only for shard)
Sharded cluster instance (parameters available only for mongos)
Sharded cluster instance (parameters available only for ConfigServer)

Parameter

Force restart

Default value

Valid value

Minor engine version

Description

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 network compression algorithms, the priorities of the algorithms are in descending order.

net.compression.compressors

operationProfiling.mode

No

off

[off|slowOp|all]

Unlimited

The level of operations that the query profiler profiles.

operationProfiling.mode

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The slow operation time threshold. Slow operations refer to operations that run for a longer period of time than this threshold. Unit: milliseconds.

operationProfiling.slowOpThresholdMs

replication.oplogGlobalIdEnabled

Yes

false

[true|false]

Unlimited

Specifies whether to enable the GID to accelerate two-way synchronization performed by DTS or mongoShake.

Self-developed parameter

replication.oplogSizeMB

No

10%

[1024-1073741824]

Unlimited

The maximum size of the oplog collection. Unit: MB. The default value is capped at 10% of the disk size.

replication.oplogSizeMB

rsconf.writeConcernMajorityJournalDefault

No

true

[true|false]

Unlimited

Specifies whether to persist the journal when the write concern is set to majority.

replSetGetConfig

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold of the idle cursor. Unit: milliseconds.

If the idle time of a cursor exceeds this threshold, ApsaraDB for MongoDB deletes the cursor. In this case, if you attempt to access the cursor again, the system returns the following error: cursor not found.

cursorTimeoutMillis

setParameter.flowControlTargetLagSeconds

No

10

[1-600]

Unlimited

The threshold for triggering the flowControl mechanism. Unit: seconds. The flowControl mechanism ensures that a majority of data is committed within the specified threshold.

flowControlTargetLagSeconds

setParameter.internalQueryMaxBlockingSortMemoryUsageBytes

No

33554432

[33554432-268435456]

Unlimited

The maximum available memory during the sorting phase. Unit: bytes. The default value is equivalent to 32 MB.

To be released

setParameter.maxTransactionLockRequestTimeoutMillis

No

5

[0-60]

Unlimited

The timeout period for the transaction to wait to acquire locks required by the operations in the transaction. Unit: milliseconds.

maxTransactionLockRequestTimeoutMillis

setParameter.oplogFetcherUsesExhaust

Yes

true

[true|false]

Unlimited

Specifies whether to enable streaming replication. The default value true indicates that streaming replication is enabled.

oplogFetcherUsesExhaust

setParameter.replWriterThreadCount

Yes

16

[1-256]

Unlimited

The maximum number of threads used to apply replicated operations in parallel. The maximum number of used threads is capped at twice the number of CPU cores.

replWriterThreadCount

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Specifies whether to enable the aggressive memory strategy of TCMalloc. The default value 0 indicates that the strategy is disabled.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

1

[1-10]

Unlimited

The rate at which TCMalloc releases memory to the operating system. A larger value indicates a faster memory release.

tcmallocReleaseRate

setParameter.transactionLifetimeLimitSeconds

No

60

[1-300]

Unlimited

The total timeout of the transaction, which indicates the lifecycle of the transaction. Unit: seconds. A transaction whose execution time exceeds this threshold is aborted to relieve the pressure on the WiredTiger cache.

transactionLifetimeLimitSeconds

storage.oplogMinRetentionHours

No

0

[0.00-720.00]

Unlimited

The retention period of oplog entries. The parameter value can be a floating-point number. Unit: hours.

storage.oplogMinRetentionHours

storage.wiredTiger.collectionConfig.blockCompressor

Yes

snappy

[snappy|zlib|zstd|none]

Unlimited

The default storage compression algorithm of collection data. If you change the default algorithm, only all new collections use the specified new algorithm. To use another storage compression algorithm for another collection, run the createCollection command that contains options related to the algorithm.

storage.wiredTiger.collectionConfig.blockCompressor

setParameter.minSnapshotHistoryWindowInSeconds

No

300

[0-600]

Unlimited

The window during which snapshot records in WiredTiger are retained. Unit: seconds. The value 0 indicates that the window is closed.

minSnapshotHistoryWindowInSeconds

Parameter

Force restart

Default value

Valid value

Minor engine version

Description

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 network compression algorithms, the priorities of the algorithms are in descending order.

net.compression.compressors

operationProfiling.mode

Yes

off

[off|slowOp|all]

Unlimited

The level of operations that the database profiler profiles.

Note

If this parameter is enabled, instance performance is degraded. Proceed with caution when you want to enable this parameter in the production environment.

operationProfiling.mode

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The slow operation time threshold. Slow operations refer to operations that run for a longer period of time than this threshold. Unit: milliseconds.

operationProfiling.slowOpThresholdMs

replication.oplogGlobalIdEnabled

Yes

false

[true|false]

Unlimited

Specifies whether to enable the global identifier (GID) to accelerate two-way synchronization performed by Data Transmission Service (DTS) or mongoShake.

Self-developed parameter

replication.oplogSizeMB

No

10%

[1024-1073741824]

Unlimited

The maximum size of the oplog collection. Unit: MB. The default value is capped at 10% of the disk size.

replication.oplogSizeMB

rsconf.writeConcernMajorityJournalDefault

No

true

[true|false]

Unlimited

Specifies whether to persist the journal when the write concern is set to majority.

replSetGetConfig

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold of the idle cursor. Unit: milliseconds.

If the idle time of a cursor exceeds this threshold, ApsaraDB for MongoDB deletes the cursor. In this case, if you attempt to access the cursor again, the system returns the "cursor not found" error message.

cursorTimeoutMillis

setParameter.flowControlTargetLagSeconds

No

10

[1-600]

Unlimited

The threshold for triggering the flowControl mechanism. Unit: seconds. The flowControl mechanism ensures that a majority of data is committed within the specified threshold.

flowControlTargetLagSeconds

setParameter.internalQueryMaxBlockingSortMemoryUsageBytes

No

33554432

[33554432-268435456]

Unlimited

The maximum available memory during the sorting phase. Unit: bytes. The default value is equivalent to 32 MB.

To be released

setParameter.maxTransactionLockRequestTimeoutMillis

No

5

[0-60]

Unlimited

The timeout period for the transaction to wait to acquire locks required by the operations in the transaction. Unit: milliseconds.

maxTransactionLockRequestTimeoutMillis

setParameter.migrateCloneInsertionBatchSize

No

0

[0-1000]

Unlimited

The maximum number of documents to insert in a single batch during the cloning stage of the chunk migration process. The default value 0 indicates that batches can contain up to 16 MB of documents.

migrateCloneInsertionBatchSize

setParameter.oplogFetcherUsesExhaust

Yes

true

[true|false]

Unlimited

Specifies whether to enable streaming replication. The default value true indicates that streaming replication is enabled.

oplogFetcherUsesExhaust

setParameter.rangeDeleterBatchDelayMS

No

20

[0-600000]

Unlimited

The interval to wait before the next batch of deletion during the cleanup stage of the chunk migration process. Unit: milliseconds. This parameter affects the cleanupOrphaned command that is used to clean up orphaned documents.

rangeDeleterBatchDelayMS

setParameter.rangeDeleterBatchSize

No

0

[0-1000]

Unlimited

The maximum number of documents in a single batch of asynchronous deletion during the cleanup stage of the chunk migration process. The default value 0 indicates that the system uses an appropriate value. In most cases, the value is 128.

rangeDeleterBatchSize

setParameter.replWriterThreadCount

Yes

16

[1-256]

Unlimited

The maximum number of threads used to apply replicated operations in parallel. The maximum number of used threads is capped at twice the number of CPU cores.

replWriterThreadCount

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Specifies whether to enable the aggressive memory strategy of TCMalloc. The default value 0 indicates that the strategy is disabled.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

1

[1-10]

Unlimited

The rate at which TCMalloc releases memory to the operating system. A larger value indicates a faster memory release.

tcmallocReleaseRate

setParameter.transactionLifetimeLimitSeconds

No

60

[1-300]

Unlimited

The total timeout of the transaction, which indicates the lifecycle of the transaction. Unit: seconds. A transaction whose execution time exceeds this threshold is aborted to relieve the pressure on the WiredTiger cache.

transactionLifetimeLimitSeconds

storage.oplogMinRetentionHours

No

0

[0.00-720.00]

Unlimited

The retention period of oplog entries. The parameter value can be a floating-point number. Unit: hours.

storage.oplogMinRetentionHours

storage.wiredTiger.collectionConfig.blockCompressor

Yes

snappy

[snappy|zlib|zstd|none]

Unlimited

The default storage compression algorithm of collection data. If you change the default algorithm, only all new collections use the specified new algorithm. To use another storage compression algorithm for another collection, run the createCollection command that contains options related to the algorithm.

storage.wiredTiger.collectionConfig.blockCompressor

setParameter.chunkMigrationConcurrency

No

1

[1-64]

Unlimited

The number of concurrent threads used during chunk migration.

chunkMigrationConcurrency

setParameter.receiveChunkWaitForRangeDeleterTimeoutMS

No

10000

[10000-3600000]

Unlimited

The timeout period for waiting for deleting orphaned documents before chunk migration. Unit: milliseconds.

To be released

setParameter.minSnapshotHistoryWindowInSeconds

No

300

[0-600]

Unlimited

The window during which snapshot records in WiredTiger are retained. Unit: seconds. The value 0 indicates that the window is closed.

minSnapshotHistoryWindowInSeconds

rsconf.chainingAllowed

No

true

[true|false]

Unlimited

Specifies whether to allow chained replication for a shard. For example, data is replicated from a primary node to a secondary node and then to a hidden node or from a primary node to a hidden node and then to a secondary node.

rsconf.chainingAllowed

Parameter

Force restart

Default value

Valid value

Minor engine version

Description

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 network compression algorithms, the priorities of the algorithms are in descending order.

net.compression.compressors

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The slow operation time threshold. Slow operations refer to operations that run for a longer period of time than this threshold. Unit: milliseconds.

operationProfiling.slowOpThresholdMs

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold of the idle cursor. Unit: milliseconds. If the idle time of a cursor exceeds this threshold, ApsaraDB for MongoDB deletes the cursor. In this case, if you attempt to access the cursor again, the system returns the "cursor not found" error message.

cursorTimeoutMillis

setParameter.ShardingTaskExecutorPoolHostTimeoutMS

No

300000

[60000-3600000]

Unlimited

The timeout period for mongos to drop all connections in the TaskExecutor connection pool in the host.

ShardingTaskExecutorPoolHostTimeoutMS

setParameter.ShardingTaskExecutorPoolMaxConnecting

No

2

[1-32]

Unlimited

The maximum number of connections that can be established in the TaskExecutor connection pool during connection initialization. This parameter specifies the speed of connection establishment between mongos and mongod.

ShardingTaskExecutorPoolMaxConnecting

setParameter.ShardingTaskExecutorPoolMaxSize

No

32767

[1-32767]

Unlimited

The maximum number of connections in each TaskExecutor connection pool.

ShardingTaskExecutorPoolMaxSize

setParameter.ShardingTaskExecutorPoolMinSize

No

1

[1-256]

Unlimited

The minimum number of connections in each TaskExecutor connection pool.

ShardingTaskExecutorPoolMinSize

setParameter.ShardingTaskExecutorPoolRefreshRequirementMS

No

60000

[30000-3600000]

Unlimited

The interval at which a mongos component performs heartbeat detection on a resting connection in the TaskExecutor connection pool.

ShardingTaskExecutorPoolRefreshRequirementMS

setParameter.ShardingTaskExecutorPoolRefreshTimeoutMS

No

20000

[5000-600000]

Unlimited

The timeout period for mongos to wait for a heartbeat.

ShardingTaskExecutorPoolRefreshTimeoutMS

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Specifies whether to enable the aggressive memory strategy of TCMalloc. The default value 0 indicates that the strategy is disabled.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

1

[1-10]

Unlimited

The rate at which TCMalloc releases memory to the operating system. A larger value indicates a faster memory release.

tcmallocReleaseRate

Parameter

Dynamic parameter

Default value

Valid value

Minor engine version

Description

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 network compression algorithms, the priorities of the algorithms are in descending order.

net.compression.compressors

operationProfiling.mode

Yes

off

[off|slowOp|all]

Unlimited

The level of operations that the database profiler profiles.

Note

If this parameter is enabled, instance performance is degraded. Proeed with caution when you want to enable this parameter in the production environment.

operationProfiling.mode

operationProfiling.slowOpThresholdMs

No

100

[0-65536]

Unlimited

The slow operation time threshold. Slow operations refer to operations that run for a longer period of time than this threshold. Unit: milliseconds.

operationProfiling.slowOpThresholdMs

replication.oplogGlobalIdEnabled

Yes

false

[true|false]

Unlimited

Specifies whether to enable the GID to accelerate two-way synchronization performed by DTS or mongoShake.

Self-developed parameter

replication.oplogSizeMB

No

10%

[1024-1073741824]

Unlimited

The maximum size of the oplog collection. Unit: MB. The default value is capped at 10% of the disk size.

replication.oplogSizeMB

setParameter.cursorTimeoutMillis

No

600000

[1-2147483647]

Unlimited

The expiration threshold of the idle cursor. Unit: milliseconds. If the idle time of a cursor exceeds this threshold, ApsaraDB for MongoDB deletes the cursor. In this case, if you attempt to access the cursor again, the system returns the "cursor not found" error message.

cursorTimeoutMillis

setParameter.flowControlTargetLagSeconds

No

10

[1-600]

Unlimited

The threshold for triggering the flowControl mechanism. Unit: seconds. The flowControl mechanism ensures that a majority of data is committed within the specified threshold.

flowControlTargetLagSeconds

setParameter.maxTransactionLockRequestTimeoutMillis

No

5

[0-60]

Unlimited

The timeout period for the transaction to wait to acquire locks required by the operations in the transaction. Unit: milliseconds.

maxTransactionLockRequestTimeoutMillis

setParameter.oplogFetcherUsesExhaust

Yes

true

[true|false]

Unlimited

Specifies whether to enable streaming replication. The default value true indicates that streaming replication is enabled.

oplogFetcherUsesExhaust

setParameter.replWriterThreadCount

Yes

16

[1-256]

Unlimited

The maximum number of threads used to apply replicated operations in parallel. The maximum number of used threads is capped at twice the number of CPU cores.

replWriterThreadCount

setParameter.tcmallocAggressiveMemoryDecommit

No

0

[0|1]

Unlimited

Specifies whether to enable the aggressive memory strategy of TCMalloc. The default value 0 indicates that the strategy is disabled.

tcmallocAggressiveMemoryDecommit

setParameter.tcmallocReleaseRate

No

1

[1-10]

Unlimited

The rate at which TCMalloc releases memory to the operating system. A larger value indicates a faster memory release.

tcmallocReleaseRate

setParameter.transactionLifetimeLimitSeconds

No

60

[1-300]

Unlimited

The total timeout of the transaction, which indicates the lifecycle of the transaction. Unit: seconds. A transaction whose execution time exceeds this threshold is aborted to relieve the pressure on the WiredTiger cache.

transactionLifetimeLimitSeconds

storage.wiredTiger.collectionConfig.blockCompressor

Yes

snappy

[snappy|zlib|zstd|none]

Unlimited

The default storage compression algorithm of collection data. If you change the default algorithm, only all new collections use the specified new algorithm. To use another storage compression algorithm for another collection, run the createCollection command that contains options related to the algorithm.

storage.wiredTiger.collectionConfig.blockCompressor

    Feedback
    phone Contact Us

    Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

    alicare alicarealicarealicare