question is ZFS uses COW(copy on write), does this mean it will double usage of capacity or waste the capacity? What COW really do? No mirror also has COW? Please help me, thanks. Robert
Robert Chen wrote:> question is ZFS uses COW(copy on write), does this mean it will > double usage of capacity or waste the capacity? > > What COW really do? No mirror also has COW? > > Please help me, thanks. > > Robert > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >It doesn''t. Page 11 of the following slides illustrates how COW works in ZFS: http://www.opensolaris.org/os/community/zfs/docs/zfs_last.pdf "Blocks containing active data are never overwritten in place; instead, a new block is allocated, modified data is written to it, and then any metadata blocks referencing it are similarly read, reallocated, and written. To reduce the overhead of this process, multiple updates are grouped into transaction groups, and an intent log is used when synchronous write semantics are required."(from http://en.wikipedia.org/wiki/ZFS) IN snapshot scenario, COW consumes much less disk space and is much faster. Raymond
On Fri, Jul 07, 2006 at 11:59:29AM +0800, Raymond Xiong wrote:> It doesn''t. Page 11 of the following slides illustrates how COW > works in ZFS: > > http://www.opensolaris.org/os/community/zfs/docs/zfs_last.pdf > > "Blocks containing active data are never overwritten in place; > instead, a new block is allocated, modified data is written to > it, and then any metadata blocks referencing it are similarly > read, reallocated, and written. To reduce the overhead of this > process, multiple updates are grouped into transaction groups, > and an intent log is used when synchronous write semantics are > required."(from http://en.wikipedia.org/wiki/ZFS) > > IN snapshot scenario, COW consumes much less disk space and is > much faster.It says also that updating uberblock is an atomic operations. How is it achieved ? przemol
przemolicc at poczta.fm wrote:>On Fri, Jul 07, 2006 at 11:59:29AM +0800, Raymond Xiong wrote: > > >>It doesn''t. Page 11 of the following slides illustrates how COW >>works in ZFS: >> >>http://www.opensolaris.org/os/community/zfs/docs/zfs_last.pdf >> >>"Blocks containing active data are never overwritten in place; >>instead, a new block is allocated, modified data is written to >>it, and then any metadata blocks referencing it are similarly >>read, reallocated, and written. To reduce the overhead of this >>process, multiple updates are grouped into transaction groups, >>and an intent log is used when synchronous write semantics are >>required."(from http://en.wikipedia.org/wiki/ZFS) >> >>IN snapshot scenario, COW consumes much less disk space and is >>much faster. >> >> > >It says also that updating uberblock is an atomic operations. How is it >achieved ? > >przemol >_______________________________________________ >zfs-discuss mailing list >zfs-discuss at opensolaris.org >http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > >The email thread and document below gives you information about that: http://www.opensolaris.org/jive/thread.jspa?messageID=19264䭀 http://www.opensolaris.org/os/community/zfs/docs/ondiskformatfinal.pdf Francois.
I still could not understand why Copy on Write does not waste file system capacity. Robert Raymond Xiong ??:> Robert Chen wrote: > >> question is ZFS uses COW(copy on write), does this mean it will >> double usage of capacity or waste the capacity? >> >> What COW really do? No mirror also has COW? >> >> Please help me, thanks. >> >> Robert >> >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >> >> > > It doesn''t. Page 11 of the following slides illustrates how COW > works in ZFS: > > http://www.opensolaris.org/os/community/zfs/docs/zfs_last.pdf > > "Blocks containing active data are never overwritten in place; > instead, a new block is allocated, modified data is written to > it, and then any metadata blocks referencing it are similarly > read, reallocated, and written. To reduce the overhead of this > process, multiple updates are grouped into transaction groups, > and an intent log is used when synchronous write semantics are > required."(from http://en.wikipedia.org/wiki/ZFS) > > IN snapshot scenario, COW consumes much less disk space and is > much faster. > > Raymond > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20060713/e8d2b183/attachment.html>
It uses extra space in the middle of the write, in order to hold the new data, but once the write is complete, the space occupied by the old version is now free for use. ckl On Jul 12, 2006, at 8:05 PM, Robert Chen wrote:> I still could not understand why Copy on Write does not waste file > system capacity. > > Robert > > > Raymond Xiong ??: >> Robert Chen wrote: >>> question is ZFS uses COW(copy on write), does this mean it will >>> double usage of capacity or waste the capacity? What COW really >>> do? No mirror also has COW? Please help me, thanks. Robert >>> _______________________________________________ zfs-discuss >>> mailing list zfs-discuss at opensolaris.org http:// >>> mail.opensolaris.org/mailman/listinfo/zfs-discuss >> It doesn''t. Page 11 of the following slides illustrates how COW >> works in ZFS: http://www.opensolaris.org/os/community/zfs/docs/ >> zfs_last.pdf "Blocks containing active data are never overwritten >> in place; instead, a new block is allocated, modified data is >> written to it, and then any metadata blocks referencing it are >> similarly read, reallocated, and written. To reduce the overhead >> of this process, multiple updates are grouped into transaction >> groups, and an intent log is used when synchronous write semantics >> are required."(from http://en.wikipedia.org/wiki/ZFS) IN snapshot >> scenario, COW consumes much less disk space and is much faster. >> Raymond _______________________________________________ zfs- >> discuss mailing list zfs-discuss at opensolaris.org http:// >> mail.opensolaris.org/mailman/listinfo/zfs-discuss > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
I think the other part of information that''s missing is that we COW at the block level, NOT at the file level. So, the extra blocks are in use only during the update, and it''s only blocks, not whole files... Hope this helps.. Nathan. On Thu, 2006-07-13 at 14:10, Chad Lewis wrote:> It uses extra space in the middle of the write, in order to hold the > new data, but once > the write is complete, the space occupied by the old version is now > free for use. > > ckl > > On Jul 12, 2006, at 8:05 PM, Robert Chen wrote: > > > I still could not understand why Copy on Write does not waste file > > system capacity. > > > > Robert > > > > > > Raymond Xiong ??: > >> Robert Chen wrote: > >>> question is ZFS uses COW(copy on write), does this mean it will > >>> double usage of capacity or waste the capacity? What COW really > >>> do? No mirror also has COW? Please help me, thanks. Robert > >>> _______________________________________________ zfs-discuss > >>> mailing list zfs-discuss at opensolaris.org http:// > >>> mail.opensolaris.org/mailman/listinfo/zfs-discuss > >> It doesn''t. Page 11 of the following slides illustrates how COW > >> works in ZFS: http://www.opensolaris.org/os/community/zfs/docs/ > >> zfs_last.pdf "Blocks containing active data are never overwritten > >> in place; instead, a new block is allocated, modified data is > >> written to it, and then any metadata blocks referencing it are > >> similarly read, reallocated, and written. To reduce the overhead > >> of this process, multiple updates are grouped into transaction > >> groups, and an intent log is used when synchronous write semantics > >> are required."(from http://en.wikipedia.org/wiki/ZFS) IN snapshot > >> scenario, COW consumes much less disk space and is much faster. > >> Raymond _______________________________________________ zfs- > >> discuss mailing list zfs-discuss at opensolaris.org http:// > >> mail.opensolaris.org/mailman/listinfo/zfs-discuss > > > > _______________________________________________ > > zfs-discuss mailing list > > zfs-discuss at opensolaris.org > > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss--
przemolicc at poczta.fm wrote:>On Fri, Jul 07, 2006 at 11:59:29AM +0800, Raymond Xiong wrote: > > >>It doesn''t. Page 11 of the following slides illustrates how COW >>works in ZFS: >> >>http://www.opensolaris.org/os/community/zfs/docs/zfs_last.pdf >> >>"Blocks containing active data are never overwritten in place; >>instead, a new block is allocated, modified data is written to >>it, and then any metadata blocks referencing it are similarly >>read, reallocated, and written. To reduce the overhead of this >>process, multiple updates are grouped into transaction groups, >>and an intent log is used when synchronous write semantics are >>required."(from http://en.wikipedia.org/wiki/ZFS) >> >>IN snapshot scenario, COW consumes much less disk space and is >>much faster. >> >> > >It says also that updating uberblock is an atomic operations. How is it >achieved ? > >przemol >_______________________________________________ >zfs-discuss mailing list >zfs-discuss at opensolaris.org >http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > >The email thread and document below gives you information about that: http://www.opensolaris.org/jive/thread.jspa?messageID=19264䭀 http://www.opensolaris.org/os/community/zfs/docs/ondiskformatfinal.pdf Francois. _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss -- This message posted from opensolaris.org