tencent cloud

Feedback

Parameter Configuration

Last updated: 2022-01-25 10:04:15

    TencentDB for MongoDB allows you to adjust certain database parameters, so that the database features can better adapt to your business needs.

    Background

    In the daily OPS process, quickly adjusting database parameters can optimize the query and management performance of the database in a targeted manner for ever-changing business scenarios. In addition, the parameter modification records can be viewed at any time for evidence-based problem locating.

    Version Description

    Currently, TencentDB for MongoDB 4.2, 4.0, 3.6, and 3.2 support database parameter modification. However, there are differences in the modifiable parameters on each version as displayed in the console.

    Notes

    • Currently, the parameter modification feature only supports parameters that can take effect without restart required after modification. It will support other parameters in future iterations. You can also restart the instance on the MongoDB terminal. The restart will cause a disconnection. Therefore, make business arrangements in advance and proceed with caution.
    • When updating the cluster architecture or configuration, such as adjusting specifications, nodes, or shards, upgrading nodes, and migrating nodes, you don't need to configure parameters repeatedly, as the system will automatically sync the parameter configuration data.

    Prerequisites

    Directions

    Querying parameter configuration

    1. Log in to the TencentDB for MongoDB console.
    2. On the left sidebar, select Replica Set Instance or Sharded Instance. The directions for the two types of instances are similar.
    3. In the instance list on the right, find the target instance.
    4. Click the target instance ID to enter the Instance Details page.
    5. Select the Parameter Settings tab to view the database parameter configuration.

    Modifying parameter configuration

    1. On the Modifiable Parameters tab, click Modify Current Value.
    2. In the input box in the Current Value column, set the desired parameter value as shown below:
      Note:

      • You can modify multiple parameters at the same time.
      • When modifying parameters, be sure to set them according to the acceptable values.
      • In the Restart upon Modification column, check whether the instance will be restarted. The restart will cause a disconnection. Therefore, make business arrangements in advance and proceed with caution.
        The acceptable values of parameters depend on the instance version and architecture. The parameters that can be modified on the current version are as listed below:
    ParameterRestart upon Modification RequiredDefault ValueAcceptable ValuesSupported VersionSupported Instance TypeApplicable ScopeDescription
    operation.profiling.
    slowOpThresholdMs
    No 100 [0-65536] 4.0, 4.2 Replica set instance, sharded instance mongod, mongos Sets the slow query judgment time in ms.
    operationProfiling.mode No off off, slowOp, all 3.2, 3.6, 4.0, 4.2 Replica set instance, sharded instance mongod Sets the enabled Profile level.
    setParameter.
    cursorTimeoutMillis
    No 600000 [1,2147483647] 3.2, 3.6, 4.0, 4.2 Replica set instance, sharded instance 3.2 and 3.6: mongod
    4.0 and 4.2: mongod, mongos
    Sets the cursor timeout period in ms.
    setParameter.
    intenalQueryExecMaxBlockingSortBytes
    No 33554432 [33554432,268435456] 4.0, 4.2 Replica set instance, sharded instance mongod, mongos Sets the maximum memory that `Sort` can support in bytes.
    setParameter.
    maxTransactionLockRequestTimeoutMillis
    No 5 [0,60] 4.0, 4.2 Replica set instance, sharded instance mongod Sets the waiting time for a single transaction lock in ms.
    setParameter.
    transactionLifetimeLimitSeconds
    No 60 [5,300] 4.0, 4.2 Replica set instance, sharded instance mongod Sets the maximum lifetime of a single transaction in s.
    setParameter.
    failIndexKeyTooLong
    No true true, false 3.2, 3.6, 4.0 Replica set instance, sharded instance mongod Sets whether to limit the length of the index key.
    balance.window No NULL true, false 4.0, 4.2 Sharded instance mongos Sets the time period to open the balance window.
    openBalance.window No false true, false 4.0, 4.2 Sharded instance mongos Enables or disables the balance window.
    3. Click **OK**.

    Querying parameter modification record

    1. On the Parameter Settings tab, click Modification Log.
    2. View the parameter modification log, including values before and after modification, modification status, and modification time.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support