1

Take a look at this:

http://img.skitch.com/20100214-pf95t9dpywxqgne7wrk65nnhq5.png

After taking a look at that would you be able to say I need to optimize or am I doing ok?

3 Answers 3

1

i see that you have 15 % io wait - from my experience this is caused by the mysql

io wait means, that the kernel is waiting for the hard disks - and this is really slow

so if you use innodb in mysql you should increase the buffer pool value in my.cnf

a bigger buffer pool will lower the io wait.

additionally you should try to kill some processes to free up some memory or upgrade it

2
  • Hmm is that the %wa? Right now it's averaging between 0.5 and 5%. I'm not sure how to optimize against that. I have 512MB and my key_buffer is 16M. Feb 14, 2010 at 22:23
  • are you using innodb or only myisam? you can check that by executing "show table status;" if most of your tables or the biggest one are innodb than you should change the innodb buffer pool variable and increase it i have no experience with myisam yet - the referential integrity features of innodb are just too great ;) but if you use innodb i think i can help :)
    – beck
    Feb 15, 2010 at 22:05
0

Optimize is not the word you're looking for. You seem to have 6 gigs of ram, and your mysql process is taking up 37% cpu.. is this a trend that's going up or down? or is this just a one off thing?

to figure out if it's apache or mysql that needs the "optimization" you need to find out what's causing mysql to take up so much cpu. run "show processlist; " in your mysql list.. that'll give you an idea of what mysqld is doing, if it's just got one process that's taking forever.. you need to optimize that one query.. ..

this question needs more details to answer properly.

2
  • I think it was a fluke at that very second that it was taking up that much memory. It's not anymore. Typically every second on top I'll see mysql take like 3% and apache take up 5%. I don't have 6 gigs of ram. I have 512MB. Feb 14, 2010 at 22:21
  • 6gigs, 512mb.. they're very similar.. really :)
    – Vid Luther
    Feb 16, 2010 at 11:55
0

It's difficult, i no impossible know what and how to optimize apache & my.

About my, there is a script here http://www.day32.com/MySQL/ that based on "show status" and "show variables", help tune some variables.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .