ZFS mirror install /mnt is empty
paul at kraus-haus.org
Mon May 13 13:38:04 UTC 2013
On May 13, 2013, at 9:25 AM, Trond Endrestøl <Trond.Endrestol at 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
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.
Deputy Technical Director, LoneStarCon 3
Sound Coordinator, Schenectady Light Opera Company
More information about the freebsd-questions