TencentDB for MongoDB allows you to adjust certain database parameters, so that the database features can better adapt to your business needs.
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.
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.
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:
Parameter | Restart upon Modification Required | Default Value | Acceptable Values | Supported Version | Supported Instance Type | Applicable Scope | Description |
---|---|---|---|---|---|---|---|
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. |
Was this page helpful?