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 name | Restart required | Default value | Valid values | Minor version range | Description | Official documentation |
|---|---|---|---|---|---|---|
| setParameter.internalDocumentSourceGroupMaxMemoryBytes | No | 104857600 | [10485760-10485760000] | Unlimited | The maximum memory available to the $group operator. When this limit is exceeded, excess data spills to 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 of 5 represents 5% of 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. Defaults to 100 MB. When this threshold is exceeded, idle buckets are expired. | Not public |
| setParameter.internalQueryMaxPushBytes | No | 104857600 | [10485760-1048576000] | Unlimited | The maximum memory available to the $push operator. | Private |
| setParameter.internalQueryMaxAddToSetBytes | No | 104857600 | [10485760-1048576000] | Unlimited | The maximum memory available to the $addToSet operator. | 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 begins. | Not public |
| setParameter.internalQueryMaxBlockingSortMemoryUsageBytes | No | 104857600 | [33554432-268435456] | Unlimited | The maximum memory a blocking sort stage can use during a query. Unit: bytes. Defaults to 100 MB. | Private |
| setParameter.internalQueryCacheMaxEntriesPerCollection | No | 5000 | [0-5000] | Unlimited | The 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.compressors | Yes | snappy,zstd,zlib | [snappy|zlib|zstd|snappy,zstd,zlib|disabled] | Unlimited | The 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.mode | Yes | off | [off|slowOp|all] | Unlimited | The 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.slowOpThresholdMs | No | 100 | [0-65536] | Unlimited | The threshold for classifying an operation as slow. Operations that exceed this duration are logged. Unit: milliseconds. | operationProfiling.slowOpThresholdMs |
| replication.oplogGlobalIdEnabled | Yes | false | [true|false] | Unlimited | Whether to enable Global IDs (GIDs) in the oplog 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. Defaults to 10% of the disk size. Unit: MB. | replication.oplogSizeMB |
| rsconf.writeConcernMajorityJournalDefault | No | true | [true|false] | Unlimited | Whether writes using a majority write concern must wait for the journal to be persisted to disk before acknowledging. | replSetGetConfig |
| setParameter.cursorTimeoutMillis | No | 600000 | [1-2147483647] | Unlimited | The 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.flowControlTargetLagSeconds | No | 10 | [1-600] | Unlimited | The lag threshold that triggers the flow control mechanism. Unit: seconds. Flow control prevents the majority commit point from falling too far behind. | flowControlTargetLagSeconds |
| setParameter.maxTransactionLockRequestTimeoutMillis | No | 5 | [0-60] | Unlimited | The timeout for acquiring a lock within a transaction. Unit: milliseconds. | maxTransactionLockRequestTimeoutMillis |
| setParameter.oplogFetcherUsesExhaust | Yes | true | [true|false] | Unlimited | Whether streaming replication is enabled. Defaults to true (enabled). | oplogFetcherUsesExhaust |
| setParameter.replWriterThreadCount | Yes | 16 | [1-256] | Unlimited | The 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.tcmallocAggressiveMemoryDecommit | No | 0 | [0|1] | Unlimited | Whether 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 | 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 maximum lifetime of a transaction. Unit: seconds. Transactions that exceed this limit are aborted to reduce pressure on the WiredTiger (WT) cache. | transactionLifetimeLimitSeconds |
| storage.oplogMinRetentionHours | No | 0 | [0.00-720.00] | Unlimited | The minimum retention period for the oplog collection. Accepts floating-point values. Unit: hours. | storage.oplogMinRetentionHours |
| storage.wiredTiger.collectionConfig.blockCompressor | Yes | snappy | [snappy|zlib|zstd|none] | Unlimited | The 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.minSnapshotHistoryWindowInSeconds | No | 300 | [0-600] | Unlimited | The duration for which the WiredTiger (WT) engine retains snapshot history. Unit: seconds. Set to 0 to disable the snapshot history window. | minSnapshotHistoryWindowInSeconds |
| rsconf.chainingAllowed | No | true | [true|false] | Unlimited | Whether 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 name | Restart required | Default value | Valid values | Minor version range | Description | Official documentation |
|---|---|---|---|---|---|---|
| setParameter.internalDocumentSourceGroupMaxMemoryBytes | No | 104857600 | [10485760-10485760000] | Unlimited | The maximum memory available to the $group operator. When this limit is exceeded, excess data spills to 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 of 5 represents 5% of 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. Defaults to 100 MB. When this threshold is exceeded, idle buckets are expired. | Private |
| setParameter.internalQueryMaxPushBytes | No | 104857600 | [10485760-1048576000] | Unlimited | The maximum memory available to the $push operator. | Not public |
| setParameter.internalQueryMaxAddToSetBytes | No | 104857600 | [10485760-1048576000] | Unlimited | The maximum memory available to the $addToSet operator. | 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 begins. | Private |
| setParameter.internalQueryMaxBlockingSortMemoryUsageBytes | No | 104857600 | [33554432-268435456] | Unlimited | The maximum memory a blocking sort stage can use during a query. Unit: bytes. Defaults to 100 MB. | Not public |
| setParameter.internalQueryCacheMaxEntriesPerCollection | No | 5000 | [0-5000] | Unlimited | The 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.compressors | Yes | snappy,zstd,zlib | [snappy|zlib|zstd|snappy,zstd,zlib|disabled] | Unlimited | The 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.mode | Yes | off | [off|slowOp|all] | Unlimited | The 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.slowOpThresholdMs | No | 100 | [0-65536] | Unlimited | The threshold for classifying an operation as slow. Operations that exceed this duration are logged. Unit: milliseconds. | operationProfiling.slowOpThresholdMs |
| replication.oplogGlobalIdEnabled | Yes | false | [true|false] | Unlimited | Whether to enable Global IDs (GIDs) in the oplog 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. Defaults to 10% of the disk size. Unit: MB. | replication.oplogSizeMB |
| setParameter.cursorTimeoutMillis | No | 600000 | [1-2147483647] | Unlimited | The 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.flowControlTargetLagSeconds | No | 10 | [1-600] | Unlimited | The lag threshold that triggers the flow control mechanism. Unit: seconds. Flow control prevents the majority commit point from falling too far behind. | flowControlTargetLagSeconds |
| setParameter.maxTransactionLockRequestTimeoutMillis | No | 5 | [0-60] | Unlimited | The timeout for acquiring a lock within a transaction. Unit: milliseconds. | maxTransactionLockRequestTimeoutMillis |
| setParameter.migrateCloneInsertionBatchSize | No | 0 | [0-1000] | Unlimited | The 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.oplogFetcherUsesExhaust | Yes | true | [true|false] | Unlimited | Whether streaming replication is enabled. Defaults to true (enabled). | oplogFetcherUsesExhaust |
| setParameter.rangeDeleterBatchDelayMS | No | 20 | [0-600000] | Unlimited | The delay between batch deletions during the cleanup step of a chunk migration. Unit: milliseconds. This setting also affects the cleanupOrphaned command. | rangeDeleterBatchDelayMS |
| setParameter.rangeDeleterBatchSize | No | 0 | [0-1000] | Unlimited | The 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.replWriterThreadCount | Yes | 16 | [1-256] | Unlimited | The 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.tcmallocAggressiveMemoryDecommit | No | 0 | [0|1] | Unlimited | Whether 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 | 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 maximum lifetime of a transaction. Unit: seconds. Transactions that exceed this limit are aborted to reduce pressure on the WT cache. | transactionLifetimeLimitSeconds |
| storage.oplogMinRetentionHours | No | 0 | [0.00-720.00] | Unlimited | The minimum retention period for the oplog collection. Accepts floating-point values. Unit: hours. | storage.oplogMinRetentionHours |
| storage.wiredTiger.collectionConfig.blockCompressor | Yes | snappy | [snappy|zlib|zstd|none] | Unlimited | The 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.receiveChunkWaitForRangeDeleterTimeoutMS | No | 10000 | [10000-3600000] | Unlimited | The timeout for waiting for orphaned documents to be deleted before a chunk migration proceeds. Unit: milliseconds. | Unpublished |
| setParameter.minSnapshotHistoryWindowInSeconds | No | 300 | [0-600] | Unlimited | The duration for which the WiredTiger (WT) engine retains snapshot history. Unit: seconds. Set to 0 to disable the snapshot history window. | minSnapshotHistoryWindowInSeconds |
| rsconf.chainingAllowed | No | true | [true|false] | Unlimited | Whether 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 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 | Whether support for hedged reads is enabled. Valid values: on (enables hedged reads), off (disables 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. 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.slowOpThresholdMs | No | 100 | [0-65536] | Unlimited | The threshold for classifying an operation as slow. Operations that exceed this duration are logged. Unit: milliseconds. | operationProfiling.slowOpThresholdMs |
| setParameter.cursorTimeoutMillis | No | 600000 | [1-2147483647] | Unlimited | The 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.ShardingTaskExecutorPoolHostTimeoutMS | No | 300000 | [60000-3600000] | Unlimited | The timeout after which a mongos instance drops all connections to a host's TaskExecutor connection pool. Unit: milliseconds. | ShardingTaskExecutorPoolHostTimeoutMS |
| setParameter.ShardingTaskExecutorPoolMaxConnecting | No | 2 | [1-32] | Unlimited | The 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.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 sends heartbeat checks to idle connections in the TaskExecutor connection pool. Unit: milliseconds. | ShardingTaskExecutorPoolRefreshRequirementMS |
| setParameter.ShardingTaskExecutorPoolRefreshTimeoutMS | No | 20000 | [5000-600000] | Unlimited | The timeout for waiting for a heartbeat response from a connection in the TaskExecutor connection pool. Unit: milliseconds. | ShardingTaskExecutorPoolRefreshTimeoutMS |
| setParameter.tcmallocAggressiveMemoryDecommit | No | 0 | [0|1] | Unlimited | Whether 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 | 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. 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.mode | Yes | off | [off|slowOp|all] | Unlimited | The 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.slowOpThresholdMs | No | 100 | [0-65536] | Unlimited | The threshold for classifying an operation as slow. Operations that exceed this duration are logged. Unit: milliseconds. | operationProfiling.slowOpThresholdMs |
| replication.oplogGlobalIdEnabled | Yes | false | [true|false] | Unlimited | Whether to enable Global IDs (GIDs) in the oplog 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. Defaults to 10% of the disk size. Unit: MB. | replication.oplogSizeMB |
| setParameter.cursorTimeoutMillis | No | 600000 | [1-2147483647] | Unlimited | The 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.flowControlTargetLagSeconds | No | 10 | [1-600] | Unlimited | The lag threshold that triggers the flow control mechanism. Unit: seconds. Flow control prevents the majority commit point from falling too far behind. | flowControlTargetLagSeconds |
| setParameter.maxTransactionLockRequestTimeoutMillis | No | 5 | [0-60] | Unlimited | The timeout for acquiring a lock within a transaction. Unit: milliseconds. | maxTransactionLockRequestTimeoutMillis |
| setParameter.oplogFetcherUsesExhaust | Yes | true | [true|false] | Unlimited | Whether streaming replication is enabled. Defaults to true (enabled). | oplogFetcherUsesExhaust |
| setParameter.replWriterThreadCount | Yes | 16 | [1-256] | Unlimited | The 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.tcmallocAggressiveMemoryDecommit | No | 0 | [0|1] | Unlimited | Whether 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 | 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 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.blockCompressor | Yes | snappy | [snappy|zlib|zstd|none] | Unlimited | The 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 |