Introduction Many MySQL configurations inherit redo log sizing from defaults, aging blog posts, or configuration folklore.
InnoDB Redo Log Sizing: Stop Guessing, Start Measuring appeared first on MariaDB.org
Many MySQL configurations inherit redo log sizing from defaults, aging blog posts, or configuration folklore.
innodb_redo_log_capacity gets set once… and then quietly fades into the background.
But redo log capacity directly shapes how efficiently MySQL absorbs writes, manages checkpoint pressure, and handles burst-heavy workloads.
Set it too low, and aggressive flushing can throttle throughput.
Set it too high, and crash recovery can become painfully long.
Redo logs are more than crash insurance.
They are part of your write-performance architecture.
Why Redo Logs MatterRedo logs are the shock absorbers of write-heavy MySQL. Too small, and performance jolts. Too large, and recovery drags.
InnoDB redo logs are often described as crash recovery journals, but that description undersells their real operational value.
Redo logs function as a write buffer between committed transactions and eventual data file writes.
When a transaction commits:
This write-ahead logging (WAL) design allows MySQL to:
Redo logs act like pressure regulators in a write-heavy system.
They absorb pressure spikes so the entire system doesn’t thrash every time demand increases.
Without enough redo capacity, MySQL has less room to absorb write bursts before it must flush aggressively.
Checkpoint Age and Flushing PressureRedo log sizing becomes most visible when checkpoint pressure builds.
Checkpoint age represents how far current write activity has advanced beyond the last durable checkpoint:
Checkpoint Age = Current LSN - Last Checkpoint LSN
As checkpoint age approaches total redo capacity:
This is where undersized redo logs can trigger flush storms.
Useful metricsMySQL isn’t writing more data. It’s being forced to write sooner and less efficiently.
Innodb_checkpoint_ageInnodb_buffer_pool_pages_dirtyInnodb_data_fsyncsInnodb_log_waitsSymptoms of Undersized RedoWhen redo space shrinks, MySQL doesn’t stop writing. It starts panicking earlier.
Small redo logs rarely announce themselves directly.
Instead, they often masquerade as generalized storage or write-performance issues.
Common warning signsMany systems blame disks when the real issue is insufficient redo headroom.
If writes are arriving faster than redo can comfortably buffer them, MySQL is forced into reactive flushing patterns.
The problem may not be disk speed.
It may be timing pressure.
Measuring with Status CountersRedo log sizing should be based on observed workload, not memory percentages or inherited defaults.
Step 1: Measure redo generation rateUse:
SHOW ENGINE INNODB STATUS;Track:
Measure LSN growth over time:
Redo Generation Rate = (LSN delta) / elapsed time
If LSN grows by 4 GB over one hour:
SHOW GLOBAL STATUS LIKE 'Innodb_log_waits';
SHOW GLOBAL STATUS LIKE 'Innodb_os_log%';Innodb_log_waits
If this value increases, transactions are waiting for log free space.
That is one of the clearest signs your redo logs may be too small.
Innodb_log_waits is less a tuning suggestion and more a smoke alarm.
Forget percentage-of-RAM formulas.
Redo logs should be sized around workload intensity.
A practical starting point:
Size redo capacity to hold 30 to 60 minutes of peak redo generation
ExamplePeak redo generation = 6 GB/hour
Minimum:
30 minutes = 3 GB
Safer:
60 minutes = 6 GB
Heavy burst environments:
Larger sizing may reduce flush volatility further
Trade-OffsSmaller Redo LogsPros:
Cons:
Pros:
Cons:
Treating redo like buffer pool sizing Redo capacity is about write throughput buffering, not memory caching.
Ignoring Innodb_log_waits This can leave obvious pressure invisible until performance suffers.
Oversizing without testing recovery Large redo logs may improve runtime but worsen restart scenarios.
Sizing for average load instead of peak Redo logs exist to absorb pressure spikes, not calm periods.
The right redo log size isn’t about maximizing a configuration value.
It’s about matching capacity to workload behavior.
When redo logs are properly sized, they fade into the background.
They quietly absorb bursts, smooth checkpoint behavior, and preserve performance consistency under pressure.
Redo logs work best when they disappear into the background, quietly absorbing pressure instead of creating it.
Stop guessing.
Measure your workload, observe your log pressure, and size with intent. ∎
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Impressed by Disabling InnoDB Redo Logging for Creating Tables as Fast as Possible | 0 | 5.06 | 28-10-2024 |
| 2 | InnoDB Buffer Pool Tuning: From Rule-of-Thumb to Real Signals | 0 | 10.35 | 02-04-2026 |
| 3 | InnoDB Page Flushing Diagram | 0 | 5.76 | 18-06-2022 |
| 4 | MySQL IOPS for Reads and Surprsies | 0 | 7.08 | 20-11-2022 |
| 5 | Make SHOW as good as SELECT even with InnoDB | 0 | 8.55 | 19-03-2024 |
| 6 | MySQL LRU Flushing and I/O Capacity | 0 | 7.54 | 02-09-2021 |
| 7 | Efficient MySQL Performance In 10 Sentences | 0 | 9.92 | 09-11-2024 |
| 8 | Cross-site Disaster Recovery with Percona Operator for MySQL | 0 | 6.1 | 06-07-2026 |
| 9 | What the Flush? | 0 | 11.7 | 05-07-2020 |
| 10 | Understanding InnoDB Tablespace Duplicate Check (MySQL Startup with Many Tables) | 0 | 4.76 | 19-11-2024 |