Innodb_redo_log_capacity

Tuning innodb_redo_log_capacity variable
May 13, 2025 • Written by ROMAN AGABEKOV

Basic Details

The innodb_redo_log_capacity variable sets the total size of the InnoDB redo log system, which includes both the ib_logfile0 and ib_logfile1 files (or more, depending on your MySQL configuration).

innodb_redo_log_capacity – Usage

The redo log records changes made to InnoDB pages in memory (the buffer pool) before those pages are flushed to disk. This ensures durability even if the server crashes. The innodb_redo_log_capacity variable sets the total available space for these logs.

If the redo log fills up before dirty pages are flushed to disk, MySQL will stall transactions until enough space is cleared. That’s why increasing the redo log capacity can dramatically improve write throughput and reduce spikes in I/O latency under heavy write load.

For example:

  • On OLTP workloads, increasing the redo log capacity reduces write stalls.
  • On systems with slow disk I/O, it allows InnoDB more time to flush pages asynchronously in the background.
By default, this is limited to 100MB, which may be insufficient for busy workloads or bursty traffic patterns.

innodb_redo_log_capacity – Configuration

The innodb_redo_log_capacity variable must be configured in the MySQL config file and cannot be changed dynamically.
Configuration File:
[mysqld]
innodb_redo_log_capacity = XX
Replace XX with a value that suit your database needs. You must restart MySQL server to see changes applied.

innodb_redo_log_capacity Considerations

Tuning innodb_redo_log_capacity is essential for write-intensive workloads. If it's set too low, the server may stall frequently during bursts of writes. If it's too large, recovery time after a crash may increase.

When to increase it:
  • If you observe frequent log waits in SHOW ENGINE INNODB STATUS.
  • If your workload is bursty or involves high concurrency on write queries.
  • If you are using delayed flushing settings (e.g., innodb_flush_log_at_trx_commit=2 or 1-second flush intervals).

When to be cautious:
  • Very large redo log files can increase recovery time after crash.
  • Systems with limited I/O throughput might experience spikes when flushing large logs.

Leverage Automation
If your workload writes a lot of data quickly, a small redo log will fill up fast and cause stalls. Too large, and recovery from a crash can take longer than it should.
Instead of relying on static recommendations, tools like Releem monitor how your database actually performs – tracking log usage, flush frequency, I/O pressure, and more – to recommend the right innodb_redo_log_capacity setting for your environment.

Work smarter, not harder, with Releem.

Related Variables

These variables together control redo log behavior and flushing patterns. Changing innodb_redo_log_capacity affects how long data stays in memory before being flushed.
FAQ:
MySQL
innodb_redo_log_capacity
Variable
What does innodb_redo_log_capacity control?
It sets the total size of the redo log in bytes. This log buffers transaction changes for crash recovery and controls how much write activity InnoDB can queue.

Is innodb_log_file_size still used?
As of MySQL 8.0.30+, innodb_redo_log_capacity replaces innodb_log_file_size. The older setting is ignored if innodb_redo_log_capacity is configured.

How do I tune this for high write throughput?
Start with 1G (1,073,741,824 bytes) and increase in increments if you continue to experience log waits or flushing stalls. Monitor behavior over time.

Does Releem optimize innodb_redo_log_capacity?
Yes, Releem evaluates buffer pool usage, write patterns, and I/O latency to recommend the ideal setting for your environment.

How large can I safely make this setting?
The practical limit depends on how much RAM you have and how fast your storage system can flush dirty pages. Just keep in mind that crash recovery time will grow with size.

What is the relationship between redo log capacity and flushing?
If the redo log fills up before dirty pages are flushed, transactions will stall. A larger redo log gives more buffer space, reducing the risk of stalls, but flushing must eventually keep up.

Releem automatically identifies MySQL performance issues, tunes configuration and optimizes SQL queries