Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

This question already has an answer here:

Especially the one that defines how MySQL is gonna use server's CPU. I'd like to boost performance. Also, what are other ways to boost MySQL performance? (Maybe some code optimization hints?) Anyway. Any information will be useful. Thanks in advance.

share|improve this question

migrated from stackoverflow.com Nov 22 '12 at 4:27

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

marked as duplicate by RolandoMySQLDBA, Mark Storey-Smith, Marian, dezso, Aaron Bertrand Jun 20 '13 at 13:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

There's no way to magically "boost performance", but there are ways to better tune your MySQL to fit your application needs. Not knowing your application requirements means this is hard to answer in general terms.

If you're using InnoDB, and you really should be, there are several configuration variables relating to that which should be adjusted.

The primary boost comes from the generic buffer pool:

[mysqld]
innodb_buffer_pool_size=2048M

This should be set somewhere around 40% of system memory for a dedicated database server in order to leave sufficient system memory over for OS filesystem caching and other processes. You can increase this factor on systems with more memory. For instance, on a 12GB system you might allocate 8GB to this pool.

As always, read the documentation on your chosen engine very carefully and benchmark your application against any settings you try. There is no one-size-fits-all solution here. If you're using SSD you would tune quite differently from regular disks, and even then differently for specific RAID configurations.

share|improve this answer

Use InnoDB tables and configure it properly. This site is a great resource:

http://www.mysqlperformanceblog.com/

share|improve this answer