views:

269

answers:

4

I hope to achieve improved performance over the stock builds by creating a custom build of MySQL, tailored for 64-bit CentOS and InnoDB.

However, I have no idea where to begin here. Would someone please be so kind as to provide me with a list of the steps I must take in order to accomplish this task?

+1  A: 

./configure && make && make install

shylent
+1  A: 

things to do: re-evaluate your requirements!

Honestly, compiling your own DBMS is very macho and all, but for a production environment this will turn into a nightmare!

lexu
WHAT THE BLOODY? GENTOO DOES THIS FOR EVERYTHING!
Joshua
lexu
+1  A: 

Don't do it. A database with high performance is no use if it doesn't work correctly, the MySQL / Sun builds are WELL TESTED.

Your build is not.

I can't imagine you getting a significant amount more performance than Sun anyway. They compile the code correctly for your platform; the subject the binaries to a barrage of auto-tests and smoke tests, as well as trying running it with real applications BEFORE they release them.

You will probably get more performance increases from IMPROVING YOUR OWN CODE rather than trying to improve on Sun's builds. And it will carry less risk, because you won't be risking major regressions in database behaviour.

If you have performance problems, your time is best spent improving your own code and doing testing. Developer time is a very, very expensive resource!

MarkR
A: 

CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-mysqld-ldflags=-all-static

Use level 3 compiler optimizations (which may create non-portable binaries), elide constructors (this is mentioned in the mysql manual), all static is much faster.

ravid