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?

  • 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. Sep 1 '09 at 21:39

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.


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.


you can try mysql tuner from racker hacker.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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