From 39006579663d1f545403fd3047ce46daf88f320e Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 13 Feb 2013 15:19:40 +0100 Subject: [PATCH 1/4] Place some more variable names between curly braces --- libraries/advisory_rules.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/advisory_rules.txt b/libraries/advisory_rules.txt index 043aa97c87..69edfb26fd 100644 --- a/libraries/advisory_rules.txt +++ b/libraries/advisory_rules.txt @@ -77,7 +77,7 @@ rule 'Slow query rate' [Questions > 0] rule 'Long query time' [!PMA_DRIZZLE] long_query_time value >= 10 - long_query_time is set to 10 seconds or more, thus only slow queries that take above 10 seconds are logged. + {long_query_time} is set to 10 seconds or more, thus only slow queries that take above 10 seconds are logged. It is suggested to set {long_query_time} to a lower value, depending on your environment. Usually a value of 1-5 seconds is suggested. long_query_time is currently set to %ds. | value @@ -262,7 +262,7 @@ rule 'Rate of reading next table row' rule 'tmp_table_size vs. max_heap_table_size' tmp_table_size - max_heap_table_size value !=0 - tmp_table_size and max_heap_table_size are not the same. + {tmp_table_size} and {max_heap_table_size} are not the same. If you have deliberately changed one of either: The server uses the lower value of either to determine the maximum size of in-memory tables. So if you wish to increase the in-memory table limit you will have to increase the other value as well. Current values are tmp_table_size: %s, max_heap_table_size: %s | implode(' ',ADVISOR_formatByteDown(tmp_table_size, 2, 2)), implode(' ',ADVISOR_formatByteDown(max_heap_table_size, 2, 2)) @@ -335,14 +335,14 @@ rule 'Percentage of used open files limit' [!PMA_DRIZZLE] Open_files / open_files_limit * 100 value > 85 The number of open files is approaching the max number of open files. You may get a "Too many open files" error. - Consider increasing {open_files_limit}, and check the error log when restarting after changing open_files_limit. + Consider increasing {open_files_limit}, and check the error log when restarting after changing {open_files_limit}. The number of opened files is at %s% of the limit. It should be below 85% | round(value,1) rule 'Rate of open files' [!PMA_DRIZZLE] Open_files / Uptime value * 60 * 60 > 5 The rate of opening files is high. - Consider increasing {open_files_limit}, and check the error log when restarting after changing open_files_limit. + Consider increasing {open_files_limit}, and check the error log when restarting after changing {open_files_limit}. Opened files rate: %s, this value should be less than 5 per hour | ADVISOR_bytime(value,2) rule 'Immediate table locks %' [Table_locks_waited + Table_locks_immediate > 0] @@ -384,7 +384,7 @@ rule 'Slow launch time' [!PMA_DRIZZLE] slow_launch_time value > 2 Slow_launch_threads is above 2s - Set slow_launch_time to 1s or 2s to correctly count threads that are slow to launch + Set {slow_launch_time} to 1s or 2s to correctly count threads that are slow to launch slow_launch_time is set to %s | value # @@ -392,8 +392,8 @@ rule 'Slow launch time' [!PMA_DRIZZLE] rule 'Percentage of used connections' [!PMA_DRIZZLE] Max_used_connections / max_connections * 100 value > 80 - The maximum amount of used connections is getting close to the value of max_connections. - Increase max_connections, or decrease wait_timeout so that connections that do not close database handlers properly get killed sooner. Make sure the code closes database handlers properly. + The maximum amount of used connections is getting close to the value of {max_connections}. + Increase {max_connections}, or decrease {wait_timeout} so that connections that do not close database handlers properly get killed sooner. Make sure the code closes database handlers properly. Max_used_connections is at %s% of max_connections, it should be below 80% | round(value,1) rule 'Percentage of aborted connections' @@ -459,7 +459,7 @@ rule 'InnoDB buffer pool size' [system_memory > 0] rule 'MyISAM concurrent inserts' [!PMA_DRIZZLE] concurrent_insert value === 0 || value === 'NEVER' - Enable concurrent_insert by setting it to 1 + Enable {concurrent_insert} by setting it to 1 Setting {concurrent_insert} to 1 reduces contention between readers and writers for a given table. See also MySQL Documentation concurrent_insert is set to 0 From 5077788029664bd30f7cf686bcb4cca3896c6c72 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 19 Feb 2013 15:16:11 +0100 Subject: [PATCH 2/4] Place some more variable names between curly braces --- libraries/advisory_rules.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/advisory_rules.txt b/libraries/advisory_rules.txt index 69edfb26fd..ac0d735f35 100644 --- a/libraries/advisory_rules.txt +++ b/libraries/advisory_rules.txt @@ -212,14 +212,14 @@ rule 'Percentage of sorts that cause temporary tables' [Sort_scan + Sort_range > Sort_merge_passes / (Sort_scan + Sort_range) * 100 value > 10 Too many sorts are causing temporary tables. - Consider increasing sort_buffer_size and/or read_rnd_buffer_size, depending on your system memory limits + Consider increasing {sort_buffer_size} and/or {read_rnd_buffer_size}, depending on your system memory limits %s% of all sorts cause temporary tables, this value should be lower than 10%. | round(value,1) rule 'Rate of sorts that cause temporary tables' Sort_merge_passes / Uptime value * 60 * 60 > 1 Too many sorts are causing temporary tables. - Consider increasing sort_buffer_size and/or read_rnd_buffer_size, depending on your system memory limits + Consider increasing {sort_buffer_size} and/or {read_rnd_buffer_size}, depending on your system memory limits Temporary tables average: %s, this value should be less than 1 per hour. | ADVISOR_bytime(value,2) rule 'Sort rows' From 98dbe20cb4eccfbe73dff538ddbc19d03150b9ac Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 19 Feb 2013 15:20:56 +0100 Subject: [PATCH 3/4] Update advisory rule: apply 'not be set much higher than 256' from the text to the rule --- libraries/advisory_rules.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/advisory_rules.txt b/libraries/advisory_rules.txt index ac0d735f35..09bd60fba6 100644 --- a/libraries/advisory_rules.txt +++ b/libraries/advisory_rules.txt @@ -435,7 +435,7 @@ rule 'Is InnoDB disabled?' [!PMA_DRIZZLE && PMA_MYSQL_INT_VERSION < 50600] rule 'InnoDB log size' [innodb_buffer_pool_size > 0] innodb_log_file_size / innodb_buffer_pool_size * 100 - value < 20 + value < 20 && innodb_log_file_size / (1024 * 1024) < 256 The InnoDB log file size is not an appropriate size, in relation to the InnoDB buffer pool. Especially on a system with a lot of writes to InnoDB tables you should set {innodb_log_file_size} to 25% of {innodb_buffer_pool_size}. However the bigger this value, the longer the recovery time will be when database crashes, so this value should not be set much higher than 256 MiB. Please note however that you cannot simply change the value of this variable. You need to shutdown the server, remove the InnoDB log files, set the new value in my.cnf, start the server, then check the error logs if everything went fine. See also this blog entry Your InnoDB log size is at %s% in relation to the InnoDB buffer pool size, it should not be below 20% | round(value,1) From 4c153603b5e53fd3a7b02df3e54430acc2a91fc5 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 19 Feb 2013 15:24:50 +0100 Subject: [PATCH 4/4] Update advisory rule: match check to the value of 256 in the InnoDB log size rule. --- libraries/advisory_rules.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/advisory_rules.txt b/libraries/advisory_rules.txt index 09bd60fba6..3ffa1d9faf 100644 --- a/libraries/advisory_rules.txt +++ b/libraries/advisory_rules.txt @@ -442,7 +442,7 @@ rule 'InnoDB log size' [innodb_buffer_pool_size > 0] rule 'Max InnoDB log size' [innodb_buffer_pool_size > 0 && innodb_log_file_size / innodb_buffer_pool_size * 100 < 30] innodb_log_file_size / (1024 * 1024) - value >= 128 + value > 256 The InnoDB log file size is inadequately large. It is usually sufficient to set {innodb_log_file_size} to 25% of the size of {innodb_buffer_pool_size}. A very big {innodb_log_file_size} slows down the recovery time after a database crash considerably. See also this Article. You need to shutdown the server, remove the InnoDB log files, set the new value in my.cnf, start the server, then check the error logs if everything went fine. See also this blog entry Your absolute InnoDB log size is %s MiB | round(value,1)