Re: [zfs-discuss] copy on write related query

2008-01-07 Thread Nicolas Williams
On Sun, Jan 06, 2008 at 08:05:56AM -0800, sudarshan sridhar wrote:
>   My exact doubt is, if COW is default behavior of ZFS then does COWd
>   data written to the same physical drive where the filesystem
>   resides? 

Just to clarify: there is no way to disable COW in ZFS.

>   If so the physical device capacity should be more that what the file
>   system size is. 
> 
>   I mean in normal filesystem sinario, a partition with 1Gb with some
>   some filesystem (say ext2fs) is created, then use can save upto 1Gb
>   data under that.
> 
>   Is the same behavior with ZFS?. Because I feel since COW is default
>   ZFS require > 1Gb for one fileystem inorder to store COWed data.
>
>   Please correct me if i am wrong.

If you are trying to update as much data as you already have on disk,
all in the same transaction, then yes, COW doubles your transient
storage requirements for completing the transaction.

Of course, noone ever updates (replaces) terabytes of data in one
transaction.  That's because the necessary bandwidth does not exist.

So the amount of free space required in order to complete any given
transaction is going to be a small fraction of the total amount of space
in the given volume.  You will only notice that you even need to have
that much space available when your volume is very close to full.  COW
or no COW, if you're close to "volume full" you have a problem -- you
are very likely to reach "volume full" and not having COW wouldn't save
you.

If you're trying to say that COW is inefficient, space-wise, what you'll
find is that the space overhead for COW is in the noise for any large
volume.

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


Re: [zfs-discuss] copy on write related query

2008-01-06 Thread Richard Elling
sudarshan sridhar wrote:
> /Hi,/
> // 
> / >>Also where exactly COWed data written
> /
> >>>I'm not quite sure what you're asking here. Data, whether newly 
> written or >>>copy-on-write, goes to a newly allocated block, which 
> may reside on any >>>vdev, and will be spread across devices if using 
> RAID.
> My exact doubt is, if COW is default behavior of ZFS then does COWd 
> data written to the same physical drive where the filesystem resides?
> If so the physical device capacity should be more that what the file 
> system size is. 
> I mean in normal filesystem sinario, a partition with 1Gb with some 
> some filesystem (say ext2fs) is created, then use can save upto 1Gb 
> data under that.
> Is the same behavior with ZFS?. Because I feel since COW is default 
> ZFS require > 1Gb for one fileystem inorder to store COWed data.
>  
> Please correct me if i am wrong.

Unless there is a snapshot, the old blocks are freed after the new COW 
completes.
IMHO, it is much easier to understand if you think of the vdevs as 
memory and
the ZFS allocations as, well, memory allocations.  The excellent papers 
on the
slab allocator provide the nitty gritty details.
 -- richard

>  
> -sridhar
>
> 
> Never miss a thing. Make Yahoo your homepage. 
> 
> 
>
> ___
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
>   

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


Re: [zfs-discuss] copy on write related query

2008-01-06 Thread Neil Perrin


sudarshan sridhar wrote:
>> I'm not quite sure what you're asking here. Data, whether newly written or
>> copy-on-write, goes to a newly allocated block, which may reside on any
>> vdev, and will be spread across devices if using RAID.

> My exact doubt is, if COW is default behavior of ZFS then does COWd data 
> written to the same physical drive where the filesystem resides?

Yes.

> If so the physical device capacity should be more that what the file 
> system size is.

Yes.

> I mean in normal filesystem sinario, a partition with 1Gb with some some 
> filesystem (say ext2fs) is created, then use can save upto 1Gb data 
> under that.

This is not true of any filesystem. There is always some overhead for
meta data like indirect blocks, journals, superblocks, space maps etc.
Some filesystems (eg UFS) have a fixed areas for meta data which limits
the number of files and possible data, whereas others dynamically allocate
the meta data (eg ZFS). The former is more predictable and the latter
more flexible.

> Is the same behavior with ZFS?. Because I feel since COW is default ZFS 
> require > 1Gb for one fileystem inorder to store COWed data.
>  
> Please correct me if i am wrong.
>  
> -sridhar
> 
> 
> Never miss a thing. Make Yahoo your homepage. 
> 
> 
> 
> 
> 
> ___
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] copy on write related query

2008-01-06 Thread sudarshan sridhar
Hi,
   
   >>Also where exactly COWed data written

>>>I'm not quite sure what you're asking here. Data, whether newly written or 
>>copy-on-write, goes to a newly allocated block, which may reside on any 
>>vdev, and will be spread across devices if using RAID.

  My exact doubt is, if COW is default behavior of ZFS then does COWd data 
written to the same physical drive where the filesystem resides? 
  If so the physical device capacity should be more that what the file system 
size is. 
  I mean in normal filesystem sinario, a partition with 1Gb with some some 
filesystem (say ext2fs) is created, then use can save upto 1Gb data under that.
  Is the same behavior with ZFS?. Because I feel since COW is default ZFS 
require > 1Gb for one fileystem inorder to store COWed data.
   
  Please correct me if i am wrong.
   
  -sridhar

   
-
Never miss a thing.   Make Yahoo your homepage.___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] copy on write related query

2008-01-06 Thread Anton B. Rang
> Does copy-on-write happen every time when any data block of ZFS is getting 
> modified?

Yes.  (Data block or meta-data block, with the sole exception of the set of 
überblocks.)

> Also where exactly COWed data written

I'm not quite sure what you're asking here. Data, whether newly written or 
copy-on-write, goes to a newly allocated block, which may reside on any vdev, 
and will be spread across devices if using RAID.

Anton
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] copy on write related query

2008-01-04 Thread sudarshan sridhar
Hi,
   
Does copy-on-write happens every time when any data block of ZFS is getting 
modified? or one needs to configure to enable COW for ZFS while creating? 
   
  Also where exactly COWed data written if my storage pool is a single physical 
device or even multiple divices are there but used a single device.
   
  Thanks & Regards,
  sridhar.

   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss