[Snippet] Tuning / Tweaking MySQL

There are a couple of good scripts out there that will help you to tune your mysql usage for better perfomance.  I’ve used both of these, and they are very intuative.  Personally, I prefer the latter, however, I still use both for tweaking.

tuning-primer

OK, so not the most original blog post ever, but useful all the same.
“This script takes information from “SHOW STATUS LIKE…” and “SHOW VARIABLES LIKE…”
to produce sane recomendations for tuning server variables.”

Installation:

wget http://day32.com/MySQL/tuning-primer.sh

chmod 755 tuning-primer.sh

To run the script:

./tuning-primer.sh

TABLE CACHE
Current table_cache value = 64 tables
You have a total of 791 tables
You have 64 open tables.
Current table_cache hit rate is 0%
, while 100% of your table cache is in use
You should probably increase your table_cache

Author: Kieran Barnes

Kieran is a PHP developer with 15 years commercial experience. Specialist in WordPress, CakePHP, CubeCart and all things PHP.

Leave a Reply

Your email address will not be published. Required fields are marked *