This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Database Performance
This section explains how to tune the database performance of MB by configuring various parameters in the master-datasources.xml file.
Improvement Area | Description | Performance Recommendations |
---|---|---|
The maximum number of active connections | This is specified by entering a value for the maxActive parameter. | This should be set in proportion to the number of messages published and consumed. If there are too many active connections in the connection pool, some of them would be idle, incurring an unnecessary system overhead. The default/recommended value is 100. |
The maximum waiting time. | The maxWait parameter specifies the maximum number of milliseconds the MB waits before an existing active connection is returned in order to make a call to the database when no active connections are currently available. An exception is thrown once this time duration has elapsed. | A lower number of milliseconds can be set if you want the database to be updated faster. If you increase the waiting time, it will reduce the performance of the MB in terms of the publish/consumption rate. The default/recommended value is 30000. |
Testing objects borrowed from the pool | Select true or false for the testOnBorrow parameter to indicate whether a validation test should be performed on objects in the pool before borrowing them. | This parameter should be set to true if it is important to ensure the reliability of connections borrowed. However, performing validation tests would incur a system overhead. The default/recommended value is false . |
Validation interval | The validationInterval parameter specifies the minimum number of milliseconds that should elapse after a validation test performed on an object in the connection pool before another test is performed. This parameter is relevant only if the testOnBorrow parameter is set to true . | The purpose of the parameter is to control system overhead that can be caused by excessive validation tests. the default/recommended value is 30000 milliseconds. You can increase this value to minimise the system overhead or reduce it if it is more important to ensure the reliability of the connections. |