commit
9daf5cf42e
1 changed files with 93 additions and 95 deletions
|
@ -2920,8 +2920,7 @@ sub mysql_stats {
|
||||||
&& $mystat{'Binlog_cache_use'} > 0 ) {
|
&& $mystat{'Binlog_cache_use'} > 0 ) {
|
||||||
badprint "Binlog cache memory access: "
|
badprint "Binlog cache memory access: "
|
||||||
. $mycalc{'pct_binlog_cache'} . "% ("
|
. $mycalc{'pct_binlog_cache'} . "% ("
|
||||||
. (
|
. ( $mystat{'Binlog_cache_use'} - $mystat{'Binlog_cache_disk_use'} )
|
||||||
$mystat{'Binlog_cache_use'} - $mystat{'Binlog_cache_disk_use'} )
|
|
||||||
. " Memory / "
|
. " Memory / "
|
||||||
. $mystat{'Binlog_cache_use'}
|
. $mystat{'Binlog_cache_use'}
|
||||||
. " Total)";
|
. " Total)";
|
||||||
|
@ -2936,8 +2935,7 @@ sub mysql_stats {
|
||||||
} else {
|
} else {
|
||||||
goodprint "Binlog cache memory access: "
|
goodprint "Binlog cache memory access: "
|
||||||
. $mycalc{'pct_binlog_cache'} . "% ("
|
. $mycalc{'pct_binlog_cache'} . "% ("
|
||||||
. (
|
. ( $mystat{'Binlog_cache_use'} - $mystat{'Binlog_cache_disk_use'} )
|
||||||
$mystat{'Binlog_cache_use'} - $mystat{'Binlog_cache_disk_use'} )
|
|
||||||
. " Memory / "
|
. " Memory / "
|
||||||
. $mystat{'Binlog_cache_use'}
|
. $mystat{'Binlog_cache_use'}
|
||||||
. " Total)";
|
. " Total)";
|
||||||
|
@ -3757,7 +3755,7 @@ sub mysqsl_pfs {
|
||||||
}
|
}
|
||||||
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
||||||
|
|
||||||
subheaderprint "Performance schema: Tables not using InnoDb buffer";
|
subheaderprint "Performance schema: Tables not using InnoDB buffer";
|
||||||
$nbL=1;
|
$nbL=1;
|
||||||
for my $lQuery(select_array (' Select table_schema, table_name from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NULL;')) {
|
for my $lQuery(select_array (' Select table_schema, table_name from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NULL;')) {
|
||||||
infoprint " +-- $nbL: $lQuery";
|
infoprint " +-- $nbL: $lQuery";
|
||||||
|
@ -3765,14 +3763,14 @@ sub mysqsl_pfs {
|
||||||
}
|
}
|
||||||
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
||||||
|
|
||||||
subheaderprint "Performance schema: Table not using InnoDb buffer";
|
subheaderprint "Performance schema: Table not using InnoDB buffer";
|
||||||
$nbL=1;
|
$nbL=1;
|
||||||
for my $lQuery(select_array (' Select table_schema, table_name from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NULL;')) {
|
for my $lQuery(select_array (' Select table_schema, table_name from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NULL;')) {
|
||||||
infoprint " +-- $nbL: $lQuery";
|
infoprint " +-- $nbL: $lQuery";
|
||||||
$nbL++;
|
$nbL++;
|
||||||
}
|
}
|
||||||
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
||||||
subheaderprint "Performance schema: Table not using InnoDb buffer";
|
subheaderprint "Performance schema: Table not using InnoDB buffer";
|
||||||
$nbL=1;
|
$nbL=1;
|
||||||
for my $lQuery(select_array (' Select table_schema, table_name from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NULL;')) {
|
for my $lQuery(select_array (' Select table_schema, table_name from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NULL;')) {
|
||||||
infoprint " +-- $nbL: $lQuery";
|
infoprint " +-- $nbL: $lQuery";
|
||||||
|
@ -3780,18 +3778,18 @@ sub mysqsl_pfs {
|
||||||
}
|
}
|
||||||
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
||||||
|
|
||||||
subheaderprint "Performance schema: Top 15 Tables using InnoDb buffer";
|
subheaderprint "Performance schema: Top 15 Tables using InnoDB buffer";
|
||||||
$nbL=1;
|
$nbL=1;
|
||||||
for my $lQuery(select_array ('Select table_schema, table_name,innodb_buffer_allocated from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NOT NULL ORDER BY innodb_buffer_allocated DESC LIMIT 15;')) {
|
for my $lQuery(select_array ('select table_schema,table_name,innodb_buffer_allocated from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NOT NULL ORDER BY innodb_buffer_allocated DESC LIMIT 15;')) {
|
||||||
infoprint " +-- $nbL: $lQuery";
|
infoprint " +-- $nbL: $lQuery";
|
||||||
$nbL++;
|
$nbL++;
|
||||||
}
|
}
|
||||||
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
infoprint "No information found or indicators desactivated." if ($nbL == 1);
|
||||||
|
|
||||||
|
|
||||||
subheaderprint "Performance schema: Top 15 Tables with InnoDb buffer free";
|
subheaderprint "Performance schema: Top 15 Tables with InnoDB buffer free";
|
||||||
$nbL=1;
|
$nbL=1;
|
||||||
for my $lQuery(select_array ('Select table_schema, table_name,innodb_buffer_free from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NOT NULL ORDER BY innodb_buffer_free DESC LIMIT 15;')) {
|
for my $lQuery(select_array ('select table_schema,table_name,innodb_buffer_free from sys.schema_table_statistics_with_buffer where innodb_buffer_allocated IS NOT NULL ORDER BY innodb_buffer_free DESC LIMIT 15;')) {
|
||||||
infoprint " +-- $nbL: $lQuery";
|
infoprint " +-- $nbL: $lQuery";
|
||||||
$nbL++;
|
$nbL++;
|
||||||
}
|
}
|
||||||
|
@ -4289,14 +4287,14 @@ having sum(if(c.column_key in ('PRI','UNI'), 1,0)) = 0"
|
||||||
else {
|
else {
|
||||||
goodprint "All tables get a primary key";
|
goodprint "All tables get a primary key";
|
||||||
}
|
}
|
||||||
my @nonInnoDbTables = select_array(
|
my @nonInnoDBTables = select_array(
|
||||||
"select CONCAT(table_schema,CONCAT('.', table_name)) from information_schema.tables where ENGINE <> 'InnoDb' and table_schema not in ('mysql', 'performance_schema', 'information_schema')"
|
"select CONCAT(table_schema,CONCAT('.', table_name)) from information_schema.tables where ENGINE <> 'InnoDB' and table_schema not in ('mysql', 'performance_schema', 'information_schema')"
|
||||||
);
|
);
|
||||||
if ( scalar(@nonInnoDbTables) > 0 ) {
|
if ( scalar(@nonInnoDBTables) > 0 ) {
|
||||||
badprint "Following table(s) are not InnoDB table:";
|
badprint "Following table(s) are not InnoDB table:";
|
||||||
push @generalrec,
|
push @generalrec,
|
||||||
"Ensure that all table(s) are InnoDB tables for Galera replication";
|
"Ensure that all table(s) are InnoDB tables for Galera replication";
|
||||||
foreach my $badtable (@nonInnoDbTables) {
|
foreach my $badtable (@nonInnoDBTables) {
|
||||||
badprint "\t$badtable";
|
badprint "\t$badtable";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4311,11 +4309,11 @@ having sum(if(c.column_key in ('PRI','UNI'), 1,0)) = 0"
|
||||||
goodprint "Binlog format is in ROW mode.";
|
goodprint "Binlog format is in ROW mode.";
|
||||||
}
|
}
|
||||||
if ( $myvar{'innodb_flush_log_at_trx_commit'} != 0 ) {
|
if ( $myvar{'innodb_flush_log_at_trx_commit'} != 0 ) {
|
||||||
badprint "Innodb flush log at each commit should be disabled.";
|
badprint "InnoDB flush log at each commit should be disabled.";
|
||||||
push @adjvars, "innodb_flush_log_at_trx_commit = 0";
|
push @adjvars, "innodb_flush_log_at_trx_commit = 0";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
goodprint "Innodb flush log at each commit is disabled for Galera.";
|
goodprint "InnoDB flush log at each commit is disabled for Galera.";
|
||||||
}
|
}
|
||||||
|
|
||||||
infoprint "Read consistency mode :" . $myvar{'wsrep_causal_reads'};
|
infoprint "Read consistency mode :" . $myvar{'wsrep_causal_reads'};
|
||||||
|
@ -4546,7 +4544,7 @@ sub mysql_innodb {
|
||||||
. ") if possible." );
|
. ") if possible." );
|
||||||
}
|
}
|
||||||
if ($mycalc{'innodb_log_size_pct'} < 20 or $mycalc{'innodb_log_size_pct'} > 30) {
|
if ($mycalc{'innodb_log_size_pct'} < 20 or $mycalc{'innodb_log_size_pct'} > 30) {
|
||||||
badprint "Ratio InnoDB log file size / InnoDb Buffer pool size (".
|
badprint "Ratio InnoDB log file size / InnoDB Buffer pool size (".
|
||||||
$mycalc{'innodb_log_size_pct'}.
|
$mycalc{'innodb_log_size_pct'}.
|
||||||
" %): " . hr_bytes( $myvar{'innodb_log_file_size'} ) . "/"
|
" %): " . hr_bytes( $myvar{'innodb_log_file_size'} ) . "/"
|
||||||
. hr_bytes( $myvar{'innodb_buffer_pool_size'} ) . " should be equal 25%";
|
. hr_bytes( $myvar{'innodb_buffer_pool_size'} ) . " should be equal 25%";
|
||||||
|
@ -4554,7 +4552,7 @@ sub mysql_innodb {
|
||||||
"innodb_log_file_size should be equals to 1/4 of buffer pool size (="
|
"innodb_log_file_size should be equals to 1/4 of buffer pool size (="
|
||||||
. hr_bytes_rnd( $myvar{'innodb_buffer_pool_size'}/4 ) . ") if possible." );
|
. hr_bytes_rnd( $myvar{'innodb_buffer_pool_size'}/4 ) . ") if possible." );
|
||||||
} else {
|
} else {
|
||||||
goodprint "InnoDB log file size / InnoDb Buffer pool size: "
|
goodprint "InnoDB log file size / InnoDB Buffer pool size: "
|
||||||
. hr_bytes( $myvar{'innodb_log_file_size'} ) . "/"
|
. hr_bytes( $myvar{'innodb_log_file_size'} ) . "/"
|
||||||
. hr_bytes( $myvar{'innodb_buffer_pool_size'} ) . " should be equal 25%";
|
. hr_bytes( $myvar{'innodb_buffer_pool_size'} ) . " should be equal 25%";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue