Skip to content

Commit e5f3736

Browse files
authored
Merge pull request major#343 from pes-soft/innodb-logsize-suggestion-doc
Add recommendation for innodb log file changes and some extra information
2 parents 17fddf2 + b5d1650 commit e5f3736

File tree

2 files changed

+33
-29
lines changed

2 files changed

+33
-29
lines changed

INTERNALS.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
## MySQLTuner system checks
7373
* 32-bit w/>2GB RAM check
7474
* Check number of opened ports (warning if more than 9 ports opened)
75-
* Check 80, 8080, 443 and 8443 ports if warning are raised if there are opened
75+
* Check 80, 8080, 443 and 8443 ports if warning are raised if there are opened
7676
* Check if some banned ports are not opened (option --bannedports separated by comma)
7777
* Check if non kernel and user process except mysqld are not using more than 15% of total physical memory)
7878
* Check vm.swapiness
@@ -103,7 +103,7 @@
103103
* Users w/o host restriction
104104
* Weak password check (possibly using cracklib later?)
105105
* Using basic_passwords.txt as password database
106-
* Password list checks can be avoid (option: --skippassword)
106+
* Password list checks can be avoid (option: --skippassword)
107107

108108
## MySQLTuner CVE vulnerabilities detection
109109

@@ -131,7 +131,7 @@
131131
* Per index information
132132
* Index Cardinality
133133
* Index Selectivity
134-
* Misc information about index definition
134+
* Misc information about index definition
135135
* Misc information about index size
136136

137137
## MySQLTuner Connections information
@@ -180,7 +180,7 @@
180180
* Query Cache DISABLED, ALL REQUEST or ON DEMAND
181181
* Query Cache Size
182182
* Query cache hit ratio (cache efficienty)
183-
183+
184184
## MySQLTuner memory checks
185185

186186
* Get total RAM/swap
@@ -209,8 +209,10 @@
209209
* MySQL needs 1 instanes per 1Go of Buffer Pool
210210
* innodb_buffer_pool instances = round(innodb_buffer_pool_size / 1Go)
211211
* innodb_buffer_pool instances must be equals or lower than 64
212-
* InnoDB Buffer Pool Usage
212+
* InnoDB Buffer Pool Usage
213213
* If more than 20% of InnoDB buffer pool is not used, MySQLTuner raise an alert.
214+
* InnoDB Buffer Pool Log Size
215+
* InnoDB total log file size should be 25% of innodb_buffer_pool_size
214216
* InnoDB Read effiency
215217
* Ratio of read without locks
216218
* InnoDB Write effiency
@@ -225,7 +227,7 @@
225227
* Is Aria indexes size is greater than page cache size ?
226228
* Page cache read hit ratio (>95%)
227229
* Page cache write hit ratio (>95%)
228-
230+
229231

230232
## MySQLTuner MYISAM information
231233

@@ -264,13 +266,13 @@
264266

265267
## MySQLTuner TokuDB information
266268

267-
* tokudb_cache_size
268-
* tokudb_directio
269+
* tokudb_cache_size
270+
* tokudb_directio
269271
* tokudb_empty_scan
270272
* tokudb_read_block_size
271273
* tokudb_commit_sync
272274
* tokudb_checkpointing_period
273-
* tokudb_block_size
275+
* tokudb_block_size
274276
* tokudb_cleaner_iterations
275277
* tokudb_fanout
276278

@@ -289,7 +291,7 @@
289291
## MySQLTuner RocksDb information
290292

291293
* Nothing for the moment
292-
294+
293295
## MySQLTuner Thread pool information
294296

295297
* thread_pool_size between 16 to 36 for Innodb usage
@@ -352,9 +354,9 @@
352354
* Event per wait total latency
353355
* Event per wait read latency
354356
* Event per wait write latency
355-
* TOP 15 most read indexes
357+
* TOP 15 most read indexes
356358
* TOP 15 most modified indexes
357-
* TOP 15 high select latency index
359+
* TOP 15 high select latency index
358360
* TOP 15 high insert latency index
359361
* TOP 15 high update latency index
360362
* TOP 15 high delete latency index
@@ -383,7 +385,7 @@
383385
* TOP 15 merge queries with sort
384386
* TOP 15 average sort merges queries with sort
385387
* TOP 15 scans queries with sort
386-
* TOP 15 range queries with sort
388+
* TOP 15 range queries with sort
387389
* Top 20 queries with temp table
388390
* Last 50 queries with temp table
389391
* TOP 15 total latency queries with temp table
@@ -393,4 +395,4 @@
393395
* TOP 15 class events by total latency
394396
* TOP 30 events by total latency
395397
* TOP 15 class events by max latency
396-
* TOP 30 events by max latency
398+
* TOP 30 events by max latency

