mirror of
https://github.com/major/MySQLTuner-perl.git
synced 2024-09-21 07:47:08 +00:00
improve "$arch" variable usage
- handle the (default!) undefined case; - really treat it as a number (cause that's the way it is defined everywhere in "check_architecture", and it is compared to a number too); - (try to) avoid extra ops by reordering the operations.
This commit is contained in:
parent
d9eef7d752
commit
8347fafe4e
@ -763,7 +763,7 @@ sub mysql_stats {
|
||||
|
||||
# Memory usage
|
||||
infoprint "Total buffers: ".hr_bytes($mycalc{'server_buffers'})." global + ".hr_bytes($mycalc{'per_thread_buffers'})." per thread ($myvar{'max_connections'} max threads)\n";
|
||||
if ($mycalc{'total_possible_used_memory'} > 2*1024*1024*1024 && $arch eq 32) {
|
||||
if ($arch && $arch == 32 && $mycalc{'total_possible_used_memory'} > 2*1024*1024*1024) {
|
||||
badprint "Allocating > 2GB RAM on 32-bit systems can cause system instability\n";
|
||||
badprint "Maximum possible memory usage: ".hr_bytes($mycalc{'total_possible_used_memory'})." ($mycalc{'pct_physical_memory'}% of installed RAM)\n";
|
||||
} elsif ($mycalc{'pct_physical_memory'} > 85) {
|
||||
|
Loading…
Reference in New Issue
Block a user