Re: [zfs-discuss] Confused by compressratio

2008-04-17 Thread Richard Elling
Stuart Anderson wrote: On Wed, Apr 16, 2008 at 02:07:53PM -0700, Richard Elling wrote: Personally, I'd estimate using du rather than ls. They report the exact same number as far as I can tell. With the caveat that Solaris ls -s returns the number of 512-byte blocks, whereas

Re: [zfs-discuss] Confused by compressratio

2008-04-16 Thread Stuart Anderson
On Tue, Apr 15, 2008 at 03:51:17PM -0700, Richard Elling wrote: UTSL. compressratio is the ratio of uncompressed bytes to compressed bytes. http://cvs.opensolaris.org/source/search?q=ZFS_PROP_COMPRESSRATIOdefs=refs=path=zfshist=project=%2Fonnv IMHO, you will (almost) never get the same

Re: [zfs-discuss] Confused by compressratio

2008-04-16 Thread Richard Elling
Stuart Anderson wrote: On Tue, Apr 15, 2008 at 03:51:17PM -0700, Richard Elling wrote: UTSL. compressratio is the ratio of uncompressed bytes to compressed bytes. http://cvs.opensolaris.org/source/search?q=ZFS_PROP_COMPRESSRATIOdefs=refs=path=zfshist=project=%2Fonnv IMHO, you will

Re: [zfs-discuss] Confused by compressratio

2008-04-16 Thread Stuart Anderson
On Wed, Apr 16, 2008 at 10:09:00AM -0700, Richard Elling wrote: Stuart Anderson wrote: On Tue, Apr 15, 2008 at 03:51:17PM -0700, Richard Elling wrote: UTSL. compressratio is the ratio of uncompressed bytes to compressed bytes.

Re: [zfs-discuss] Confused by compressratio

2008-04-16 Thread Richard Elling
Stuart Anderson wrote: On Wed, Apr 16, 2008 at 10:09:00AM -0700, Richard Elling wrote: Stuart Anderson wrote: On Tue, Apr 15, 2008 at 03:51:17PM -0700, Richard Elling wrote: UTSL. compressratio is the ratio of uncompressed bytes to compressed bytes.

Re: [zfs-discuss] Confused by compressratio

2008-04-16 Thread Joerg Schilling
Stuart Anderson [EMAIL PROTECTED] wrote: They report the exact same number as far as I can tell. With the caveat that Solaris ls -s returns the number of 512-byte blocks, whereas GNU ls -s returns the number of 1024byte blocks by default. IIRC, this may be controlled by environment variables

Re: [zfs-discuss] Confused by compressratio

2008-04-16 Thread Stuart Anderson
On Wed, Apr 16, 2008 at 02:07:53PM -0700, Richard Elling wrote: Personally, I'd estimate using du rather than ls. They report the exact same number as far as I can tell. With the caveat that Solaris ls -s returns the number of 512-byte blocks, whereas GNU ls -s returns the number of

Re: [zfs-discuss] Confused by compressratio

2008-04-15 Thread Jeremy F.
This may be my ignorance, but I thought all modern unix filesystems created sparse files in this way? -Original Message- From: Stuart Anderson [EMAIL PROTECTED] Date: Mon, 14 Apr 2008 15:45:03 To:Luke Scharf [EMAIL PROTECTED] Cc:zfs-discuss@opensolaris.org Subject: Re: [zfs-discuss

Re: [zfs-discuss] Confused by compressratio

2008-04-15 Thread Luke Scharf
Message- From: Stuart Anderson [EMAIL PROTECTED] Date: Mon, 14 Apr 2008 15:45:03 To:Luke Scharf [EMAIL PROTECTED] Cc:zfs-discuss@opensolaris.org Subject: Re: [zfs-discuss] Confused by compressratio On Mon, Apr 14, 2008 at 05:22:03PM -0400, Luke Scharf wrote: Stuart Anderson wrote

Re: [zfs-discuss] Confused by compressratio

2008-04-15 Thread Bob Friesenhahn
On Tue, 15 Apr 2008, Luke Scharf wrote: AFAIK, ext3 supports sparse files just like it should -- but it doesn't dynamically figure out what to write based on the contents of the file. Since zfs inspects all data anyway in order to compute the block checksum, it can easily know if a block is

Re: [zfs-discuss] Confused by compressratio

2008-04-15 Thread Luke Scharf
zfs list /export/compress NAME USED AVAIL REFER MOUNTPOINT export-cit/compress 90.4M 1.17T 90.4M /export/compress is 2GB/90.4M = 2048 / 90.4 = 22.65 That still leaves me puzzled what the precise definition of compressratio is? My guess is that

Re: [zfs-discuss] Confused by compressratio

2008-04-15 Thread Stuart Anderson
On Tue, Apr 15, 2008 at 01:37:43PM -0400, Luke Scharf wrote: zfs list /export/compress NAME USED AVAIL REFER MOUNTPOINT export-cit/compress 90.4M 1.17T 90.4M /export/compress is 2GB/90.4M = 2048 / 90.4 = 22.65 That still leaves me puzzled what the

Re: [zfs-discuss] Confused by compressratio

2008-04-15 Thread Richard Elling
UTSL. compressratio is the ratio of uncompressed bytes to compressed bytes. http://cvs.opensolaris.org/source/search?q=ZFS_PROP_COMPRESSRATIOdefs=refs=path=zfshist=project=%2Fonnv IMHO, you will (almost) never get the same number looking at bytes as you get from counting blocks. -- richard

Re: [zfs-discuss] Confused by compressratio

2008-04-14 Thread Luke Scharf
Stuart Anderson wrote: As an artificial test, I created a filesystem with compression enabled and ran mkfile 1g and the reported compressratio for that filesystem is 1.00x even though this 1GB file only uses only 1kB. ZFS seems to treat files filled with zeroes as sparse files, regardless

Re: [zfs-discuss] Confused by compressratio

2008-04-14 Thread Stuart Anderson
On Mon, Apr 14, 2008 at 09:59:48AM -0400, Luke Scharf wrote: Stuart Anderson wrote: As an artificial test, I created a filesystem with compression enabled and ran mkfile 1g and the reported compressratio for that filesystem is 1.00x even though this 1GB file only uses only 1kB. ZFS

Re: [zfs-discuss] Confused by compressratio

2008-04-14 Thread Luke Scharf
Stuart Anderson wrote: On Mon, Apr 14, 2008 at 09:59:48AM -0400, Luke Scharf wrote: Stuart Anderson wrote: As an artificial test, I created a filesystem with compression enabled and ran mkfile 1g and the reported compressratio for that filesystem is 1.00x even though this 1GB file

Re: [zfs-discuss] Confused by compressratio

2008-04-14 Thread Stuart Anderson
On Mon, Apr 14, 2008 at 05:22:03PM -0400, Luke Scharf wrote: Stuart Anderson wrote: On Mon, Apr 14, 2008 at 09:59:48AM -0400, Luke Scharf wrote: Stuart Anderson wrote: As an artificial test, I created a filesystem with compression enabled and ran mkfile 1g and the reported

[zfs-discuss] Confused by compressratio

2008-04-11 Thread Stuart Anderson
I am confused by the numerical value of compressratio. I copied a compressed ZFS filesystem that is 38.5G in size (zfs list USED and REFER value) and reports a compressratio value of 2.52x to an uncompressed ZFS filesystem and it expanded to 198G. So why is the compressratio 2.52 rather than