You are here

my.cnf

my.cnf Optimization for Fun and Savings

A well-tuned my.cnf file can be the difference between a nicely purring database server and one that is crawling like frozen molasses. I present an annotated version of my own my.cnf file here for those interested in specific tuning suggestions for that file.

Do not blindly copy this code block into your my.cnf file - you need to set the path names appropriately for your needs, and in many cases, the default is just fine. On the other hand, I have divided my I/O load between two disk arrays, so I've changed the defaults some.

Optimizing a Server for MySQL

This article is for database server administrators or those who plan on being one soon, who want to have an efficient setup for serving database requests. This article primarily focuses on disk arrangement, partitioning, mounting, and making HugePages available to MySQL - in essence, setting up the server to run MySQL efficiently.

my.cnf configuration will be discussed in the next two articles, which will be more valuable to a wider class of users. VPS users should mostly focus on the tmpfs portion of this article, below, as they can safely make use of that. Some VPSes can also use HugePages, so if you can take advantage of them, do so.