From 66107c8dff29bc4fe20866f1badeacad6f02a202 Mon Sep 17 00:00:00 2001 From: Tyron Madlener Date: Thu, 11 Aug 2011 12:45:17 +0300 Subject: [PATCH] Added a rule and notes about memcached as advised by Sheeri --- libraries/advisory_rules.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libraries/advisory_rules.txt b/libraries/advisory_rules.txt index dbfa6f0fe4..c440c46f59 100644 --- a/libraries/advisory_rules.txt +++ b/libraries/advisory_rules.txt @@ -124,9 +124,16 @@ rule 'Query cache disabled' query_cache_size value == 0 || query_cache_type == 'OFF' || query_cache_type == '0' The query cache is not enabled. - The query cache is known to greatly improve performance if configured correctly. Enable it by setting {query_cache_size} to a 2 digit MiB value and setting {query_cache_type} to 'ON' + The query cache is known to greatly improve performance if configured correctly. Enable it by setting {query_cache_size} to a 2 digit MiB value and setting {query_cache_type} to 'ON'. Note: If you are using memcached, ignore this recommendation. query_cache_size is set to 0 or query_cache_type is set to 'OFF' +rule 'memcached usage' [!fired('Query cache disabled')] + Questions / Uptime + value > 100 + Suboptimal caching method. + You are using the MySQL Query cache with a fairly high traffic database. It might be worth considering to use memcached instead of the MySQL Query cache, especially if you have multiple slaves. + The query cache is enabled and the server receives %d queries per second. This rule fires if there is more than 100 queries per second. | round(value,1) + rule 'Query cache efficiency (%)' [Com_select + Qcache_hits > 0 && !fired('Query cache disabled')] Qcache_hits / (Com_select + Qcache_hits) * 100 value < 20