
On 17/06/13 09:40, Petros wrote:
Hi Russell,
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.
It's the setup I use with FreeBSD and jails and it works well.
In some cases it is worth to consider whether you need OS virtualisation at all. E.g. database servers on dedicated hardware shared by multiple instances.
I agree with Arjen to stay away from NFS. Partially because of the way NFS adds networking and locking over it and all that complexity (and potential implementation problems and bugs..)
I see issues reported around ZFS and NFS under FreeBSD but I did not bother to look into it - I don't use it that way (and can afford to avoid it;-)
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.
I've noticed ZFS performing very well for databases as well, and wrote a blog post about it: 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. Does anyone here know more about this? PS. That round of benchmarking was in 2011, when zfs was not particularly mature on Linux; the situation may have changed by now.