Optimizing MySQL: Hardware and the Mysqld Variables
December 17, 2001
Part 1 - Compiling MySQL
Like a grand prix driver starting at the back of the track, if you don't do things well from the beginning, and prepare hard for the race, it doesn't matter how well you do once the race has started. You're at the back and are never going to win. So, with MySQL, it's extremely important to start off on the right foot, and that means compiling MySQL properly. The specific options you use depends on your setup of course, but here are some pointers to get you started.
Here's a sample configuration I've seen work well:
Note that if you're using a Pentium processor, using pgcc seems to give better results than gcc. There have been problems with pgcc and AMD processors though. For a list of complete gcc options, run:
Taking the time to compile as well as possible for your setup is worth it. After all, you'll probably only do this once, but it can hamstring your server for life if you get it wrong (it's not fun recompiling after your server is setup and running!)