Not having specific knowledge of the VMDK format, I think what you are seeing is that there is extra data associated with maintaining the VMDK. If you are seeing lower dedup ratios than you would expect, it sounds like some of this extra data could be added to each block.

The VMDK spec appears to be open, perhaps a read through the spec might help understand what VMware is doing to the NTFS data - http://en.wikipedia.org/wiki/VMDK

  --joe

On 3/18/2010 11:44 AM, Chris Murray wrote:
Good evening,
I understand that NTFS&  VMDK do not relate to Solaris or ZFS, but I was 
wondering if anyone has any experience of checking the alignment of data blocks 
through that stack?

I have a VMware ESX 4.0 host using storage presented over NFS from ZFS 
filesystems (recordsize 4KB). Within virtual machine VMDK files, I have 
formatted NTFS filesystems, block size 4KB. Dedup is turned on. When I run ZDB 
-DD, i see a figure of unique blocks which is higher than I expect, which makes 
me wonder whether any given 4KB in the NTFS filesystem is perfectly aligned 
with a 4KB block in ZFS?

e.g. consider two virtual machines sharing lots of the same blocks. Assuming there /is/ 
a misalignment between NTFS&  VMDK/VMDK&  ZFS, if they're not in the same order 
within NTFS, they don't align, and will actually produce different blocks in ZFS:

VM1
NTFS    1---2---3---
         AAAABBBBCCCC

           AAAABBBBCCCC
ZFS     1---2---3---4---

ZFS blocks are "  AA", "AABB" and so on ...
Then in another virtual machine, the blocks are in a different order:

VM2
NTFS    1---2---3---
         CCCCAAAABBBB

           CCCCAAAABBBB
ZFS     1---2---3---4---
ZFS blocks for this VM would be "  CC", "CCAA", "AABB" etc. So, no overlap 
between virtual machines, and no benefit from dedup.

I may have it wrong, and there are indeed 30,785,627 unique blocks in my setup, 
but if there's a mechanism for checking alignment, I'd find that very helpful.

Thanks,
Chris

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to