Version 2.0.5 [Patch] Legibility and typos, mark 3 #602
This commit is contained in:
parent
464e632834
commit
3bc7b6a34b
2 changed files with 96 additions and 99 deletions
6
USAGE.md
6
USAGE.md
|
@ -1,6 +1,6 @@
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
MySQLTuner 2.0.4 - MySQL High Performance Tuning Script
|
MySQLTuner2.0.5 - MySQL High Performance Tuning Script
|
||||||
|
|
||||||
# IMPORTANT USAGE GUIDELINES
|
# IMPORTANT USAGE GUIDELINES
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ You must provide the remote server's total memory when connecting to other serve
|
||||||
--pfstat Print Performance schema
|
--pfstat Print Performance schema
|
||||||
--nopfstat Don't Print Performance schema
|
--nopfstat Don't Print Performance schema
|
||||||
--bannedports Ports banned separated by comma (,)
|
--bannedports Ports banned separated by comma (,)
|
||||||
--server-log Define specifi error_log to analyze
|
--server-log Define specific error_log to analyze
|
||||||
--maxportallowed Number of ports opened allowed on this hosts
|
--maxportallowed Number of ports opened allowed on this host
|
||||||
--buffers Print global and per-thread buffer values
|
--buffers Print global and per-thread buffer values
|
||||||
|
|
||||||
# PERLDOC
|
# PERLDOC
|
||||||
|
|
117
mysqltuner.pl
117
mysqltuner.pl
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
# mysqltuner.pl - Version 2.0.4
|
# mysqltuner.pl - Version2.0.5
|
||||||
# High Performance MySQL Tuning Script
|
# High Performance MySQL Tuning Script
|
||||||
# Copyright (C) 2006-2022 Major Hayden - major@mhtx.net
|
# Copyright (C) 2006-2022 Major Hayden - major@mhtx.net
|
||||||
# Copyright (C) 2015-2022 Jean-Marie Renouard - jmrenouard@gmail.com
|
# Copyright (C) 2015-2022 Jean-Marie Renouard - jmrenouard@gmail.com
|
||||||
|
@ -655,7 +655,7 @@ sub update_tuner_version {
|
||||||
else {
|
else {
|
||||||
badprint "Couldn't update MySQLTuner script";
|
badprint "Couldn't update MySQLTuner script";
|
||||||
}
|
}
|
||||||
infoprint "Stopping program: MySQLTuner has be updated.";
|
infoprint "Stopping program: MySQLTuner script must be updated first.";
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1174,7 +1174,7 @@ sub get_all_vars {
|
||||||
$dummyselect = select_one "SELECT VERSION()";
|
$dummyselect = select_one "SELECT VERSION()";
|
||||||
if ( not defined($dummyselect) or $dummyselect eq "" ) {
|
if ( not defined($dummyselect) or $dummyselect eq "" ) {
|
||||||
badprint
|
badprint
|
||||||
"You probably did not get enough privileges for running MySQLTuner ...";
|
"You probably do not have enough privileges to run MySQLTuner ...";
|
||||||
exit(256);
|
exit(256);
|
||||||
}
|
}
|
||||||
$dummyselect =~ s/(.*?)\-.*/$1/;
|
$dummyselect =~ s/(.*?)\-.*/$1/;
|
||||||
|
@ -1514,7 +1514,7 @@ sub cve_recommendations {
|
||||||
if ( $mysqlvermajor eq 5 and $mysqlverminor eq 5 ) {
|
if ( $mysqlvermajor eq 5 and $mysqlverminor eq 5 ) {
|
||||||
infoprint
|
infoprint
|
||||||
"False positive CVE(s) for MySQL and MariaDB 5.5.x can be found.";
|
"False positive CVE(s) for MySQL and MariaDB 5.5.x can be found.";
|
||||||
infoprint "Check careful each CVE for those particular versions";
|
infoprint "Check carefully each CVE for those particular versions";
|
||||||
}
|
}
|
||||||
badprint $cvefound . " CVE(s) found for your MySQL release.";
|
badprint $cvefound . " CVE(s) found for your MySQL release.";
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
|
@ -1874,7 +1874,7 @@ sub system_recommendations {
|
||||||
. scalar @opened_ports
|
. scalar @opened_ports
|
||||||
. " listening port(s) on this server.";
|
. " listening port(s) on this server.";
|
||||||
if ( scalar(@opened_ports) > $opt{'maxportallowed'} ) {
|
if ( scalar(@opened_ports) > $opt{'maxportallowed'} ) {
|
||||||
badprint "There is too many listening ports: "
|
badprint "There are too many listening ports: "
|
||||||
. scalar(@opened_ports)
|
. scalar(@opened_ports)
|
||||||
. " opened > "
|
. " opened > "
|
||||||
. $opt{'maxportallowed'}
|
. $opt{'maxportallowed'}
|
||||||
|
@ -1884,7 +1884,7 @@ sub system_recommendations {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
goodprint "There is less than "
|
goodprint "There are less than "
|
||||||
. $opt{'maxportallowed'}
|
. $opt{'maxportallowed'}
|
||||||
. " opened ports on this server.";
|
. " opened ports on this server.";
|
||||||
}
|
}
|
||||||
|
@ -1990,7 +1990,7 @@ sub security_recommendations {
|
||||||
}
|
}
|
||||||
if ( mysql_version_le( 5, 1 ) ) {
|
if ( mysql_version_le( 5, 1 ) ) {
|
||||||
badprint "No more password checks for MySQL version <=5.1";
|
badprint "No more password checks for MySQL version <=5.1";
|
||||||
badprint "MySQL version <=5.1 are deprecated and end of support.";
|
badprint "MySQL version <=5.1 is deprecated and end of support.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2098,7 +2098,7 @@ q{SELECT CONCAT(QUOTE(user), '@', QUOTE(host)) FROM mysql.global_priv WHERE
|
||||||
. $pass
|
. $pass
|
||||||
. "', 2, LENGTH('"
|
. "', 2, LENGTH('"
|
||||||
. $pass . "'))))";
|
. $pass . "'))))";
|
||||||
debugprint "There is " . scalar(@mysqlstatlist) . " items.";
|
debugprint "There are " . scalar(@mysqlstatlist) . " items.";
|
||||||
if (@mysqlstatlist) {
|
if (@mysqlstatlist) {
|
||||||
foreach my $line (@mysqlstatlist) {
|
foreach my $line (@mysqlstatlist) {
|
||||||
chomp($line);
|
chomp($line);
|
||||||
|
@ -2233,9 +2233,9 @@ sub validate_mysql_version {
|
||||||
else {
|
else {
|
||||||
badprint "Your MySQL version "
|
badprint "Your MySQL version "
|
||||||
. $myvar{'version'}
|
. $myvar{'version'}
|
||||||
. " is EOL software! Upgrade soon!";
|
. " is EOL software. Upgrade soon!";
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"You are using n unsupported version for production environments" );
|
"You are using an unsupported version for production environments" );
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"Upgrade as soon as possible to a supported version !" );
|
"Upgrade as soon as possible to a supported version !" );
|
||||||
|
|
||||||
|
@ -2533,9 +2533,9 @@ sub check_storage_engines {
|
||||||
&& defined $myvar{'have_isam'}
|
&& defined $myvar{'have_isam'}
|
||||||
&& $myvar{'have_isam'} eq "YES" )
|
&& $myvar{'have_isam'} eq "YES" )
|
||||||
{
|
{
|
||||||
badprint "MYISAM is enabled but isn't being used";
|
badprint "MyISAM is enabled but isn't being used";
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"Add skip-isam to MySQL configuration to disable ISAM (MySQL > 4.1.0)"
|
"Add skip-isam to MySQL configuration to disable MyISAM (MySQL > 4.1.0)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2607,7 +2607,6 @@ sub check_storage_engines {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
my %mycalc;
|
my %mycalc;
|
||||||
|
@ -2877,7 +2876,6 @@ sub calculations {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$mycalc{'table_cache_hit_rate'} = 100;
|
$mycalc{'table_cache_hit_rate'} = 100;
|
||||||
|
@ -3221,7 +3219,7 @@ sub mysql_stats {
|
||||||
}
|
}
|
||||||
elsif ( $result{'Variables'}{'skip_name_resolve'} eq 'OFF' ) {
|
elsif ( $result{'Variables'}{'skip_name_resolve'} eq 'OFF' ) {
|
||||||
badprint
|
badprint
|
||||||
"Name resolution is active: a reverse name resolution is made for each new connection and can reduce performance";
|
"Name resolution is active: a reverse name resolution is made for each new connection which can reduce performance";
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1"
|
"Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1"
|
||||||
);
|
);
|
||||||
|
@ -3490,7 +3488,7 @@ sub mysql_stats {
|
||||||
"This is MyISAM only table_cache scalability problem, InnoDB not affected."
|
"This is MyISAM only table_cache scalability problem, InnoDB not affected."
|
||||||
);
|
);
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"See more details here: https://bugs.mysql.com/bug.php?id=49177"
|
"For more details see: https://bugs.mysql.com/bug.php?id=49177"
|
||||||
);
|
);
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"This bug already fixed in MySQL 5.7.9 and newer MySQL versions."
|
"This bug already fixed in MySQL 5.7.9 and newer MySQL versions."
|
||||||
|
@ -3639,7 +3637,7 @@ sub mysql_stats {
|
||||||
sub mysql_myisam {
|
sub mysql_myisam {
|
||||||
subheaderprint "MyISAM Metrics";
|
subheaderprint "MyISAM Metrics";
|
||||||
if ( mysql_version_ge(8) and mysql_version_le(10) ) {
|
if ( mysql_version_ge(8) and mysql_version_le(10) ) {
|
||||||
infoprint "MyISAM Metrics are disabled on last MySQL versions.";
|
infoprint "MyISAM Metrics are disabled since MySQL 8.0.";
|
||||||
if ( $myvar{'key_buffer_size'} > 0 ) {
|
if ( $myvar{'key_buffer_size'} > 0 ) {
|
||||||
push( @adjvars, "key_buffer_size=0" );
|
push( @adjvars, "key_buffer_size=0" );
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
|
@ -3843,13 +3841,13 @@ sub mariadb_threadpool {
|
||||||
if ( $myvar{'thread_pool_size'} < 4 or $myvar{'thread_pool_size'} > 8 )
|
if ( $myvar{'thread_pool_size'} < 4 or $myvar{'thread_pool_size'} > 8 )
|
||||||
{
|
{
|
||||||
badprint
|
badprint
|
||||||
"thread_pool_size between 4 and 8 when using MyIsam storage engine.";
|
"thread_pool_size between 4 and 8 when using MyISAM storage engine.";
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"Thread pool size for MyIsam usage ("
|
"Thread pool size for MyISAM usage ("
|
||||||
. $myvar{'thread_pool_size'}
|
. $myvar{'thread_pool_size'}
|
||||||
. ")" );
|
. ")" );
|
||||||
push( @adjvars,
|
push( @adjvars,
|
||||||
"thread_pool_size between 4 and 8 for MyIsam usage" );
|
"thread_pool_size between 4 and 8 for MyISAM usage" );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
goodprint
|
goodprint
|
||||||
|
@ -3891,7 +3889,7 @@ sub mysqsl_pfs {
|
||||||
}
|
}
|
||||||
|
|
||||||
unless ( grep /^sys$/, select_array("SHOW DATABASES") ) {
|
unless ( grep /^sys$/, select_array("SHOW DATABASES") ) {
|
||||||
infoprint "Sys schema isn't installed.";
|
infoprint "Sys schema is not installed.";
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"Consider installing Sys schema from https://github.com/mysql/mysql-sys for MySQL"
|
"Consider installing Sys schema from https://github.com/mysql/mysql-sys for MySQL"
|
||||||
) unless ( mysql_version_le( 5, 6 ) );
|
) unless ( mysql_version_le( 5, 6 ) );
|
||||||
|
@ -4703,7 +4701,7 @@ sub mysqsl_pfs {
|
||||||
|
|
||||||
#schema_index_statistics
|
#schema_index_statistics
|
||||||
# TOP 15 most read index
|
# TOP 15 most read index
|
||||||
subheaderprint "Performance schema: TOP 15 most read indexes";
|
subheaderprint "Performance schema: Top 15 most read indexes";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -4793,7 +4791,7 @@ sub mysqsl_pfs {
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
# TOP 15 most read tables
|
# TOP 15 most read tables
|
||||||
subheaderprint "Performance schema: TOP 15 most read tables";
|
subheaderprint "Performance schema: Top 15 most read tables";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -4993,7 +4991,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 reader queries (95% percentile)";
|
subheaderprint "Performance schema: Top 15 reader queries (95% percentile)";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5008,7 +5006,7 @@ sub mysqsl_pfs {
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint
|
subheaderprint
|
||||||
"Performance schema: TOP 15 most row look queries (95% percentile)";
|
"Performance schema: Top 15 most row look queries (95% percentile)";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5023,7 +5021,7 @@ sub mysqsl_pfs {
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint
|
subheaderprint
|
||||||
"Performance schema: TOP 15 total latency queries (95% percentile)";
|
"Performance schema: Top 15 total latency queries (95% percentile)";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5038,7 +5036,7 @@ sub mysqsl_pfs {
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint
|
subheaderprint
|
||||||
"Performance schema: TOP 15 max latency queries (95% percentile)";
|
"Performance schema: Top 15 max latency queries (95% percentile)";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5053,7 +5051,7 @@ sub mysqsl_pfs {
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint
|
subheaderprint
|
||||||
"Performance schema: TOP 15 average latency queries (95% percentile)";
|
"Performance schema: Top 15 average latency queries (95% percentile)";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5095,7 +5093,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 row sorting queries with sort";
|
subheaderprint "Performance schema: Top 15 row sorting queries with sort";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5109,7 +5107,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 total latency queries with sort";
|
subheaderprint "Performance schema: Top 15 total latency queries with sort";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5123,7 +5121,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 merge queries with sort";
|
subheaderprint "Performance schema: Top 15 merge queries with sort";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5138,7 +5136,7 @@ sub mysqsl_pfs {
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint
|
subheaderprint
|
||||||
"Performance schema: TOP 15 average sort merges queries with sort";
|
"Performance schema: Top 15 average sort merges queries with sort";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5152,7 +5150,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 scans queries with sort";
|
subheaderprint "Performance schema: Top 15 scans queries with sort";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5166,7 +5164,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 range queries with sort";
|
subheaderprint "Performance schema: Top 15 range queries with sort";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5231,7 +5229,7 @@ sub mysqsl_pfs {
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint
|
subheaderprint
|
||||||
"Performance schema: TOP 15 total latency queries with temp table";
|
"Performance schema: Top 15 total latency queries with temp table";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5245,7 +5243,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 queries with temp table to disk";
|
subheaderprint "Performance schema: Top 15 queries with temp table to disk";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5262,7 +5260,7 @@ sub mysqsl_pfs {
|
||||||
##################################################################################
|
##################################################################################
|
||||||
#wait_classes_global_by_latency
|
#wait_classes_global_by_latency
|
||||||
|
|
||||||
#ysql> select * from wait_classes_global_by_latency;
|
#mysql> select * from wait_classes_global_by_latency;
|
||||||
#-----------------+-------+---------------+-------------+-------------+-------------+
|
#-----------------+-------+---------------+-------------+-------------+-------------+
|
||||||
# event_class | total | total_latency | min_latency | avg_latency | max_latency |
|
# event_class | total | total_latency | min_latency | avg_latency | max_latency |
|
||||||
#-----------------+-------+---------------+-------------+-------------+-------------+
|
#-----------------+-------+---------------+-------------+-------------+-------------+
|
||||||
|
@ -5272,7 +5270,7 @@ sub mysqsl_pfs {
|
||||||
#-----------------+-------+---------------+-------------+-------------+-------------+
|
#-----------------+-------+---------------+-------------+-------------+-------------+
|
||||||
# rows in set (0,00 sec)
|
# rows in set (0,00 sec)
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 class events by number";
|
subheaderprint "Performance schema: Top 15 class events by number";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5286,7 +5284,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 30 events by number";
|
subheaderprint "Performance schema: Top 30 events by number";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5300,7 +5298,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 class events by total latency";
|
subheaderprint "Performance schema: Top 15 class events by total latency";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5314,7 +5312,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 30 events by total latency";
|
subheaderprint "Performance schema: Top 30 events by total latency";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5328,7 +5326,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 15 class events by max latency";
|
subheaderprint "Performance schema: Top 15 class events by max latency";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5342,7 +5340,7 @@ sub mysqsl_pfs {
|
||||||
infoprint "No information found or indicators deactivated."
|
infoprint "No information found or indicators deactivated."
|
||||||
if ( $nbL == 1 );
|
if ( $nbL == 1 );
|
||||||
|
|
||||||
subheaderprint "Performance schema: TOP 30 events by max latency";
|
subheaderprint "Performance schema: Top 30 events by max latency";
|
||||||
$nbL = 1;
|
$nbL = 1;
|
||||||
for my $lQuery (
|
for my $lQuery (
|
||||||
select_array(
|
select_array(
|
||||||
|
@ -5592,19 +5590,19 @@ group by c.table_schema,c.table_name
|
||||||
having sum(if(c.column_key in ('PRI','UNI'), 1,0)) = 0"
|
having sum(if(c.column_key in ('PRI','UNI'), 1,0)) = 0"
|
||||||
);
|
);
|
||||||
|
|
||||||
infoprint "CPU core detected : " . (cpu_cores);
|
infoprint "CPU cores detected : " . (cpu_cores);
|
||||||
infoprint "wsrep_slave_threads: " . get_wsrep_option('wsrep_slave_threads');
|
infoprint "wsrep_slave_threads: " . get_wsrep_option('wsrep_slave_threads');
|
||||||
|
|
||||||
if ( get_wsrep_option('wsrep_slave_threads') > ( (cpu_cores) * 4 )
|
if ( get_wsrep_option('wsrep_slave_threads') > ( (cpu_cores) * 4 )
|
||||||
or get_wsrep_option('wsrep_slave_threads') < ( (cpu_cores) * 2 ) )
|
or get_wsrep_option('wsrep_slave_threads') < ( (cpu_cores) * 2 ) )
|
||||||
{
|
{
|
||||||
badprint
|
badprint
|
||||||
"wsrep_slave_threads is not equal to 2, 3 or 4 times number of CPU(s)";
|
"wsrep_slave_threads is not equal to 2, 3 or 4 times the number of CPU(s)";
|
||||||
push @adjvars, "wsrep_slave_threads = " . ( (cpu_cores) * 4 );
|
push @adjvars, "wsrep_slave_threads = " . ( (cpu_cores) * 4 );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
goodprint
|
goodprint
|
||||||
"wsrep_slave_threads is equal to 2, 3 or 4 times number of CPU(s)";
|
"wsrep_slave_threads is equal to 2, 3 or 4 times the number of CPU(s)";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( get_wsrep_option('wsrep_slave_threads') > 1 ) {
|
if ( get_wsrep_option('wsrep_slave_threads') > 1 ) {
|
||||||
|
@ -5723,7 +5721,7 @@ having sum(if(c.column_key in ('PRI','UNI'), 1,0)) = 0"
|
||||||
# wsrep_cluster_address doesn't include garbd nodes
|
# wsrep_cluster_address doesn't include garbd nodes
|
||||||
if ( $nbNodes > $nbNodesSize ) {
|
if ( $nbNodes > $nbNodesSize ) {
|
||||||
badprint
|
badprint
|
||||||
"All cluster nodes are not detected. wsrep_cluster_size less then node count in wsrep_cluster_address";
|
"All cluster nodes are not detected. wsrep_cluster_size less than node count in wsrep_cluster_address";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
goodprint "All cluster nodes detected.";
|
goodprint "All cluster nodes detected.";
|
||||||
|
@ -5761,7 +5759,7 @@ having sum(if(c.column_key in ('PRI','UNI'), 1,0)) = 0"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
badprint "Galera Notify command is not defined.";
|
badprint "Galera Notify command is not defined.";
|
||||||
push( @adjvars, "set up parameter wsrep_notify_cmd to be notify" );
|
push( @adjvars, "set up parameter wsrep_notify_cmd to be notified" );
|
||||||
}
|
}
|
||||||
if ( trim( $myvar{'wsrep_sst_method'} ) !~ "^xtrabackup.*"
|
if ( trim( $myvar{'wsrep_sst_method'} ) !~ "^xtrabackup.*"
|
||||||
and trim( $myvar{'wsrep_sst_method'} ) !~ "^mariabackup" )
|
and trim( $myvar{'wsrep_sst_method'} ) !~ "^mariabackup" )
|
||||||
|
@ -5985,7 +5983,7 @@ sub mysql_innodb {
|
||||||
);
|
);
|
||||||
if ( mysql_version_le( 5, 6, 2 ) ) {
|
if ( mysql_version_le( 5, 6, 2 ) ) {
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"For MySQL 5.6.2 and lower, Max combined innodb_log_file_size should have a ceiling of (4096MB / log files in group) - 1MB."
|
"For MySQL 5.6.2 and lower, total innodb_log_file_size should have a ceiling of (4096MB / log files in group) - 1MB."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
|
@ -6197,7 +6195,7 @@ sub mysql_databases {
|
||||||
subheaderprint "Database Metrics";
|
subheaderprint "Database Metrics";
|
||||||
unless ( mysql_version_ge( 5, 5 ) ) {
|
unless ( mysql_version_ge( 5, 5 ) ) {
|
||||||
infoprint
|
infoprint
|
||||||
"Skip Database metrics from information schema missing in this version";
|
"Skip Database metrics from information schema are missing in this version";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6428,12 +6426,12 @@ sub mysql_tables {
|
||||||
subheaderprint "Table Column Metrics";
|
subheaderprint "Table Column Metrics";
|
||||||
unless ( mysql_version_ge( 5, 5 ) ) {
|
unless ( mysql_version_ge( 5, 5 ) ) {
|
||||||
infoprint
|
infoprint
|
||||||
"Skip Database metrics from information schema missing in this version";
|
"Skip Database metrics from information schema are missing in this version";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( mysql_version_ge(8) and not mysql_version_eq(10) ) {
|
if ( mysql_version_ge(8) and not mysql_version_eq(10) ) {
|
||||||
infoprint
|
infoprint
|
||||||
"MySQL and Percona version 8 and greater have remove PROCEDURE ANALYSE feature";
|
"MySQL and Percona version 8.0 and greater have removed PROCEDURE ANALYSE feature";
|
||||||
$opt{colstat} = 0;
|
$opt{colstat} = 0;
|
||||||
infoprint "Disabling colstat parameter";
|
infoprint "Disabling colstat parameter";
|
||||||
|
|
||||||
|
@ -6536,7 +6534,7 @@ sub mysql_indexes {
|
||||||
subheaderprint "Indexes Metrics";
|
subheaderprint "Indexes Metrics";
|
||||||
unless ( mysql_version_ge( 5, 5 ) ) {
|
unless ( mysql_version_ge( 5, 5 ) ) {
|
||||||
infoprint
|
infoprint
|
||||||
"Skip Index metrics from information schema missing in this version";
|
"Skip Index metrics from information schema are missing in this version";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6663,7 +6661,7 @@ sub mysql_views() {
|
||||||
subheaderprint "Views Metrics";
|
subheaderprint "Views Metrics";
|
||||||
unless ( mysql_version_ge( 5, 5 ) ) {
|
unless ( mysql_version_ge( 5, 5 ) ) {
|
||||||
infoprint
|
infoprint
|
||||||
"Skip Index metrics from information schema missing in this version";
|
"Skip Index metrics from information schema are missing in this version";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6672,7 +6670,7 @@ sub mysql_routines() {
|
||||||
subheaderprint "Routines Metrics";
|
subheaderprint "Routines Metrics";
|
||||||
unless ( mysql_version_ge( 5, 5 ) ) {
|
unless ( mysql_version_ge( 5, 5 ) ) {
|
||||||
infoprint
|
infoprint
|
||||||
"Skip Index metrics from information schema missing in this version";
|
"Skip Index metrics from information schema are missing in this version";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6681,7 +6679,7 @@ sub mysql_triggers() {
|
||||||
subheaderprint "Triggers Metrics";
|
subheaderprint "Triggers Metrics";
|
||||||
unless ( mysql_version_ge( 5, 5 ) ) {
|
unless ( mysql_version_ge( 5, 5 ) ) {
|
||||||
infoprint
|
infoprint
|
||||||
"Skip Index metrics from information schema missing in this version";
|
"Skip Index metrics from information schema are missing in this version";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6907,7 +6905,7 @@ __END__
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
MySQLTuner 2.0.4 - MySQL High Performance Tuning Script
|
MySQLTuner2.0.5 - MySQL High Performance Tuning Script
|
||||||
|
|
||||||
=head1 IMPORTANT USAGE GUIDELINES
|
=head1 IMPORTANT USAGE GUIDELINES
|
||||||
|
|
||||||
|
@ -6972,11 +6970,10 @@ You must provide the remote server's total memory when connecting to other serve
|
||||||
--pfstat Print Performance schema
|
--pfstat Print Performance schema
|
||||||
--nopfstat Don't Print Performance schema
|
--nopfstat Don't Print Performance schema
|
||||||
--bannedports Ports banned separated by comma (,)
|
--bannedports Ports banned separated by comma (,)
|
||||||
--server-log Define specifi error_log to analyze
|
--server-log Define specific error_log to analyze
|
||||||
--maxportallowed Number of ports opened allowed on this hosts
|
--maxportallowed Number of ports opened allowed on this host
|
||||||
--buffers Print global and per-thread buffer values
|
--buffers Print global and per-thread buffer values
|
||||||
|
|
||||||
|
|
||||||
=head1 PERLDOC
|
=head1 PERLDOC
|
||||||
|
|
||||||
You can find documentation for this module with the perldoc command.
|
You can find documentation for this module with the perldoc command.
|
||||||
|
|
Loading…
Reference in a new issue