From 67b91966e0dab5b16882d1f84333947278ac930a Mon Sep 17 00:00:00 2001 From: Jean-Marie RENOUARD Date: Mon, 20 Jul 2015 09:57:04 +0200 Subject: [PATCH] Issue #96 --- mysqltuner.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mysqltuner.pl b/mysqltuner.pl index f5466f9..4d15d2c 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -928,7 +928,12 @@ sub calculations { $mycalc{'server_buffers'} += (defined $myvar{'query_cache_size'}) ? $myvar{'query_cache_size'} : 0 ; # Global memory + # Max used memory is memory used by MySQL based on Max_used_connections + # This is the max memory used theorically calculated with the max concurrent connection number reached by mysql $mycalc{'max_used_memory'} = $mycalc{'server_buffers'} + $mycalc{"max_total_per_thread_buffers"}; + + # Total possible memory is memory needed by MySQL based on max_connections + # This is the max memory MySQL can theorically used if all connections allowed has opened by mysql $mycalc{'total_possible_used_memory'} = $mycalc{'server_buffers'} + $mycalc{'total_per_thread_buffers'}; $mycalc{'pct_physical_memory'} = int(($mycalc{'total_possible_used_memory'} * 100) / $physical_memory);