innodb_log_file_size
WARNINGINFO
Rule IDs: rl_001, rl_003
Overview
- Purpose
- Documented in the MySQL 8.4 manual as a server system variable (scope: Global). Purpose and semantics are described at the linked manual page.
- Dynamic (MySQL 8.4 reference)
- MySQL 8.4 marks this variable as not dynamic (
Dynamic= No). It must be set inmy.cnfor on the command line; changing it requires a restart. - Default value
- 48 MB (50331648) — pre-8.0.30 (MySQL 8.4)
- Version and product notes
- MariaDB and Percona Server may use different names, defaults, or dynamic behavior; verify their documentation.
- Documentation
- https://dev.mysql.com/doc/refman/8.4/en/innodb-parameters.html#sysvar_innodb_log_file_size
- Other vendors
What is checked
Rules that reference this variable, with their severity and what each rule detects:
- WARNING
rl_001: Increase innodb_log_file_size so total redo log space holds 1-2 hours of writes. Calculate: check LSN difference over 1 hour in SHOW ENGINE INNODB STATUS. - INFO
rl_003: Remove innodb_log_file_size and innodb_log_files_in_group from config. Set innodb_redo_log_capacity instead.
Tuning guidance
- Recommended actions:
- Increase innodb_log_file_size so total redo log space holds 1-2 hours of writes. Calculate: check LSN difference over 1 hour in SHOW ENGINE INNODB STATUS.
- Remove innodb_log_file_size and innodb_log_files_in_group from config. Set innodb_redo_log_capacity instead.
- Trade-offs: Larger redo logs reduce checkpoint frequency and improve write throughput, but increase crash recovery time. Durability settings (flush_log_at_trx_commit) trade performance for crash safety.
Example
-- In my.cnf (requires restart, pre-8.0.30):
innodb_log_file_size = 1G
innodb_log_files_in_group = 2
Always validate on a non-production instance first. Use SET PERSIST (MySQL 8.0+) for changes that should survive restarts.