Virtualized MySQL Faster

rentzsch:

I have an Xserve that’s still on 10.4. It runs a web app with a typical MySQL database backend. Both on metal.

This morning the DB got so slow that the app server started returning “timed out” error pages.

Ungood.

So I dumped the database, created a new Debian VMware instance and loaded up the data. I ssh port-forwarded metal’s 3306 to the new VM and restarted the apps.

Yesterday it took around seven seconds to vend a page. Now it’s back under half a second.

I wonder what I’m doing wrong that MySQL on OSX metal is an order of magnitude slower than MySQL on virtualized Linux.*

Could it be the default settings on Mac OS X Server 10.4 are that much worse than the defaults on Debian 5 Lenny?

Mac OS X’s file system is a lot slower than Linux’s, but I don’t think it could explain this much of a difference.

*You may assume I did the obvious things before migrating the DB from metal to VMware: restart the server, dump+reload the DB, etc.

I’ve never looked too far into it, but I can’t get MySQL on OS X to even keep up with slave replication from masters with similar hardware and moderate to low loads.

Something’s not right, but there’s probably too little demand for it to be adequately figured out yet.