All Products
Search
Document Center

PolarDB:High-performance parameter template

Last Updated:Mar 30, 2026

PolarDB for MySQL includes high-performance parameter templates that pre-configure key InnoDB parameters for throughput-intensive workloads. Apply a template to your cluster to improve performance without manual parameter tuning.

Parameters in the template

Each MySQL version has its own template with version-specific parameters. The following tables list the parameters changed by each template and their values.

PolarDB for MySQL 5.6 (mysql_innodb_5.6_standard_high)

Parameter Description Template value Default value
innodb_flush_log_at_trx_commit Controls when InnoDB flushes the transaction log to disk. Set to 0, InnoDB writes and flushes the log once per second. 0 1
query_cache_type Enables the Fast Query Cache feature, which caches query results to improve read performance. 1 0

PolarDB for MySQL 5.7 (mysql_innodb_5.7_standard_high)

Parameter Description Template value Default value
innodb_flush_log_at_trx_commit Controls when InnoDB flushes the transaction log to disk. Set to 0, InnoDB writes and flushes the log once per second. 0 1
loose_innodb_primary_purge_max_id_lag Removes limits on the primary node imposed by read views held on read-only nodes. 18446744073709551104 N/A

PolarDB for MySQL 8.0 (mysql_innodb_8.0_standard_high)

Parameter Description Template value Default value
innodb_flush_log_at_trx_commit Controls when InnoDB flushes the transaction log to disk. Set to 0, InnoDB writes and flushes the log once per second. 0 1
loose_innodb_lock_sys_rec_partition Sets the number of shards used to manage transaction locks (row locks and table locks). More shards reduce contention overhead introduced by transaction lock management. 64 1
loose_query_cache_type Enables the Fast Query Cache feature, which caches query results to improve read performance. ON OFF

Limitations

High-performance parameter templates are available on PolarDB Standard Edition only. The following cluster versions are supported:

  • PolarDB for MySQL 5.6: revision version 5.6.1.0.30 or later

  • PolarDB for MySQL 5.7: revision version 5.7.1.0.11 or later

  • PolarDB for MySQL 8.0.1: revision version 8.0.1.1.21 or later

  • PolarDB for MySQL 8.0.2: revision version 8.0.2.2.6.1 or later

To check your cluster's revision version, see Query the engine version.

Potential impacts

Setting innodb_flush_log_at_trx_commit to 0 improves write throughput but introduces two trade-offs:

  • Reduced data durability: If the database crashes, the data that is not written to the disk within one second may be lost because the log is flushed to disk once per second.

  • Increased replication lag: Primary/secondary physical replication latency may increase by up to one second for the same reason.

To keep other template parameters while eliminating these risks, reset innodb_flush_log_at_trx_commit to 1 after applying the template.

Important

Before applying a high-performance parameter template, submit a ticket to consult the Alibaba Cloud technical team.

Apply a high-performance parameter template

Warning

Applying the template requires a database restart. During the restart, brief service interruptions may occur. Apply the template during off-peak hours and make sure your application is configured to reconnect automatically.

Two methods are available. Both let you preview parameter differences before confirming.

Method 1: Apply from the Parameter Templates page

  1. Log on to the PolarDB console.

  2. In the upper-left corner, select the region where the cluster is deployed.

  3. In the left-side navigation pane, click Parameter Templates.

  4. Click System Parameter Templates.

  5. Locate the template for your MySQL version — mysql_innodb_5.6_standard_high, mysql_innodb_5.7_standard_high, or mysql_innodb_8.0_standard_high — and click Apply to Instance in the Actions column.

  6. In the Apply to Instance panel, select the cluster and click > to add it to the Selected Instances list. The Parameter Comparison section shows the differences between the current cluster parameters and the template values.

    Apply to Instance panel showing cluster selection and parameter comparison

  7. Click OK and restart the database for the changes to take effect.

Method 2: Apply from the cluster Parameters page

  1. Log on to the PolarDB console.

  2. In the upper-left corner, select the region where the cluster is deployed.

  3. Find the cluster and click its cluster ID.

  4. In the left-side navigation pane, choose Settings and Management > Parameters.

  5. Click Apply Template.

    Apply Template button on the Parameters page

  6. On the Apply Template page, select the high-performance template from the Template Name drop-down list. The Parameter Comparison section shows the differences between the current cluster parameters and the template values.

    Apply Template page with the Template Name drop-down

  7. Click OK and restart the database for the changes to take effect.

Performance comparison

The following results compare default parameters against the high-performance template on a PolarDB for MySQL 8.0 cluster, using Sysbench and TPC-C (Transaction Processing Performance Council) benchmarks.

Test environment:

  • Cluster: 88 cores, 720 GB memory, revision version 8.0.1.1.21 or later

  • ECS-to-cluster network latency: approximately 1 ms; ECS instance with sufficient compute and network resources

Sysbench test:

  • Test sets: read_write and write_only

  • Data volume: 25 tables x 25,000 rows

  • Metric: QPS (queries per second) — number of SQL statements (INSERT, SELECT, UPDATE, DELETE) executed per second at 1, 8, 16, 32, 64, 128, 256, 512, and 1,024 concurrent connections

TPC-C test:

  • Tool: TPCC-MySQL

  • Data volume: 1,000 warehouses

  • Metric: TPM (transactions per minute) — number of transactions committed per minute, measuring maximum qualified throughput (MQTh), at 1, 8, 16, 32, 64, 128, 256, 512, and 1,024 concurrent connections

The TPC-C tests are based on the TPC-C benchmark methodology but do not meet all TPC-C benchmark requirements. These results cannot be compared with published TPC-C benchmark results.

Sysbench results:

Sysbench test results chart comparing default and high-performance parameters

TPC-C results:

TPC-C test results chart comparing default and high-performance parameters

Conclusion: At 256 or more concurrent connections, the high-performance parameter template improves performance by twice or more.

What's next