Updated on 2026-08-04 GMT+08:00

Parameters

Scenarios

Parameters are key configuration items in a database system. Improper parameter settings may adversely affect database performance. This section describes some important parameters. For details on parameter descriptions, visit MongoDB official website.

For details about how to change parameter values on the console, see Modifying DDS DB Instance Parameters.

Parameter Description

Table 1 Parameters

Parameter

Description

enableMajorityReadConcern

  • This parameter indicates whether data read has been acknowledged by a majority of nodes.
  • The default value is false, indicating that data read is returned after being acknowledged by a single node.
  • If this parameter is set to true, data read is returned after being acknowledged by a majority of nodes. This operation will increase the size of the LAS file, resulting in high CPU usage and disk usage.
  • In DDS, read concern cannot be set to majority. If majority read concern is required, you can set write concern to majority, indicating that data is written to a majority of nodes. In this way, data on most nodes is consistent. Then, by reading data from a single node, it can be ensured that the data has been written to a majority of nodes, and there are no dirty reads.
    NOTE:

    Write concern and read concern respectively specify the write and read policies for MongoDB.

    If read concern is set to majority, data read by users has been written to a majority of nodes and will not be rolled back to avoid dirty reads.

failIndexKeyTooLong

  • The default value is true.
  • This parameter cannot be modified to avoid an excessively long index key.

net.maxIncomingConnections

  • This parameter specifies the maximum number of concurrent connections that dds mongos or mongod can accept. The value of this parameter depends on the instance specifications and its default value varies with the specifications. Therefore, before this parameter is manually configured, its value is displayed as default, indicating that the parameter varies based on the memory specifications.

security.javascriptEnabled

  • The default value is false.
  • This parameter indicates whether JavaScript scripts can be executed on mongod. For security purposes, the default value is false, indicating that JavaScript scripts cannot be executed on mongod, and the mapreduce and group commands cannot be used.

disableJavaScriptJIT

  • The default value is true.
  • This parameter indicates whether to disable JavaScript JIT compilation. JavaScript JIT compilation enables just-in-time (JIT) compilation to improve the performance of running scripts.
  • disableJavaScriptJIT: The default value is true, indicating that JavaScript JIT compilation is disabled. To enable JavaScript JIT compilation, set disableJavaScriptJIT to false.

operationProfiling.slowOpThresholdMs

  • The default value is 500 and the unit is ms.
  • This parameter indicates the threshold for slow queries in the unit of ms. Queries that take longer than the threshold are deemed as slow queries.
  • Unless otherwise specified, setting the value to 500 ms is recommended.

maxTransactionLockRequestTimeoutMillis

  • The value ranges from 5 to 100, in milliseconds. The default value is 5.
  • This parameter specifies the time for a transaction to wait for locks. If the time is exceeded, the transaction is rolled back.