On May 13, 2013, at 9:25 AM, Trond Endrestøl 
<trond.endres...@fagskolen.gjovik.no> wrote:
> 
> I guess it's due to my (mis)understanding that files shorter than 4KB 
> stored on 4K drives never will be subject to compression. And as you 
> state below, the degree of compression depends largely on the data at 
> hand.

        Not a misunderstanding at all. With a 4K minimum block size (which is 
what a 4K sector size implies), a file less than 4KB will not compress at all. 
While ZFS does have a variable block size (512B to 128KB), with a 4K minimum 
black size (just like with any fixed block FS with a 4KB block size), small 
files take up more pace than they should (a 1KB file takes up an entire 4KB 
block). This ends up being an artifact of the block size and not ZFS, any FS on 
a 4K sector drive will have similar behavior.

        I leave compression off on most of my datasets, only turning it on on 
ones where I see a real benefit. /var compresses vert well (I turn off 
compression in /etc/newsyslog.conf and let ZFS compress even the current logs 
:-), I find that some VM's compress very well, media files do NOT compress very 
well (they tend to already be compressed), generic data compresses well, as do 
scanned documents (uncompressed PDFs). Your individual results will vary :-)

        Also remember, if you start with compression on and after a while you 
are not seeing good compression ratios, go ahead and turn it off. The already 
written data will remain compressed but new writes will not be.

--
Paul Kraus
Deputy Technical Director, LoneStarCon 3
Sound Coordinator, Schenectady Light Opera Company

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to