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

5 comments:

Mikael Ronstrom said...

Weird that you get this problem. I also came across this problem in some pushbuilds so disabled inlining on 32-bit gcc since there was some issue with this (also a similar problem on Mac OS X).

Karlsson said...

Also note that this was on several platforms, who machines (both 32-bit x86) and three versions of gcc.

Karlsson said...

This bug is now confirmed as a real bug. It was actually a bug in the code it seems: 45131

Mikael Ronstrom said...

It turns out that the fixes I did was only disabling the 32-bit gcc inlining on Mac OS X and Solaris. As you showed it was a problem with 32-bit inlining in general. But as showed this was due to a bug in the atomics code, so with that code fixed I can also remove the disabling of inlining of 32-bit on Mac OS X and Solaris. Great, thx for blogging about this and filing a bug.

The Maurya Sir said...

Movie Orca unquestionably belongs to this exclusive category, inviting us on an exhilarating expedition through the realms of nature, survival, and vengeance. Debuting in 1977, this legendary film not only captivated audiences but also served as a poignant reminder of the commanding presence of the ocean’s ultimate predator, the killer whale Movie