Showing posts with label build MySQL compile gcc configure. Show all posts
Showing posts with label build MySQL compile gcc configure. Show all posts

Wednesday, May 27, 2009

MySQL 5.4 testing - Failure and a W/O

I had this idea around 5.4. It is meant to scale better on multi-core machines compared to, say, standard 5.1. This has been proven also it seems. 5.4 is still in Beta, but testing has shown that scalability is definitively better.

What I wanted to know was how well 5.4 would work on a lower spec box compared to 5.1. One reason for me wanting to test this is that I am currently in my summer house, and I have no multi-core 64-bit machines around. All I have in terms of Linux boxes is an old Dell Laptop with Gentoo on it, all this will as similar setup as possible between 5.1 and 5.4.

So, I download 5.4 sources, as there are no 32-bit Linux binaries yet, and I do a simple configure and make. And.. I fail. Out of the box, some of the inline optimizations in innodb (the config I built with was max-no-ndb) will screw up gcc when using -O3 optimization (OK, I admit, I'm not 100% sure that this is the cause, but it sure looks like it, and some googling seems to confirm it, but I'm not a compiler engineer, so who knows).

So today, when I was planning to do some benchmarking and some other fun things, I tried to track this one down, and I did find a W/O for this issue, which is to configure with CFLAGS=-O2, i.e.:
./configure --with-plugins=max-no-ndb CFLAGS="-O2"
This will actually do the trick. And once I figured that out, I had to report it as a bug (#45131) and try with a few different compilers.

I did an emerge on gcc for my gentoo, and got gcc 4.1.2 instead of 4.1.1, and had the same problem. I also tested on another box running SuSE and gcc 3.3.1, and with the same problem. But as I said, at least there is a fix.

Tomorrow, I might do the actual low-end 32-bit machine performance test, I'll keep you posted.

/Karlsson