Hello Darren, Monday, November 3, 2008, 12:44:29 PM, you wrote:
DJM> Robert Milkowski wrote: >> Hello zfs-discuss, >> >> http://git.kernel.org/?p=linux/kernel/git/mason/btrfs-unstable-standalone.git;a=commit;h=eecfe5255c533fefd38072a04e4afb56c40d9719 >> "If compression for a given set of pages fails to make them smaller, the >> file is flagged to avoid future compression attempts later." >> >> Maybe that's a good one - so if couple of blocks do not compress then >> flag it in file metadata and do not try to compress any blocks within >> the file anymore. Of course for some files it will be suboptimal so >> maybe a dataset option? DJM> I don't understand why having a couple of blocks in a file not DJM> compressible should cause the whole file not to be - that to me seems DJM> like a bad idea. DJM> What if for example the file is a disk image and the first couple of DJM> blocks aren't compressible but huge chunks of it are ? DJM> ZFS does compression at the block level and attempts it on every write. DJM> If a given block doesn't compress sufficiently well (hardcoded 12.5%) DJM> or at all then the block is tagged as ZIO_COMPRESS_OFF in the blkptr. DJM> That doesn't impact any other blocks though. DJM> So what would the dataset option you mention actually do ? DJM> What problem do you think needs solved here ? Well, let's say you have a file server with lots of different documents, pictures, etc. Some of these files are jpegs, gifs, zip files, etc. - they won't compress at all. Currently ZFS will try to do compression for each block of these files anyway, each time realizing that it's below 12.5% - it will be burning CPU cycles for no real advantage. With gzip compression it could save quite a lot of cpu cycles. I know that some files could compress very badly at the beginning and very good later on - that's why I believe the behavior should be tunable. Now, the good filter could be to use MAGIC numbers within files or approach btrfs come up with, or maybe even both combined. -- Best regards, Robert Milkowski mailto:[EMAIL PROTECTED] http://milek.blogspot.com _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss