Tweak MySQL my.cnf using Major Hayden’s MySQL Tuner Script. Major Hayden is Chief Security Architect and a Linux engineer at Rackspace. In the previous guide on Optimizing MySQL Database Performance, we tweaked manually and added the last chunk of text :
DO NOT try to optimize MySQL in Rackspace Deployment. They are fully optimized. There is a Perl script for MySQL Tuning, do not use it for PVHVM unless you are a database Guru.
For managed level at Rackspace, these high grade peoples are behind…To Do List For Unmanaged Rackspace Cloud Server Owners definitely works but probably if a group of such people are managing your servers, it becomes headache less matter.
Tweak MySQL my.cnf using MySQL Tuner Script
If pl is a domain name and it is Perl script, what is the problem to link raw Github to perform a domain hack :
---
1 | http://MySQLTuner.pl |
The GitHub repository and GitHub Page respectively are here :
1 2 | https://github.com/major/MySQLTuner-perl http://mysqltuner.com/ |
You will only run this one if you are using one server configuration or a single separate MySQL server. An example output :
1 2 3 4 5 | [root@server-static]# ./mysqltuner.pl >> MySQLTuner 1.1.1 - Major Hayden >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering |
Actually this a longer output, we are showing a spot with error :
1 2 3 4 | -------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.0.88-community-log [OK] Operating on 64-bit architecture with less than 2GB RAM |
That [!!] part should be fixed.
Most important is the recommendation part :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance Reduce or eliminate persistent connections to reduce connection usage When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries without LIMIT clauses Increase table_cache gradually to avoid file descriptor limits Variables to adjust: max_connections (> 100) wait_timeout (< 15) interactive_timeout (< 100) query_cache_size (> 128M) tmp_table_size (> 128M) max_heap_table_size (> 128M) table_cache (> 2048) |
So, basically you have to follow our described method in the older guide after running this quite helpful script – Optimizing MySQL Database Performance for applying the recommended settings.
Tagged With 9VAW , BLQ3 , mysql server my cnf tweak , V395