Portal Home > Knowledgebase > Articles Database > Check my mysql config - optimise or upgrade?


Check my mysql config - optimise or upgrade?




Posted by benseb, 03-17-2008, 02:51 PM
Hi we've currently got a 2 server setup, apache+mysql Mysql server is a Xeon 3.2Ghz with 2Gb ram, scsi 73gb raid1 disks Server has been running a while, steadily increasing in traffic. whilst 90% of the time it's running ok (load around 0.5 - 1.0, cpu around 25-50% busy mainly mysql, disk i/o around 3% busy) during heavy traffic times everything slows right down At the moment the mysql box is only running mysql so we've allocated about 1.5gb out of the 2gb to mysql. At present, when we get busy the apache server is queing up requests as it waits for the mysql server. Query log shows most queries are <1sec, any other's are being optimised but due to the nature of our website there are a few pesky queries (only occasionally being slow though). question is, can this config be tuned any more or is it time for an upgrade - mainly ram to add more innodb buffers? Here's the result of tuning-primer.sh Server is mainly Innodb due to previous row-locking issues.

Posted by dysk, 03-17-2008, 10:56 PM
Doesn't look too far from ideal. Two things: More memory, and also look at what pages you can cache at the web server. In most web apps people generate way more mysql queries than they really need to.

Posted by benseb, 03-18-2008, 07:37 AM
We're already using memcached to cache a lot of page level elements, as well as queries in places which does help a lot. Going to have a look at tuning a few queries but as you say I think memory will help a lot here.

Posted by applicurearun, 03-18-2008, 08:55 AM
If I have the issue I will go for optimization. If you don’t know how to, Let me know.

Posted by RBBOT, 03-18-2008, 04:19 PM
The primier doesn't tell you much about innodb. What does mysqlreport output? http://www.hackmysql.com/mysqlreport EDIT: Also how many processor cores do you have and which version of mysql.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read