On Sun, 7 Sep 2008, Kenny wrote:
>
> So I enable the lzjb compression feature and start poring in syslog 
> files.  However the problem appears that the files are not 
> compressing.  A zfs get all command shows compression is "on".  My 
> compressratio reports 1.00 and the files are the same size coming 
> from the previous host to the new pool.  The files are basic ascii 
> text.
>
> IS zfs compressing in the background and I just am not able to see 
> it?  Have I pulled another "user error" mistake?

I think that you may be the victim of bad advice from myself and 
others.

Every so often (something like seven seconds) zfs commits pending 
writes to disk.  This ensures that old writes don't remain in memory 
forever so that they never make it to disk (and are lost of the system 
crashes or loses power).  The problem is that if your log files are 
written really slowly, then the amount of data which accumulates 
within 7 seconds is very small (might be a single line of text), and 
ends up being uncompressable.  The block compressor will compress 
based on data in the block rather than whatever happens to be in the 
existing file already.

If the problem is due to the "trickle factor" then you should see that 
if you copy a large log file that the filesystem now shows that some 
data is compressed.

Another factor is if you chose to use NFS mounts to access your log 
server (bad idea).  If you did this then the write is committed right 
away without buffering for 7 seconds.  I believe that ZFS normally 
extends short tail blocks up to the filesystem block size, but this 
behavior may not apply for compression since compression writes 
variable sized blocks up to the filesystem block size.

Bob
======================================
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

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

Reply via email to