Posted on 5 Comments

MacBook (again) and OS X Leopard 64-bit MySQL build

So, I got my new MacBook 13″ – since Apple updated the chipset. That ups the speed to 2.2GHz (it’s a Core 2 Duo), has better graphics (apparently, don’t think I care too much for that), but most importantly, it can now handle up to 4GB of RAM. Not that you should get the 2x2GB from Apple directly (the other ram upgrades are not that expensive with them actually) but here they decided to ask for a whopping $1250 or so. Daft. Got the memory sticks from elsewhere, of course. The 4GB is glorious! No swapping, very responsive, even with lots of stuff open. Great.
Note that I ordered the MacBook directly from the Apple store, because the local shops in AU didn’t have the new model yet (different warehouse apparently).

New Macs come with OS X 10.5 (Leopard). Very shiny. Time Machine is particularly cool, as is the GUI profiler that’s part of Xcode. Lots of other little things improved and fixed. Although I’m not sure I like the new way iCal works, I need more clicks to edit entries. That’s against Steve Jobs logic though…. perhaps I’m missing something.

Anyway, since I’m playing with speed improvements for MySQL on the client side (submitted a session for the MySQL conference next year about what I’ve been up to), I thought I should try a 64-bit binary of mysqld, even though people often say that 64bit doesn’t appear to make that much difference in terms of speed.
Well, in the home build, you just add “-arch x86_64 -m64” to the compile flags. That easy. configure still picks up the ‘i386’ designator from the ‘arch’ tool – but it builds perfectly and it’s definitely 64-bit, you can tell in the Activity Monitor, and… by the speed. At least for what I’m doing, it’s a a LOT faster. Then again, I also used -O3 (optimise for speed) whereas I think previously I just used the basic -O. So that’ll have had something to do with the speed improvement on the home build as well.

It all works – it’s just a dev/test setup though, I actually make mysqld run directly where it’s built (in its source tree) without installing it elsewhere. I am also working on a new specialised storage engine together with someone (another MySQL Conf submission: GRAPH engine) and when built with the same flags the plugin loads into mysqld without hassles. All good.

Posted on 5 Comments

5 thoughts on “MacBook (again) and OS X Leopard 64-bit MySQL build

  1. I’m at SFO waiting for my plane home to NY and a shiny new Macbook awaiting my arrival that I bought online.

    Looking forward to trying this out myself.

  2. Are you aware of any updated info regarding MySQL performance on OS X Leopard vs Tiger relative to the conclusions of this article? http://www.anandtech.com/mac/showdoc.aspx?i=2520&p=1

    — gw

  3. Since you’ve been able to get an x86_64 build of MySQL to work, perhaps you could further explain the process. There’s a whole thread at the MySQL forum on trying to get it to compile correctly for Leopard (http://forums.mysql.com/read.php?117,180545,180545).

    If you could write out exactly what you did to get it to compile, there would be many grateful individuals.

  4. One more vote for a complete writeout on how to built mysql 64-bit

  5. More info on compiling mysql 64-bit can be read at:
    http://diymacserver.com/2008/10/04/update-on-64-bits-compilation/

Comments are closed.