On Dec 16, 2009, at 7:35 AM, Bill Sprouse wrote:
Hi Richard,How's the ranch? ;-)
Good. Sunny, warm, turning green... perfect for the holidays :-)
This is most likely a naive question on my part. If recordsize is set to 4k (or a multiple of 4k), will ZFS ever write a record that is less than 4k or not a multiple of 4k?Yes. The recordsize is the upper limit for a file record.This includes metadata.Yes. Metadata is compressed and seems to usually be one block.Does compression have any effect on this?Yes. 4KB is the minimum size that can be compressed for regular data. NB. Physical writes may be larger because they are coalesced. But if you are worried about recordsize, then you are implicitly worried about reads.The question behind the question is, given the really bad things that can happen performance-wise with writes that are not 4k aligned when using flash devices, is there any way to insure that any and all writes from ZFS are 4k aligned?
The short answer is no, not all writes will be 4 KB aligned. As to how this affects "flash devices," it depends on the device -- very few seem to be built the same way. A quick dtrace script would show how writes are aligned to the partition boundaries, but the partition alignment is left as an exercise for
the implementer. -- richard
aligned.d
Description: Binary data
_______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss