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

I have a server with a LOT of CPU power.

My CPU idle is ~95% and io wait 0.2%. How can I utilize more CPU to get a faster overall DB? Should I switch a handful of my MyISAM tables into InnoDB?

share|improve this question

migrated from stackoverflow.com Sep 1 '09 at 21:03

This question came from our site for professional and enthusiast programmers.

    
CPU isn't as important as disk contention. Disk contention is having the database on a [preferably RAID array] drive other than the one the OS is on. Log files should also be on their own drive. RAM is the next concern after that. –  rexem Sep 1 '09 at 21:02
2  
After carefully reading your detailed question, I would say: You should optimize. –  soulmerge Sep 1 '09 at 21:02
1  
OK, so your sever is having an easy time of it. Is that a problem? You tell us absolutely nothing about how its performing or what problem you think you have. You also haven't said what OS, what version of MySQL, what you are using it for or anything else that might help in eliciting an answer. –  John Gardeniers Sep 1 '09 at 21:39

3 Answers 3

up vote 2 down vote accepted

I suspect you're hitting table locks, since your CPU and your iowait is so low.

InnoDB may help, but ultimately you're best served by fixing the application running on top.

You should get stats on how many locks have been requested, how many were immediately granted, etc- that should confirm if this is indeed the issue.

Another way to check is to regularly pull the processlist from mysql. You'll quickly see a pattern (eg., all queries waiting, use the "foo" table). The active query blocking the others is a good place to start optimising the software; that table is a good one to consider converting to InnoDB.

share|improve this answer

If your database is small enough then increase the size of your caches so the entire database can be stored in memory. Assuming that your queries are all optimized and you have indexes in the right place, you can't make your database much faster than that.

Disk access isn't really a CPU intensive task. The CPU says Go and waits for the answer. The I/O controller and the disk do all the work. Don't expect disk access to red line your CPU.

share|improve this answer

you can try mysql tuner from racker hacker.

http://blog.mysqltuner.com/download/

share|improve this answer

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.