mysqltuner.pl

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,7 +2645,7 @@ sub mysql_stats {
26452645

26462646
if ( defined $myvar{'query_cache_type'} ) {
26472647
infoprint "Query Cache Buffers";
2648-
infoprint " +-- Query Cache: "
2648+
infoprint " +-- Query Cache: "
26492649
. $myvar{'query_cache_type'} . " - "
26502650
. (
26512651
$myvar{'query_cache_type'} eq 0 |
@@ -5382,7 +5382,7 @@ sub mysql_innodb {
53825382
. $myvar{'innodb_thread_concurrency'};
53835383
}
53845384

5385-
# InnoDB Buffer Pull Size
5385+
# InnoDB Buffer Pool Size
53865386
if ( $myvar{'innodb_file_per_table'} eq "ON" ) {
53875387
goodprint "InnoDB File per table is activated";
53885388
}
@@ -5391,7 +5391,7 @@ sub mysql_innodb {
53915391
push( @adjvars, "innodb_file_per_table=ON" );
53925392
}
53935393

5394-
# InnoDB Buffer Pull Size
5394+
# InnoDB Buffer Pool Size
53955395
if ( $myvar{'innodb_buffer_pool_size'} > $enginestats{'InnoDB'} ) {
53965396
goodprint "InnoDB buffer pool / data size: "
53975397
. hr_bytes( $myvar{'innodb_buffer_pool_size'} ) . "/"
@@ -5416,12 +5416,15 @@ sub mysql_innodb {
54165416
. hr_bytes( $myvar{'innodb_buffer_pool_size'} )
54175417
. " should be equal 25%";
54185418
push( @adjvars,
5419-
"innodb_log_file_size should be (="
5420-
. hr_bytes_rnd(
5421-
$myvar{'innodb_buffer_pool_size'} /
5422-
$myvar{'innodb_log_files_in_group'} / 4
5423-
)
5424-
. ") if possible, so InnoDB total log files size equals to 25% of buffer pool size."
5419+
"innodb_log_file_size should be (="
5420+
. hr_bytes_rnd(
5421+
$myvar{'innodb_buffer_pool_size'} /
5422+
$myvar{'innodb_log_files_in_group'} / 4
5423+
)
5424+
. ") if possible, so InnoDB total log files size equals to 25% of buffer pool size."
5425+
);
5426+
push( @generalrec,
5427+
"Read this before changing innodb_log_file_size and/or innodb_log_files_in_group: http://bit.ly/2wgkDvS"
54255428
);
54265429
}
54275430
else {
@@ -5432,7 +5435,7 @@ sub mysql_innodb {
54325435
. " should be equal 25%";
54335436
}
54345437

5435-
# InnoDB Buffer Pull Instances (MySQL 5.6.6+)
5438+
# InnoDB Buffer Pool Instances (MySQL 5.6.6+)
54365439
if ( defined( $myvar{'innodb_buffer_pool_instances'} ) ) {
54375440

54385441
# Bad Value if > 64
@@ -5442,12 +5445,12 @@ sub mysql_innodb {
54425445
push( @adjvars, "innodb_buffer_pool_instances (<= 64)" );
54435446
}
54445447

5445-
# InnoDB Buffer Pull Size > 1Go
5448+
# InnoDB Buffer Pool Size > 1Go
54465449
if ( $myvar{'innodb_buffer_pool_size'} > 1024 * 1024 * 1024 ) {
54475450

5448-
# InnoDB Buffer Pull Size / 1Go = InnoDB Buffer Pull Instances limited to 64 max.
5451+
# InnoDB Buffer Pool Size / 1Go = InnoDB Buffer Pool Instances limited to 64 max.
54495452

5450-
# InnoDB Buffer Pull Size > 64Go
5453+
# InnoDB Buffer Pool Size > 64Go
54515454
my $max_innodb_buffer_pool_instances =
54525455
int( $myvar{'innodb_buffer_pool_size'} / ( 1024 * 1024 * 1024 ) );
54535456
$max_innodb_buffer_pool_instances = 64
@@ -5468,7 +5471,7 @@ sub mysql_innodb {
54685471
. $myvar{'innodb_buffer_pool_instances'} . "";
54695472
}
54705473

5471-
# InnoDB Buffer Pull Size < 1Go
5474+
# InnoDB Buffer Pool Size < 1Go
54725475
}
54735476
else {
54745477
if ( $myvar{'innodb_buffer_pool_instances'} != 1 ) {
@@ -6381,4 +6384,3 @@ =head1 COPYRIGHT AND LICENSE
63816384
# cperl-indent-level: 8
63826385
# perl-indent-level: 8
63836386
# End:
6384-

0 commit comments

Comments
 (0)