GaussDB(for MySQL) High-Performance Parameter Template
To improve database performance, GaussDB(for MySQL) provides a high-performance parameter template. You can select this template when buying an instance.
This section explains the parameter settings in the high-performance parameter template and how the template enhances performance.
Introduction
The high-performance parameter template is a set of optimized configuration parameters that aim to enhance the performance and reliability of database servers. This template can be adjusted based on different application scenarios and hardware configurations to achieve optimal performance and reliability.
The parameters in the high-performance parameter template are as follows.
Parameter |
Description |
Value in a High-Performance Parameter Template |
Value in the Default Parameter Template |
---|---|---|---|
innodb_flush_log_at_trx_commit |
If this parameter is set to 0, logs are not flushed to disks when transactions are committed. Instead, they are only flushed once per second or when the log buffer (innodb_log_buffer_size) is full. This provides low durability but high performance. |
0 |
1 |
rds_plan_cache |
If this parameter is set to ON, an execution plan is cached. The next time the same query is executed, the cached execution plan can be reused, which improves the database's query performance. |
ON |
OFF |
Application Scenarios and Potential Risks
Generally, the high-performance parameter template can improve database performance. However, it should be adjusted based on specific application scenarios and hardware configurations.
While the template is designed to enhance performance and reliability of database servers, it does come with some risks during database usage.
- Setting innodb_flush_log_at_trx_commit to 0 can improve low-concurrency write performance, but in extreme cases, it may result in data loss of up to one second.
- Setting rds_plan_cache to ON caches the execution plan of the PREPARE statement, which reduces the need for the optimizer to generate an execution plan and improves query performance. However, it may not be effective in all read/write scenarios.
Constraints
The kernel version of your GaussDB(for MySQL) instance must be 2.0.51.240300 or later.
Usage
You can select the high-performance parameter template when buying an instance.
Performance Comparison
Test environment:
- GaussDB(for MySQL) instance specifications: Dedicated, 8 vCPUs | 32 GB
- Kernel version: 2.0.51.240300
- Test scenarios: read-only, write-only, and read/write
- Data volume: 250 tables x 25,000 rows of data for read-only or write-only and 25 tables x 250,000 rows of data for read/write
- Performance metric: queries per second (QPS) with 1, 2, 4, 8, 16, 32, 64, 128, and 256 concurrent requests, that is, the number of SQL statements executed by the database per second
Test results:
Conclusion: The preceding sysbench test results show that the high-performance parameter template significantly improves the database performance.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot