feat: Improve innodb_redo_log_capacity recommendation#849
Merged
jmrenouard merged 1 commit intomajor:masterfrom Aug 29, 2025
Merged
feat: Improve innodb_redo_log_capacity recommendation#849jmrenouard merged 1 commit intomajor:masterfrom
jmrenouard merged 1 commit intomajor:masterfrom
Conversation
This commit implements a more intelligent recommendation for the `innodb_redo_log_capacity` variable for MySQL versions 8.0.30 and newer. The previous recommendation was based on a simple percentage of the `innodb_buffer_pool_size`, which was often inaccurate. The new logic calculates the hourly InnoDB log write rate based on the `Innodb_os_log_written` status variable and the server's uptime. It then suggests a value for `innodb_redo_log_capacity` that can hold at least one hour's worth of writes, rounded up to a practical power-of-2 GB value. A sanity check is also included to prevent recommending an excessively large redo log compared to the total size of the InnoDB data. For older MySQL and MariaDB versions, the existing logic for `innodb_log_file_size` and `innodb_log_files_in_group` is preserved. A new helper function `hr_bytes_practical_rnd` has been added to handle the rounding of the suggested size. Fixes major#784
devenbj
added a commit
to devenbj/MySQLTuner-perl
that referenced
this pull request
Aug 31, 2025
Fixes reporting issues with innodb_redo_log_capacity on MariaDB, where it does not exist. Regression from pull request major#849.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit implements a more intelligent recommendation for the
innodb_redo_log_capacityvariable for MySQL versions 8.0.30 and newer.The previous recommendation was based on a simple percentage of the
innodb_buffer_pool_size, which was often inaccurate. The new logic calculates the hourly InnoDB log write rate based on theInnodb_os_log_writtenstatus variable and the server's uptime. It then suggests a value forinnodb_redo_log_capacitythat can hold at least one hour's worth of writes, rounded up to a practical power-of-2 GB value.A sanity check is also included to prevent recommending an excessively large redo log compared to the total size of the InnoDB data.
For older MySQL and MariaDB versions, the existing logic for
innodb_log_file_sizeandinnodb_log_files_in_groupis preserved.A new helper function
hr_bytes_practical_rndhas been added to handle the rounding of the suggested size.Fixes #784