Merge pull request #343 from pes-soft/innodb-logsize-suggestion-doc
Add recommendation for innodb log file changes and some extra information
This commit is contained in:
commit
e5f3736a64
2 changed files with 33 additions and 29 deletions
|
@ -211,6 +211,8 @@
|
||||||
* innodb_buffer_pool instances must be equals or lower than 64
|
* innodb_buffer_pool instances must be equals or lower than 64
|
||||||
* InnoDB Buffer Pool Usage
|
* InnoDB Buffer Pool Usage
|
||||||
* If more than 20% of InnoDB buffer pool is not used, MySQLTuner raise an alert.
|
* If more than 20% of InnoDB buffer pool is not used, MySQLTuner raise an alert.
|
||||||
|
* InnoDB Buffer Pool Log Size
|
||||||
|
* InnoDB total log file size should be 25% of innodb_buffer_pool_size
|
||||||
* InnoDB Read effiency
|
* InnoDB Read effiency
|
||||||
* Ratio of read without locks
|
* Ratio of read without locks
|
||||||
* InnoDB Write effiency
|
* InnoDB Write effiency
|
||||||
|
|
|
@ -5382,7 +5382,7 @@ sub mysql_innodb {
|
||||||
. $myvar{'innodb_thread_concurrency'};
|
. $myvar{'innodb_thread_concurrency'};
|
||||||
}
|
}
|
||||||
|
|
||||||
# InnoDB Buffer Pull Size
|
# InnoDB Buffer Pool Size
|
||||||
if ( $myvar{'innodb_file_per_table'} eq "ON" ) {
|
if ( $myvar{'innodb_file_per_table'} eq "ON" ) {
|
||||||
goodprint "InnoDB File per table is activated";
|
goodprint "InnoDB File per table is activated";
|
||||||
}
|
}
|
||||||
|
@ -5391,7 +5391,7 @@ sub mysql_innodb {
|
||||||
push( @adjvars, "innodb_file_per_table=ON" );
|
push( @adjvars, "innodb_file_per_table=ON" );
|
||||||
}
|
}
|
||||||
|
|
||||||
# InnoDB Buffer Pull Size
|
# InnoDB Buffer Pool Size
|
||||||
if ( $myvar{'innodb_buffer_pool_size'} > $enginestats{'InnoDB'} ) {
|
if ( $myvar{'innodb_buffer_pool_size'} > $enginestats{'InnoDB'} ) {
|
||||||
goodprint "InnoDB buffer pool / data size: "
|
goodprint "InnoDB buffer pool / data size: "
|
||||||
. hr_bytes( $myvar{'innodb_buffer_pool_size'} ) . "/"
|
. hr_bytes( $myvar{'innodb_buffer_pool_size'} ) . "/"
|
||||||
|
@ -5423,6 +5423,9 @@ sub mysql_innodb {
|
||||||
)
|
)
|
||||||
. ") if possible, so InnoDB total log files size equals to 25% of buffer pool size."
|
. ") if possible, so InnoDB total log files size equals to 25% of buffer pool size."
|
||||||
);
|
);
|
||||||
|
push( @generalrec,
|
||||||
|
"Read this before changing innodb_log_file_size and/or innodb_log_files_in_group: http://bit.ly/2wgkDvS"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
goodprint "Ratio InnoDB log file size / InnoDB Buffer pool size: "
|
goodprint "Ratio InnoDB log file size / InnoDB Buffer pool size: "
|
||||||
|
@ -5432,7 +5435,7 @@ sub mysql_innodb {
|
||||||
. " should be equal 25%";
|
. " should be equal 25%";
|
||||||
}
|
}
|
||||||
|
|
||||||
# InnoDB Buffer Pull Instances (MySQL 5.6.6+)
|
# InnoDB Buffer Pool Instances (MySQL 5.6.6+)
|
||||||
if ( defined( $myvar{'innodb_buffer_pool_instances'} ) ) {
|
if ( defined( $myvar{'innodb_buffer_pool_instances'} ) ) {
|
||||||
|
|
||||||
# Bad Value if > 64
|
# Bad Value if > 64
|
||||||
|
@ -5442,12 +5445,12 @@ sub mysql_innodb {
|
||||||
push( @adjvars, "innodb_buffer_pool_instances (<= 64)" );
|
push( @adjvars, "innodb_buffer_pool_instances (<= 64)" );
|
||||||
}
|
}
|
||||||
|
|
||||||
# InnoDB Buffer Pull Size > 1Go
|
# InnoDB Buffer Pool Size > 1Go
|
||||||
if ( $myvar{'innodb_buffer_pool_size'} > 1024 * 1024 * 1024 ) {
|
if ( $myvar{'innodb_buffer_pool_size'} > 1024 * 1024 * 1024 ) {
|
||||||
|
|
||||||
# InnoDB Buffer Pull Size / 1Go = InnoDB Buffer Pull Instances limited to 64 max.
|
# InnoDB Buffer Pool Size / 1Go = InnoDB Buffer Pool Instances limited to 64 max.
|
||||||
|
|
||||||
# InnoDB Buffer Pull Size > 64Go
|
# InnoDB Buffer Pool Size > 64Go
|
||||||
my $max_innodb_buffer_pool_instances =
|
my $max_innodb_buffer_pool_instances =
|
||||||
int( $myvar{'innodb_buffer_pool_size'} / ( 1024 * 1024 * 1024 ) );
|
int( $myvar{'innodb_buffer_pool_size'} / ( 1024 * 1024 * 1024 ) );
|
||||||
$max_innodb_buffer_pool_instances = 64
|
$max_innodb_buffer_pool_instances = 64
|
||||||
|
@ -5468,7 +5471,7 @@ sub mysql_innodb {
|
||||||
. $myvar{'innodb_buffer_pool_instances'} . "";
|
. $myvar{'innodb_buffer_pool_instances'} . "";
|
||||||
}
|
}
|
||||||
|
|
||||||
# InnoDB Buffer Pull Size < 1Go
|
# InnoDB Buffer Pool Size < 1Go
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( $myvar{'innodb_buffer_pool_instances'} != 1 ) {
|
if ( $myvar{'innodb_buffer_pool_instances'} != 1 ) {
|
||||||
|
@ -6381,4 +6384,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# cperl-indent-level: 8
|
# cperl-indent-level: 8
|
||||||
# perl-indent-level: 8
|
# perl-indent-level: 8
|
||||||
# End:
|
# End:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue