Re: [zfs-discuss] ZFS root compressed ?

2008-06-20 Thread Ian Collins
Bill Sommerfeld wrote:
 On Thu, 2008-06-05 at 23:04 +0300, Cyril Plisko wrote:
 2. How can I do it ? (I think I can run zfs set compression=on
 rpool/ROOT/snv_90 in the other window, right after the installation
 begins, but I would like less hacky way.)
 

 what I did was to migrate via live upgrade, creating the pool and the
 pool/ROOT filesystem myself, tweaking both  copies and compression on
 pool/ROOT before using lucreate.

 I haven't tried this on a fresh install yet.

   
I tried this and the lucreate failed right at the end, unable to find
grub on the root device.  Because the grub copy failed, ludelete is
unable to remove the broken BE.

Ian

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


[zfs-discuss] ZFS root compressed ?

2008-06-05 Thread Cyril Plisko
Hi !

As, probably, many of us I am playing with snv_90 and ZFS root. During
the installation I didn't see any possibility to set the properties of
the datasets. In particular compression.
I see that default installation leaves the compression property
untouched for all the created datasets, with rpool/dump being the only
exception. For it the compression property is explicitly set to off.

venus:/home/imp zfs get compression
NAME   PROPERTY VALUE  SOURCE
rpool  compression  offdefault
rpool/ROOT compression  offdefault
rpool/ROOT/snv_90  compression  offdefault
rpool/dump compression  offlocal
rpool/export   compression  offdefault
rpool/export/home  compression  offdefault
rpool/snv_90_gzip  compression  gzip   local
rpool/snv_90_lzjb  compression  lzjb   local
rpool/swap compression  offdefault


I checked what would be the disk saving if compression would be turned
on and here are the results for the nearly full SXCE install.
rpool/snv_90_gzip and rpool/snv_90_lzjb are copies of the
rpool/ROOT/snv_90 ith respective compression turned on.

venus:/home/imp zfs list | grep snv_90
rpool/ROOT/snv_90  4.79G   136G  4.79G  /
rpool/snv_90_gzip  1.82G   136G  1.82G  /rpool/snv_90_gzip
rpool/snv_90_lzjb  2.80G   136G  2.80G  /rpool/snv_90_lzjb
venus:/home/imp zfs get compressratio | grep snv_90
rpool/ROOT/snv_90  compressratio  1.00x  -
rpool/snv_90_gzip  compressratio  2.63x  -
rpool/snv_90_lzjb  compressratio  1.70x  -
venus:/home/imp

With lzjb the compression ratio is significant and with gzip is even
more so. I believe that having compression enabled on root file system
can be a good thing. System files are usually read-only, so the CPU
penalty on write for higher compression should be negligible. And
decompression on read supposed to be pretty fast.

So the questions are:

1. Are there any reasons to *not* enable compression by default ?
2. How can I do it ? (I think I can run zfs set compression=on
rpool/ROOT/snv_90 in the other window, right after the installation
begins, but I would like less hacky way.)


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


Re: [zfs-discuss] ZFS root compressed ?

2008-06-05 Thread Bill Sommerfeld

On Thu, 2008-06-05 at 23:04 +0300, Cyril Plisko wrote:
 1. Are there any reasons to *not* enable compression by default ?

Not exactly an answer:

Most of the systems I'm running today on ZFS root have compression=on
and copies=2 for rpool/ROOT 

 2. How can I do it ? (I think I can run zfs set compression=on
 rpool/ROOT/snv_90 in the other window, right after the installation
 begins, but I would like less hacky way.)

what I did was to migrate via live upgrade, creating the pool and the
pool/ROOT filesystem myself, tweaking both  copies and compression on
pool/ROOT before using lucreate.

I haven't tried this on a fresh install yet.

after install, I'd think you could play games with zfs send | zfs
receive on an inactive BE to rewrite everything with the desired
attributes (more important for copies than compression).

- Bill


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


Re: [zfs-discuss] ZFS root compressed ?

2008-06-05 Thread Richard Elling
Bill Sommerfeld wrote:
 On Thu, 2008-06-05 at 23:04 +0300, Cyril Plisko wrote:
   
 1. Are there any reasons to *not* enable compression by default ?
 

 Not exactly an answer:

 Most of the systems I'm running today on ZFS root have compression=on
 and copies=2 for rpool/ROOT 
   

I've been experimenting with this, too, and will likely settle
on the same: copies=2, compression=on

IIRC, grub ZFS does lzjb, but not gzip

 2. How can I do it ? (I think I can run zfs set compression=on
 rpool/ROOT/snv_90 in the other window, right after the installation
 begins, but I would like less hacky way.)
 

 what I did was to migrate via live upgrade, creating the pool and the
 pool/ROOT filesystem myself, tweaking both  copies and compression on
 pool/ROOT before using lucreate.

 I haven't tried this on a fresh install yet.
   

Two ways to do this from DVD/LiveCD:
1. change the parameters after the rpool is created, but before packages
   are being installed. This can be a little tricky to get the 
timing right,
   especially for OpenSolaris -- it is easier with SXCE because 
there is a
   fair amount of time required to build the dump and swap volumes prior
   to building the root file system.  Anyway, I just open a terminal
   window and type the appropriate zfs commands.

2. replace /sbin/zpool with a script that does what you want prior to
   beginning the installation -- ugly but possible.

JumpStart may allow you more flexibility, if you do JumpStarts you
should check the docs to see if there is an easier way.
 -- richard

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


Re: [zfs-discuss] ZFS root compressed ?

2008-06-05 Thread Mark J Musante


On Jun 5, 2008, at 4:43 PM, Bill Sommerfeld wrote:


after install, I'd think you could play games with zfs send | zfs
receive on an inactive BE to rewrite everything with the desired
attributes (more important for copies than compression).



I blogged about something similar about a year ago:
http://blogs.sun.com/mmusante/entry/zfs_compression_and_you



Regards,
markm

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


Re: [zfs-discuss] ZFS root compressed ?

2008-06-05 Thread ian
Bill Sommerfeld writes: 

 2. How can I do it ? (I think I can run zfs set compression=on
 rpool/ROOT/snv_90 in the other window, right after the installation
 begins, but I would like less hacky way.)
 
 what I did was to migrate via live upgrade, creating the pool and the
 pool/ROOT filesystem myself, tweaking both  copies and compression on
 pool/ROOT before using lucreate. 
 
 I haven't tried this on a fresh install yet. 
 
 after install, I'd think you could play games with zfs send | zfs
 receive on an inactive BE to rewrite everything with the desired
 attributes (more important for copies than compression). 
 
Would it be possible to create a new BE on a compressed filesystem and 
activate it?  Is snap upgrade implemted yet?  If so this should be quick. 

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


Re: [zfs-discuss] ZFS root compressed ?

2008-06-05 Thread Cyril Plisko
On Fri, Jun 6, 2008 at 2:58 AM,  [EMAIL PROTECTED] wrote:
 Bill Sommerfeld writes:

 2. How can I do it ? (I think I can run zfs set compression=on
 rpool/ROOT/snv_90 in the other window, right after the installation
 begins, but I would like less hacky way.)

 what I did was to migrate via live upgrade, creating the pool and the
 pool/ROOT filesystem myself, tweaking both  copies and compression on
 pool/ROOT before using lucreate.
 I haven't tried this on a fresh install yet.
 after install, I'd think you could play games with zfs send | zfs
 receive on an inactive BE to rewrite everything with the desired
 attributes (more important for copies than compression).

 Would it be possible to create a new BE on a compressed filesystem and
 activate it?  Is snap upgrade implemted yet?  If so this should be quick.

Wouldn't snapupgrade clone the original BE ? In this case no data
would be rewritten.


 Ian.




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


Re: [zfs-discuss] ZFS root compressed ?

2008-06-05 Thread Ian Collins
Cyril Plisko wrote:
 On Fri, Jun 6, 2008 at 2:58 AM,  [EMAIL PROTECTED] wrote:
   
 Bill Sommerfeld writes:
 
 2. How can I do it ? (I think I can run zfs set compression=on
 rpool/ROOT/snv_90 in the other window, right after the installation
 begins, but I would like less hacky way.)
 
 what I did was to migrate via live upgrade, creating the pool and the
 pool/ROOT filesystem myself, tweaking both  copies and compression on
 pool/ROOT before using lucreate.
 I haven't tried this on a fresh install yet.
 after install, I'd think you could play games with zfs send | zfs
 receive on an inactive BE to rewrite everything with the desired
 attributes (more important for copies than compression).
   
 Would it be possible to create a new BE on a compressed filesystem and
 activate it?  Is snap upgrade implemted yet?  If so this should be quick.
 

 Wouldn't snapupgrade clone the original BE ? In this case no data
 would be rewritten.

   
Ah, good point!

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


Re: [zfs-discuss] ZFS root compressed ?

2008-06-05 Thread Albert Lee

On Fri, 2008-06-06 at 06:47 +0300, Cyril Plisko wrote:
 On Fri, Jun 6, 2008 at 2:58 AM,  [EMAIL PROTECTED] wrote:
  Bill Sommerfeld writes:
 
  2. How can I do it ? (I think I can run zfs set compression=on
  rpool/ROOT/snv_90 in the other window, right after the installation
  begins, but I would like less hacky way.)
 
  what I did was to migrate via live upgrade, creating the pool and the
  pool/ROOT filesystem myself, tweaking both  copies and compression on
  pool/ROOT before using lucreate.
  I haven't tried this on a fresh install yet.
  after install, I'd think you could play games with zfs send | zfs
  receive on an inactive BE to rewrite everything with the desired
  attributes (more important for copies than compression).
 
  Would it be possible to create a new BE on a compressed filesystem and
  activate it?  Is snap upgrade implemted yet?  If so this should be quick.
 
 Wouldn't snapupgrade clone the original BE ? In this case no data
 would be rewritten.

Correct, and Live Upgrade also clones the active BE when you do
lucreate. Unless you copy all the data manually, it's going to inherit
the uncompressed blocks from the current filesystem.

-Albert

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