Help Center/ GaussDB(for MySQL)/ User Guide/ Parameter Management/ Introducing the High-Performance Parameter Template
Updated on 2024-11-06 GMT+08:00

Introducing the 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. The parameter settings in the template can be adjusted based on different application scenarios and hardware configurations.

The parameters in the high-performance parameter template are as follows.

Table 1 Parameter description

Parameter

Description

Value in the High-Performance Template

Value in the Default 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 can improve query performance because the execution plan of a PREPARE statement is cached and the optimizer does not need to generate an execution plan again. 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.

Figure 1 Selecting the high-performance parameter template

Performance Comparison

Test environment:

  • GaussDB(for MySQL) instance specifications: Dedicated, 8 vCPUs | 32 GB
  • Kernel version: 2.0.51.240300
Sysbench test process:
  • Test scenarios: read-only, write-only, and read/write
  • Data volume: 250 tables x 25,000 rows of data in read-only scenarios, 250 tables x 25,000 rows of data in write-only scenarios, and 25 tables x 250,000 rows of data in read/write scenarios
  • Performance metric: queries per second (QPS) in 1, 2, 4, 8, 16, 32, 64, 128, and 256 concurrent requests. QPS indicates the number of SQL statements executed by the database per second.

Test results:

  • Read-only model

  • Write-only model

  • Read/Write model

Conclusion: The preceding sysbench test results show that the high-performance parameter template significantly improves the database performance.