Swimminginthought

A place for all things technical and my mind..

Menu
  • About Me / Hire Me
Menu

Mysql Tuning for the Novice to Expert

Posted on April 30, 2012 by Percy Kwong

Most people just install Mysql, use the defaults and call it a day.  Unfortunately, for a select group of people with high traffic, this can cause problems.  It all falls into the issue of performance.

This can effect your website, applications, etc.  I’ve seen this happen on numerous occasions, because people don’t bother to think about tuning their servers.  Installing a server and just getting it working is not good enough.

In Mysql, the issue is many options are by default turned off.  Options you should have on for redundancy of data and protection as well as increased performance.

For example, binary logging, a critical feature of any database should always be on.  In the case of a database crash (machine goes down), you can replay the logs and restore your database to point-in-time redundancy.  If you don’t think that’s important, then your data must not be worth much to you.

Table locking wait states is another issue.  Your server should never have to wait to lock a table, nor should it have to hit the database much if caching is tuned properly.  The solution most technologists use is to simply throw more hardware at a problem.  That’s not the solution.  The proper solution is to tune the database and watch an exponential increase in performance.

Sometimes, there are things that just need to be fixed that tuning can’t fix (like bad SQL).

Tuning can get you by until you get the problem fixed, but it’s something you’ll need to do.  Don’t just assume it’ll all just work.  It never does.

I’ve written a guide on how to do this all for even a novice.  You’ll see an increase in performance by simply implementing and tuning your Mysql server.  That’s a guarantee.

Specify Your Donation: (Min. $5.00)
  [wp_eStore_buy_now:product_id:9:end]

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Kubernetes install gotcha on CentOS-7.x
  • Infrastructure as Code using AWS Cloudformation
  • Does SSL matter? It does and it’s not just web encryption.
  • Apache can’t serve the .well-known directory
  • Cloudy with a chance of Meatballs
  • Resurrection of the Blog
  • Encryption type Matters with Deep Packet Inspection – solved
  • Completely off topic.. Just a personal note.
©2025 Swimminginthought | Built using WordPress and Responsive Blogily theme by Superb