Database parameters are the key configuration information for the operation of the database system. Improper parameter values may affect business operation. Here, some important parameters are listed and explained.
To modify parameters in the console, see Parameter Group Management.
connPoolMaxConnsPerHost: Specifies the maximum number of connections per server. Properly increasing the size of the connection pool can improve the concurrent processing capability. Default value: 600.
cursorTimeoutMillis: Specifies the cursor timeout period. The value can be adjusted based on the query mode and data access mode to prevent query interruption caused by the expiration of the cursor. Default value: 600000.
failIndexKeyTooLong: Controls whether to deny index creation when the index key is too long. If the index key exceeds the 16 MB limit, the value can be set to false to allow the creation of an index that exceed the limit. Default value: true
operationProfiling.mode: Used to enable operational performance profiling and set its mode to collect performance information for slow query and all queries. Default value: slowOp
storage.engine: Select a storage engine for MongoDB, either WiredTiger or MMAPv1. WiredTiger is generally superior in terms of performance and storage capability. Default value: wiredTiger
storage.journal.enabled: Used to enable or disable journal. For high performance requirements, you can disable journal. Default value: true
storage.syncPeriodSecs: Specifies the interval for synchronizing data to the disk. A smaller value can increase data durability, but may affect write performance.
storage.wiredTiger.engineConfig.directoryForIndexes: Used to set the index directory of the WiredTiger engine to optimize index performance.
wiredTigerConcurrentWriteTransactions: Used to set the number of concurrent write transactions to improve concurrency performance. Default value: 128.
wiredTigerConcurrentReadTransactions: Used to set the number of concurrent read transactions to improve concurrency performance. Default value: 128.
operationProfiling.slowOpThresholdMs: Used to set a time threshold for slow queries. Queries that exceed the time threshold are recorded for performance analysis and optimization. Default value: 100.
storage.wiredTiger.engineConfig.cacheSizeGB: Used to set the size of the WiredTiger cache to make full use of memory resources to improve query performance.
Note:
When fine-tuning parameters, you must select the appropriate parameter values according to the actual situation and requirements of your application. For the impact and optimal setting of each parameter, you must conduct an experiment and perform the performance test in a test environment to determine the configuration that best suits your environment and application. In addition, the version and deployment architecture of the document database service also affect the selection and fine-tuning of parameters. We recommend that you read the official documentation and best practice guidelines carefully when fine-tuning parameters.