User Tools

Site Tools


tuneup_guide

Mysql Has tuner

If you see your mysql is slowing down or not performing good. You need to run following command first.

mysqlcheck -u root --auto-repair --check --optimize --all-databases -p

Third Party tuner

Still feel slowness. see below.
First,
You need to understand what tuner is all about and how to tuneup.
for that purpose you can use one descriptive tuner you can grab it from following link.
you can use fetch instead of wget.

wget http://bazaar.launchpad.net/%7Ematt-day32/mysql-tuning-primer/trunk/download/head%3A/tuningprimer.sh-20080620031244-qhr6av9fsnf6vswg-1/tuning-primer.sh

Now run the script and read every things it print on screen step by step.
There is nothing anybody can do if you don't judge.

After getting idea what is the tuner and how it works.
get following tuner which is more frequently updated than above one.

wget http://mysqltuner.com/mysqltuner.pl

Now, most important part
If you see any tuner saying you are assigning more ram, than reduce the ram by adjusting variable in my.cnf.
why it is important, because more ram usage will cause swap during the request on server.
when server start using swap it will make server d** slow.

Create Indexes for query if it not exists on busy table

Creating index will help you on sorting and searches which reduce time highly.
you can specify many parameter in index like - DESC … etc.

CREATE INDEX id_google ON google_searches(hits DESC);

i have seen get load reduced on whole server in 2.x after applying just index.

Install memcached if your Application support memcache

Installing memcached help on some similar query to the mysql and reduce load.

tuneup_guide.txt · Last modified: 2010/12/01 02:36 by k2patel