
On Mon, 17 Jun 2013, Petros <Petros.Listig@fdrive.com.au> wrote:
From: "Russell Coker" <russell@coker.com.au>
I've got a virtual server running MySQL where I'm going to convert the Dom0 to ZFS. Currently the Dom0 exports a LVM volume to the DomU which uses Ext4 for the database. My options are to use a ZFS zvol instead of a LV for the Ext4 filesystem or to use a ZFS filesystem that is NFS exported.
There may be a third option: Running MySQL in a Linux container. This way the "Dom0" is sharing the kernel with the "DomU" and provides the filesystem directly, without any layer in-between. Definitely a plus for a database server.
I have idly considered using containers for that system. For the more complex DomUs I wouldn't do it, also if I was to have multiple servers for the same service then I wouldn't do it to avoid any risk of the wrong server binding to a particular IP address. But as I've only got one single MySQL server in the network in question and a MySQL server is a fairly simple system (in terms of the range of things that a server might do) it might be a good option. Also the MySQL server in question is still running RHEL4. Out of all the DomUs there is one which has some MySQL client processes which wouldn't talk to a newer version of mysqld last time I tested. Eventually I want to upgrade to Debian/Wheezy for the MySQL server which means a dump/restore. Using ZFS in a container for performance would be a significant benefit for that operation.
Arjen, I am surprised to hear the ZFS is faster than ext4. I did not benchmark (the performance is "good enough" for my purposes) but I believed a COW system isn't the best for databases.
On Mon, 17 Jun 2013, Toby Corkindale <toby.corkindale@strategicdata.com.au> wrote:
http://blog.dryft.net/2011/09/benchmarking-zfs-xfs-ext4-and-btrfs.html
My blog post also notes that I have my suspicions about WHY it's faster -- that perhaps it is not using i/o barriers. I don't know if that has any implications for data write assurances or not in the ZFS COW model; it's quite possible that it's actually safe to not use barriers, and thus gain a big performance boost.
Toby has written about the ZFS performance. It seems that ZFS gains write performance from advanced caching and read performance doesn't matter so much nowadays as RAM is cheap and the working set will usually be in cache. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/