Virtualized MySQL Faster
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
3306to 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.
It’s very likely a combination of the above. Apple doesn’t really care much about giving you a sensible default configuration for MySQL, whereas Debian’s MySQL package maintainers will. Filesystem performance may or may not make much difference depending upon your table type (I would rather hope that, being virtualised, Debian would be marginally slower). What were the respective MySQL versions?