From c29168ccaff2b9f83fca47b72678bb72e68b8c5b Mon Sep 17 00:00:00 2001 From: Jean-Marie Renouard Date: Fri, 9 Feb 2024 00:12:34 +0100 Subject: [PATCH] Adding nondedicated option usage --- mysqltuner.pl | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index 702e19f6e..c7caf797c 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -3366,17 +3366,23 @@ sub mysql_stats { . " ($mycalc{'pct_max_physical_memory'}% of installed RAM)"; } + if ( $physical_memory < - ( $mycalc{'max_peak_memory'} + get_other_process_memory() ) ) + ( $mycalc{'max_peak_memory'} + get_other_process_memory() ) ) { + if ( $opt{nondedicated}) { + infoprint ("No warning with --nondedicated option") + infoprint + "Overall possible memory usage with other process exceeded memory"; + } else { badprint - "Overall possible memory usage with other process exceeded memory"; + "Overall possible memory usage with other process exceeded memory"; push( @generalrec, - "Dedicate this server to your database for highest performance." ); - } - else { - goodprint -"Overall possible memory usage with other process is compatible with memory available"; + "Dedicate this server to your database for highest performance." ); + } + } else { + goodprint + "Overall possible memory usage with other process is compatible with memory available"; } # Slow queries