
On Wed, 17 Oct 2012, Craig Sanders <cas@taz.net.au> wrote:
From the guest VM's point-of-view, it's just a disk with nothing special about it.
ext3 or ext4 performance in the guest will be similar to performance if the guest were given an LVM lv.
In theory the write performance of Ext3/4 should benefit significantly from the way that the zpool layer manages somewhat contiguous writes thus avoiding write seek time. Creating a file in Ext3/4 involves writing to the directory, the Inode table, a block count table, and the journal - all of which tend to be at different parts of the disk. With ZFS it should theoretically be just the overhead of a journal entry without having to write the rest. I haven't had a chance to test this theory due to a lack of hardware suitable for running ZFS. It seems that the minimum hardware for doing a test is a system with 4G of RAM, a 64bit CPU, and at least 3 disks. Currently I don't have access to such a test system.
if i had to guess, i'd say that there are probably some cases where LVM (with its nearly direct raw access to the underlying disks) would be faster than ZFS zvols but in most cases, ZFS' caching, compression, COW and so on would give the performance advantage to ZFS.
If you want to optimise for read performance without caching (IE no L2ARC and a working set significantly bigger than RAM) then LVM would probably win in some ways.
Note that this zvol has compression enabled - this would be a good choice for a mail server's storage disk - mail is highly compressible. depending on available RAM in the server and the kind of mail typically received (e.g. multiple copies of the same email), de-duping the zvol may also be worthwhile.
The last time I checked the average message size on a medium size mail spool it was about 70K. The headers are essentially impossible to dedup as they differ in the final stage of delivery even if a single SMTP operation was used to send to multiple local users. Deduping the message body seems unlikely to provide a significant benefit as there usually aren't that many duplicates, not even when you count spam and jokes - I'm assuming that ZFS is even capable of deduplicating files which have the duplicate part at different offsets, but I don't care enough about this to even look it up. For every server I run that has any duplicate content RAM is a more limited resource than disk space. For example the server which is full of raw files from digital cameras is never going to benefit from dedup even though it has enough RAM to run it. So there's no possibility of me gaining anything from it. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/