> From: zfs-discuss-boun...@opensolaris.org [mailto:zfs-discuss-
> boun...@opensolaris.org] On Behalf Of Jim Klimov
>    I recently heard an argument from a colleague that "ZFS mis-uses
> the term COW" (Copy-On-Write). According to him, the original term
> was introduced by some vendors and was to be taken literally: that
> is, whenever a new write comes to update an existing logical block
> in the storage, the block's old contents are first copied away to
> another physical location (i.e. to be used for snapshotting or for
> recovery of untimely poweroff/panic), then the original on-disk
> location is rewritten with the new data.

What you described (actually copying the disk sectors upon request to
overwrite the disk sectors) is what MS does.  It may seem more intuitive to
call this COW, in a "files" perspective, but COW is a computer science term
that was used in memory before it was ever used for disk.  The ZFS behavior
follows the traditional meaning of COW in regards to memory management.


>    Arguably, while this incurs a hit when rewriting existing data,
> this combats fragmentation and speeds up reads (i.e. all pieces of
> the file's "live" version are stored as contiguously as possible).
> This may be important for large objects randomly updated "inside",
> like VM disk images and iSCSI backing stores, precreated database
> table files, maybe swapfiles, etc.

Correct.  Pay now or pay later.  In some cases, pay now is better for the
long run, and in some cases, pay later is better for the long run.

zfs-discuss mailing list

Reply via email to