Here are some quick notes on dealing with an underperforming server.
First, use grab yourself a copy of MySQLTuner. This is a handy little Perl script that will give you great recommendations on how to change /etc/my.cnf, the preferences file for MySQL that allows you to play with a variety of memory settings.
To do this navigate to usr/bin, download the script from get, and then set the permissions:
cd /usr/binwget mysqltuner.plchmod 755 $_
After you’ve done this, you can run the script by using the file itself as the command, so just type
mysqltuner.pl if you’re in the /usr/bin file or run
/usr/bin/mysqltuner.pl to run from the base directory.
From there, I recommend making the edit the script recommends, and then watching the server’s performance using top—simply type
top into the command line anywhere you like—or use whatever server performance monitoring may be included with your host. If you see usage still at levels you don’t like, run the script again. The longer MySQL is running, the more that mysqltuner.pl will tell you.
Remember, every time you edit my.cnf, make a copy first:
cp my.cnf my.bkup.110711a
Also, remember to restart MySQL with each save: