On Sep 12, 2010, at 8:27 PM, Edward Ned Harvey wrote:

>> From: zfs-discuss-boun...@opensolaris.org [mailto:zfs-discuss-
>> boun...@opensolaris.org] On Behalf Of Orvar Korvar
>> 
>> I am not really worried about fragmentation. I was just wondering if I
>> attach new drives and zfs send recieve to a new zpool, would count as
>> defrag. But apparently, not.
> 
> "Apparently not in all situations" would be more appropriate.
> 
> The understanding I had was:  If you send a single zfs send | receive, then
> it does effectively get defragmented, because the receiving filesystem is
> going to re-layout the received filesystem, and there is nothing
> pre-existing to make the receiving filesystem dance around...  But if you're
> sending some initial, plus incrementals, then you're actually repeating the
> same operations that probably caused the original filesystem to become
> fragmented in the first place.  And in fact, it seems unavoidable...
> 
> Suppose you have a large file, which is all sequential on disk.  You make a
> snapshot of it.  Which means all the individual blocks must not be
> overwritten.  And then you overwrite a few bytes scattered randomly in the
> middle of the file.  The nature of copy on write is such that of course, the
> latest version of the filesystem is impossible to remain contiguous.  Your
> only choices are:  To read & write copies of the whole file, including
> multiple copies of what didn't change, or you leave the existing data in
> place where it is on disk, and you instead write your new random bytes to
> other non-contiguous locations on disk.  Hence fragmentation.

This operational definition of "fragmentation" comes from the single-user,
single-tasking world (PeeCees). In that world, only one thread writes files
from one application at one time. In those cases, there is a reasonable
expectation that a single file's blocks might be contiguous on a single disk.
That isn't the world we live in, where have RAID, multi-user, or multi-threaded 
environments. 
 -- richard

-- 
OpenStorage Summit, October 25-27, Palo Alto, CA
http://nexenta-summit2010.eventbrite.com

Richard Elling
rich...@nexenta.com   +1-760-896-4422
Enterprise class storage for everyone
www.nexenta.com





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

Reply via email to