From 265ae9135f9ef20b2b7d2163ad4ab83beed581ec Mon Sep 17 00:00:00 2001 From: Ravage84 Date: Fri, 18 Apr 2025 00:34:24 +0200 Subject: [PATCH] Remove code for sub-par recommendation related to "innodb_redo_log_capacity" setting The calculation of the "innodb_log_size_pct" value was kept in. Resolves #784 --- mysqltuner.pl | 65 --------------------------------------------------- 1 file changed, 65 deletions(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index 8a609bbb..ac92cc54 100644 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -6437,71 +6437,6 @@ sub mysql_innodb { } } } - if ( $mycalc{'innodb_log_size_pct'} < 20 - or $mycalc{'innodb_log_size_pct'} > 30 ) - { - if ( defined $myvar{'innodb_redo_log_capacity'} ) { - badprint - "Ratio InnoDB redo log capacity / InnoDB Buffer pool size (" - . $mycalc{'innodb_log_size_pct'} . "%): " - . hr_bytes( $myvar{'innodb_redo_log_capacity'} ) . " / " - . hr_bytes( $myvar{'innodb_buffer_pool_size'} ) - . " should be equal to 25%"; - push( @adjvars, - "innodb_redo_log_capacity should be (=" - . hr_bytes_rnd( $myvar{'innodb_buffer_pool_size'} / 4 ) - . ") if possible, so InnoDB Redo log Capacity equals 25% of buffer pool size." - ); - push( @generalrec, -"Be careful, increasing innodb_redo_log_capacity means higher crash recovery mean time" - ); - } - else { - badprint "Ratio InnoDB log file size / InnoDB Buffer pool size (" - . $mycalc{'innodb_log_size_pct'} . "%): " - . hr_bytes( $myvar{'innodb_log_file_size'} ) . " * " - . $myvar{'innodb_log_files_in_group'} . " / " - . hr_bytes( $myvar{'innodb_buffer_pool_size'} ) - . " should be equal to 25%"; - push( - @adjvars, - "innodb_log_file_size should be (=" - . hr_bytes_rnd( - $myvar{'innodb_buffer_pool_size'} / - $myvar{'innodb_log_files_in_group'} / 4 - ) - . ") if possible, so InnoDB total log file size equals 25% of buffer pool size." - ); - push( @generalrec, -"Be careful, increasing innodb_log_file_size / innodb_log_files_in_group means higher crash recovery mean time" - ); - } - if ( mysql_version_le( 5, 6, 2 ) ) { - push( @generalrec, -"For MySQL 5.6.2 and lower, total innodb_log_file_size should have a ceiling of (4096MB / log files in group) - 1MB." - ); - } - - } - else { - if ( defined $myvar{'innodb_redo_log_capacity'} ) { - goodprint - "Ratio InnoDB Redo Log Capacity / InnoDB Buffer pool size: " - . hr_bytes( $myvar{'innodb_redo_log_capacity'} ) . "/" - . hr_bytes( $myvar{'innodb_buffer_pool_size'} ) - . " should be equal to 25%"; - } - else { - push( @generalrec, -"Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: https://bit.ly/2TcGgtU" - ); - goodprint "Ratio InnoDB log file size / InnoDB Buffer pool size: " - . hr_bytes( $myvar{'innodb_log_file_size'} ) . " * " - . $myvar{'innodb_log_files_in_group'} . "/" - . hr_bytes( $myvar{'innodb_buffer_pool_size'} ) - . " should be equal to 25%"; - } - } # InnoDB Buffer Pool Instances (MySQL 5.6.6+) if ( not mysql_version_ge( 10, 4 )