public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* Auto-sparseifying
@ 2008-12-11 10:05 Oliver Mattos
  2008-12-11 13:54 ` Auto-sparseifying jim owens
  2008-12-11 14:57 ` Auto-sparseifying Chris Mason
  0 siblings, 2 replies; 3+ messages in thread
From: Oliver Mattos @ 2008-12-11 10:05 UTC (permalink / raw)
  To: linux-btrfs

Hi,

I've noticed many files have blocks of plain nulls up to a few kb long,
even files you wouldn't normally expect to, like ELF executables.  I
know that with compression enabled these will compress very small, but
that will have a reasonable hit on performance.  How much of an overhead
would it be to check all checksummed file extents to see if they match
the checksum for a blank (null filled) extent, and if it does then don't
save that data?   You may not even want to do it with checksums - just
by reading the first few bytes of data and checking for "nullness" would
let you know if the block is null or not.  (if the first 4 bytes are
null, then the whole block is likely to be nulls, so it's worth the
overhead of checking the whole block)

This would seem like a particularly low overhead space and performance
tweak.  (performance since read/write speed will be increased for
"average" files that contain a few null blocks)

Any thoughts?

Oliver.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-11 14:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-11 10:05 Auto-sparseifying Oliver Mattos
2008-12-11 13:54 ` Auto-sparseifying jim owens
2008-12-11 14:57 ` Auto-sparseifying Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox