Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

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

share|improve this answer
    
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. –  Daniel Fischer Feb 14 '10 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 '10 at 22:05
add comment

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.

share|improve this answer
    
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. –  Daniel Fischer Feb 14 '10 at 22:21
    
6gigs, 512mb.. they're very similar.. really :) –  Vid Luther Feb 16 '10 at 11:55
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.