This topic lists the parameters available for ApsaraDB for MongoDB 4.2.
Replica set
Parameter name | Restart required | Default value | Valid values | Minor version range | Description | Official documentation |
setParameter.internalDocumentSourceGroupMaxMemoryBytes | No | 104857600 | [10485760-10485760000] | Unlimited | Limits the maximum memory size that the $group operator can use. Data that exceeds this limit overflows to the disk. | Not disclosed |
setParameter.internalQueryMaxPushBytes | No | 104857600 | [10485760-1048576000] | Unlimited | Limits the maximum memory that the `$push` operator can use. | Not disclosed |
setParameter.internalQueryMaxAddToSetBytes | No | 104857600 | [10485760-1048576000] | Unlimited | Limits the maximum memory that the `$addToSet` operator can use. | Not disclosed |
setParameter.internalDocumentSourceCursorBatchSizeBytes | No | 4194304 | [1048576-104857600] | Unlimited | The maximum amount of data in bytes that a DocumentSourceCursor can cache from the underlying PlanExecutor before pipeline processing. | Not disclosed |
setparameter.internalQueryCacheSize | No | 5000 | [0-5000] | Unlimited | Limits the maximum number of entries in the query plan cache for a collection. | Not disclosed |
net.compression.compressors | Yes | snappy,zstd,zlib | [snappy|zlib|zstd|snappy,zstd,zlib|disabled] | Unlimited | The network compression algorithm for a mongod or Mongos instance. If you specify multiple compression algorithms, they are prioritized in descending order. | |
net.serviceExecutor | Yes | synchronous | [synchronous|adaptive] | Unlimited | Determines the threading and execution model used by a mongod or Mongos instance. | |
operationProfiling.mode | Yes | off | [off|slowOp|all] | Unlimited | Specifies the level for the query analysis profiler. Note Enabling this parameter degrades instance performance. Use with caution in a production environment. | |
operationProfiling.slowOpThresholdMs | No | 100 | [0-65536] | Unlimited | The threshold for slow operations in milliseconds. An operation is considered slow if its runtime exceeds this threshold. | |
replication.enableMajorityReadConcern | Yes | true | [true|false] | Unlimited | Specifies whether to enable support for majority read concern. | |
replication.oplogGlobalIdEnabled | Yes | false | [true|false] | Unlimited | Specifies whether to enable Global ID (GID) to support two-way synchronization using Data Transmission Service (DTS) or mongoShake. | Self-developed parameter |
replication.oplogSizeMB | No | 10% | [1024-1073741824] | Unlimited | The maximum size of the oplog table 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 set to majority. | |
setParameter.cursorTimeoutMillis | No | 600000 | [1-2147483647] | Unlimited | The expiration threshold for idle cursors in 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. | |
setParameter.flowControlTargetLagSeconds | No | 10 | [1-600] | Unlimited | The threshold in seconds that triggers the flow control mechanism. Flow control ensures that most commit points do not fall too far behind. | |
setParameter.internalQueryExecMaxBlockingSortBytes | No | 33554432 | [33554432-268435456] | Unlimited | The maximum memory in bytes that a sorting operation can use. The default value is 32 MB. | Not disclosed |
setParameter.maxTransactionLockRequestTimeoutMillis | No | 5 | [0-60] | Unlimited | The timeout in milliseconds for a transaction to wait for a lock. | |
setParameter.replWriterThreadCount | Yes | 16 | [1-256] | Unlimited | The maximum number of threads for parallel replication during primary-secondary synchronization. The effective maximum number of threads is twice the number of CPU cores for the instance specification. | |
setParameter.tcmallocAggressiveMemoryDecommit | No | 0 | [0|1] | Unlimited | Specifies whether to enable aggressive memory decommitment for tcmalloc. The default value 0 disables this feature. | |
setParameter.tcmallocReleaseRate | No | 1 | [1-10] | Unlimited | The rate at which tcmalloc releases memory to the operating system (OS). A higher value indicates a faster release rate. | |
setParameter.transactionLifetimeLimitSeconds | No | 60 | [1-300] | Unlimited | The total timeout for a transaction in seconds. This defines the transaction lifecycle. Transactions that exceed this limit are aborted to reduce pressure on the WiredTiger (WT) cache. | |
storage.wiredTiger.collectionConfig.blockCompressor | Yes | snappy | [snappy|zlib|zstd|none] | Unlimited | The storage compression algorithm for collection data. This change applies only to new collections. To use different compression algorithms for different collections, run the | |
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. |
Sharded cluster (Shard)
Parameter name | Restart required | Default value | Valid values | Minor version range | Description | Official documentation |
setParameter.internalDocumentSourceGroupMaxMemoryBytes | No | 104857600 | [10485760-10485760000] | Unlimited | Limits the maximum memory size that the $group operator can use. Data that exceeds this limit overflows to the disk. | Not disclosed |
setParameter.internalQueryMaxPushBytes | No | 104857600 | [10485760-1048576000] | Unlimited | Limits the maximum memory that the `$push` operator can use. | Not disclosed |
setParameter.internalQueryMaxAddToSetBytes | No | 104857600 | [10485760-1048576000] | Unlimited | Limits the maximum memory that the `$addToSet` operator can use. | Not disclosed |
setParameter.internalDocumentSourceCursorBatchSizeBytes | No | 4194304 | [1048576-104857600] | Unlimited | The maximum amount of data in bytes that a DocumentSourceCursor can cache from the underlying PlanExecutor before pipeline processing. | Not disclosed |
setparameter.internalQueryCacheSize | No | 5000 | [0-5000] | Unlimited | Limits the maximum number of entries in the query plan cache for a collection. | Not disclosed |
net.compression.compressors | Yes | snappy,zstd,zlib | [snappy|zlib|zstd|snappy,zstd,zlib|disabled] | Unlimited | The network compression algorithm for a mongod or Mongos instance. If you specify multiple compression algorithms, they are prioritized in descending order. | |
net.serviceExecutor | Yes | synchronous | [synchronous|adaptive] | Unlimited | Determines the threading and execution model used by a mongod or Mongos instance. | |
operationProfiling.mode | Yes | off | [off|slowOp|all] | Unlimited | Specifies the level for the query analysis profiler. Note Enabling this parameter degrades instance performance. Use with caution in a production environment. | |
operationProfiling.slowOpThresholdMs | No | 100 | [0-65536] | Unlimited | The threshold for slow operations in milliseconds. An operation is considered slow if its runtime exceeds this threshold. | |
replication.enableMajorityReadConcern | Yes | true | [true|false] | Unlimited | Specifies whether to enable support for majority read concern. | |
replication.oplogGlobalIdEnabled | Yes | false | [true|false] | Unlimited | Specifies whether to enable Global ID (GID) to support two-way synchronization using Data Transmission Service (DTS) or mongoShake. | Self-developed parameter |
replication.oplogSizeMB | No | 10% | [1024-1073741824] | Unlimited | The maximum size of the oplog table 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 set to majority. | |
setParameter.cursorTimeoutMillis | No | 600000 | [1-2147483647] | Unlimited | The expiration threshold for idle cursors in 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. | |
setParameter.flowControlTargetLagSeconds | No | 10 | [1-600] | Unlimited | The threshold in seconds that triggers the flow control mechanism. Flow control ensures that most commit points do not fall too far behind. | |
setParameter.internalQueryExecMaxBlockingSortBytes | No | 33554432 | [33554432-268435456] | Unlimited | The maximum memory in bytes that a sorting operation can use. The default value is 32 MB. | Not disclosed |
setParameter.maxTransactionLockRequestTimeoutMillis | No | 5 | [0-60] | Unlimited | The timeout in milliseconds for a transaction to wait for a lock. | |
setParameter.replWriterThreadCount | Yes | 16 | [1-256] | Unlimited | The maximum number of threads for parallel replication during primary-secondary synchronization. The effective maximum number of threads is twice the number of CPU cores for the instance specification. | |
setParameter.tcmallocAggressiveMemoryDecommit | No | 0 | [0|1] | Unlimited | Specifies whether to enable aggressive memory decommitment for tcmalloc. The default value 0 disables this feature. | |
setParameter.tcmallocReleaseRate | No | 1 | [1-10] | Unlimited | The rate at which tcmalloc releases memory to the operating system (OS). A higher value indicates a faster release rate. | |
setParameter.transactionLifetimeLimitSeconds | No | 60 | [1-300] | Unlimited | The total timeout for a transaction in seconds. This defines the transaction lifecycle. Transactions that exceed this limit are aborted to reduce pressure on the WiredTiger (WT) cache. | |
storage.wiredTiger.collectionConfig.blockCompressor | Yes | snappy | [snappy|zlib|zstd|none] | Unlimited | The storage compression algorithm for collection data. This change applies only to new collections. To use different compression algorithms for different collections, run the | |
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. | |
setParameter.rangeDeleterBatchDelayMS | No | 20 | [0-600000] | Unlimited | The delay in milliseconds between batch deletions during the cleanup step of a chunk migration. This also affects the | |
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 means an appropriate batch size is automatically selected, which is typically 128. | |
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. |
Sharded cluster (Mongos)
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 for a mongod or Mongos instance. If you specify multiple compression algorithms, they are prioritized in descending order. | |
net.serviceExecutor | Yes | synchronous | [synchronous|adaptive] | Unlimited | Determines the threading and execution model used by a mongod or Mongos instance. | |
operationProfiling.slowOpThresholdMs | No | 100 | [0-65536] | Unlimited | The threshold for slow operations in milliseconds. An operation is considered slow if its runtime exceeds this threshold. | |
setParameter.cursorTimeoutMillis | No | 600000 | [1-2147483647] | Unlimited | The expiration threshold for idle cursors in 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. | |
setParameter.ShardingTaskExecutorPoolHostTimeoutMS | No | 300000 | [60000-3600000] | Unlimited | The timeout period after which a Mongos instance drops all connections to a host's TaskExecutor connection pool. | |
setParameter.ShardingTaskExecutorPoolMaxConnecting | No | 2 | [1-32] | Unlimited | The maximum number of concurrent connections that the TaskExecutor connection pool can initialize. This controls the connection speed from a Mongos instance to a mongod instance. | |
setParameter.ShardingTaskExecutorPoolMaxSize | No | 32767 | [1-32767] | Unlimited | The maximum number of connections in each TaskExecutor connection pool for a sharded cluster instance. | |
setParameter.ShardingTaskExecutorPoolMinSize | No | 1 | [1-256] | Unlimited | The minimum number of connections in each TaskExecutor connection pool for a sharded cluster instance. | |
setParameter.ShardingTaskExecutorPoolRefreshRequirementMS | No | 60000 | [30000-3600000] | Unlimited | The interval at which a Mongos instance sends heartbeats to check hibernating connections in the TaskExecutor connection pool. | |
setParameter.ShardingTaskExecutorPoolRefreshTimeoutMS | No | 20000 | [5000-600000] | Unlimited | The timeout period for a Mongos instance to wait for a heartbeat response. | |
setParameter.taskExecutorPoolSize | Yes | 1 | [1-32] | Unlimited | The number of TaskExecutor connection pools on a Mongos instance. | |
setParameter.tcmallocAggressiveMemoryDecommit | No | 0 | [0|1] | Unlimited | Specifies whether to enable aggressive memory decommitment for tcmalloc. The default value 0 disables this feature. | |
setParameter.tcmallocReleaseRate | No | 1 | [1-10] | Unlimited | The rate at which tcmalloc releases memory to the operating system (OS). A higher value indicates a faster release rate. |
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 for a mongod or Mongos instance. If you specify multiple compression algorithms, they are prioritized in descending order. | |
operationProfiling.mode | Yes | off | [off|slowOp|all] | Unlimited | Specifies the level for the query analysis profiler. Note Enabling this parameter degrades instance performance. Use with caution in a production environment. | |
operationProfiling.slowOpThresholdMs | No | 100 | [0-65536] | Unlimited | The threshold for slow operations in milliseconds. An operation is considered slow if its runtime exceeds this threshold. | |
replication.oplogGlobalIdEnabled | Yes | false | [true|false] | Unlimited | Specifies whether to enable Global ID (GID) to support two-way synchronization using Data Transmission Service (DTS) or mongoShake. | Self-developed parameter |
setParameter.cursorTimeoutMillis | No | 600000 | [1-2147483647] | Unlimited | The expiration threshold for idle cursors in 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. | |
storage.wiredTiger.collectionConfig.blockCompressor | Yes | snappy | [snappy|zlib|zstd|none] | Unlimited | The storage compression algorithm for collection data. This change applies only to new collections. To use different compression algorithms for different collections, run the |