Running MySQL on Mac OS X and Linux

June 15th, 2005 by

This is a follow-up to an older blog entry of mine about installing MySQL on FreeBSD, Linux and Mac OS X. After some time working with MySQL on both Linux and Mac OS X I have definitively settled on a preferred platform for running MySQL. Linux.

There is a substantial speed advantage in running MySQL on Linux. If you want to know why MySQL is so much faster on Linux than Mac OS X, follow the link for a detailed explanation. For me this speed advantage means that I can either run databases much, much faster while spending the same amount of money for hardware, or, I can run it at roughly the same speed for vastly less money.

Take for example my very informal tests… I ran a series of identical queries against identical databases on three installations of MySQL. Each installation used the mysql_huge conf file and version 4.1.12 of the MySQL server program. Queries were run using the standard mysql client application from the command line.

Testing Machines

  • xserve. 2GB RAM, 2x 1.33ghz G4 processors. Mac OS X Server 10.4
  • G5 Tower, 2x 2.0ghz 64bit processors, 3GB RAM. Mac OS X 10.4
  • AMD Sempron 2200+, 2GB RAM. Centos 4.x

As you can see, the G5 and Xserve are fairly powerful machines. The AMD machine is pretty wimpy with the exception that it’s got 2GB of RAM.

In my queries the AMD machine running Centos beat the Xserve by small but consistent margins and either tied or matched the G5. Pretty amazing considering the $179 cost of the linux box and $2000+ tag for both of the macs.

I am generally a die-hard mac os x fan, but I’m quickly warming up to Linux in the database and server environment because of speed and cost factors. If you’re an OS X fan looking for a superior platform for deploying MySQL I would seriously investigate finding a Linux distribution that fits your tastes. I’m a fan of Centos myself. I don’t find one platform or the other to be any more challenging to administer… you just have to learn the differences between the systems.

Leave a Reply