• innodb_doublewrite_batch_size 

The innodb_doublewrite_batch_size  variable (introduced in MySQL 8.0.20) controls the number of doublewrite pages to write in a batch. This variable is intended for advanced performance tuning. The default value should be suitable for most users. 

As of MySQL 8.0.23, InnoDB  automatically encrypts doublewrite file pages that belong to encrypted tablespaces (see Section 15.13, “InnoDB Data-at-Rest Encryption” ). Likewise, doublewrite file pages belonging page-compressed tablespaces are compressed. As a result, doublewrite files can contain different page types including unencrypted and uncompressed pages, encrypted pages, compressed pages, and pages that are both encrypted and compressed. 

## 15.6.5 Redo Log 

The redo log is a disk-based data structure used during crash recovery to correct data written by incomplete transactions. During normal operations, the redo log encodes requests to change table data that result from SQL statements or low-level API calls. Modifications that did not finish updating the data files before an unexpected shutdown are replayed automatically during initialization, and before connections are accepted. For information about the role of the redo log in crash recovery, see Section 15.18.2, “InnoDB Recovery” . 

By default, the redo log is physically represented on disk by two files named ib_logfile0  and ib_logfile1 . MySQL writes to the redo log files in a circular fashion. Data in the redo log is encoded in terms of records affected; this data is collectively referred to as redo. The passage of data through the redo log is represented by an ever-increasing LSN value. 

Information and procedures related to redo logs are described under the following topics in the section: 

## Changing the Number or Size of Redo Log Files 

•Changing the Number or Size of Redo Log Files 

•Group Commit for Redo Log Flushing 

•Redo Log Archiving 

•Disabling Redo Logging 

•Related Topics 

To change the number or the size of redo log files, perform the following steps: 

1. Stop the MySQL server and make sure that it shuts down without errors. 

2. Edit my.cnf  to change the log file configuration. To change the log file size, configure innodb_log_file_size . To increase the number of log files, configure innodb_log_files_in_group . 

3. Start the MySQL server again. 

If InnoDB  detects that the innodb_log_file_size  differs from the redo log file size, it writes a log checkpoint, closes and removes the old log files, creates new log files at the requested size, and opens the new log files. 

## Group Commit for Redo Log Flushing 

InnoDB , like any other ACID-compliant database engine, flushes the redo log of a transaction before it is committed. InnoDB  uses group commit functionality to group multiple flush requests together to avoid 

