- Documentation
RDS for MySQL
Kernel functions
Performance
Large transaction commit binlog optimization
Performance
Large transaction commit binlog optimization
Large transaction commit binlog optimization
This topic describes the large transaction commit binlog optimization feature provided by Volcano Engine RDS for MySQL.
Background
In MySQL, committing a large transaction often blocks write operations for the entire instance. This is because large transactions generate many binlog events, which are first stored in the current session's temporary cache and then copied to the binlog file upon commit. This process generates a large number of I/O operations and keeps the binlog locked, preventing other transactions from committing. Volcano Engine RDS for MySQL optimizes this situation. It first writes the binlog events generated by large transactions to a temporary file. Upon commit, instead of being copied, the temporary file is directly renamed to the official binlog file. This greatly improves the efficiency of large transaction commits and ensures that the submission of other transactions is not affected.
Supported version
- MySQL 5.7 version, and the kernel version is MySQL 5.7.32_20250615 and above.
- MySQL 8.0 version, and the kernel version is MySQL 8.0.32_20250615 and above.
- MySQL 8.4, with a kernel minor version of MySQL 8.4.7_20260415 or later.
Instructions
You can use the large transaction commit binlog optimization feature with the following parameters.
Examples
- On a MySQL 5.7 instance, run the following SQL to create a large table.
- Confirm that the large transaction commit binlog optimization feature is disabled (the value of loose_enable_binlog_large_trans_opt must be OFF), and then run the following SQL and record the execution duration.
- Before the transaction is committed, the binlog cache for the tmp table reaches 6.3 GiB; the transaction commit takes 26.278 seconds, during which other write transactions are completely blocked.
- Modify the value of the loose_enable_binlog_large_trans_opt parameter to ON to enable the large transaction commit binlog optimization feature. Execute the SQL in step 2 again and record the execution duration.
- After the binlog optimization for large transaction commits is enabled, the transaction commit time is 0.008 sec.
Reference information
The following data shows the commit times for transactions of different sizes on a 5.7 instance with the binlog optimization for large transaction commits enabled and disabled.
tip
The following data is for reference only and should not be considered as performance data for the binlog optimization for large transaction commits.
Last updated: 2026.05.28 15:17:49