Skip to content

Commit 5aa880a

Browse files
committed
Wrong recommendation "thread_pool_size between 16 and 36 for InnoDB usage" for Percona Server #551
1 parent 85d5015 commit 5aa880a

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

mysqltuner.pl

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env perl
2-
# mysqltuner.pl - Version 1.7.24
2+
# mysqltuner.pl - Version 1.7.25
33
# High Performance MySQL Tuning Script
44
# Copyright (C) 2006-2021 Major Hayden - major@mhtx.net
55
#
@@ -56,7 +56,7 @@ package main;
5656
#use Env;
5757

5858
# Set up a few variables for use in the script
59-
my $tunerversion = "1.7.24";
59+
my $tunerversion = "1.7.25";
6060
my ( @adjvars, @generalrec );
6161

6262
# Set defaults
@@ -3554,7 +3554,18 @@ sub mariadb_threadpool {
35543554
infoprint "ThreadPool stat is enabled.";
35553555
infoprint "Thread Pool Size: " . $myvar{'thread_pool_size'} . " thread(s).";
35563556

3557-
if ( $myvar{'version'} =~ /mariadb|percona/i ) {
3557+
if ( $myvar{'version'} =~ /percona/i ) {
3558+
my $np=cpu_cores;
3559+
if ($myvar{'thread_pool_size'} >= $np and $myvar{'thread_pool_size'}< ($np *1.5)) {
3560+
goodprint "thread_pool_size for Percona betwwen 1 and 1.5 times nimber of CPUs (".$np. " and ".($np *1.5).")";
3561+
} else {
3562+
badprint "thread_pool_size for Percona betwwen 1 and 1.5 times nimber of CPUs (".$np. " and ".($np *1.5).")";
3563+
push( @adjvars, "thread_pool_size between ".$np . " and ".($np *1.5)." for InnoDB usage" );
3564+
}
3565+
return;
3566+
}
3567+
3568+
if ( $myvar{'version'} =~ /mariadb/i ) {
35583569
infoprint "Using default value is good enough for your version ("
35593570
. $myvar{'version'} . ")";
35603571
return;
@@ -6487,7 +6498,7 @@ sub which {
64876498
64886499
=head1 NAME
64896500
6490-
MySQLTuner 1.7.24 - MySQL High Performance Tuning Script
6501+
MySQLTuner 1.7.25 - MySQL High Performance Tuning Script
64916502
64926503
=head1 IMPORTANT USAGE GUIDELINES
64936504

0 commit comments

Comments
 (0)