Weekly Classic Computer Trivia Question (20150410)

ANDY HOLT andy.holt at tesco.net
Sun Apr 12 04:14:10 CDT 2015


----- Original Message -----
From: "Eric Smith" <spacewar at gmail.com>
>>>>

On Fri, Apr 10, 2015 at 11:03 AM, ANDY HOLT <andy.holt at tesco.net> wrote:
> d) AFAICT ZFS doesn't use the trick used by some *ix filesystems of packing the data contents for small files into the directory.
>     (to do so would clash with the reliability focus of ZFS)
[[ I did, of course, mean inode or file pointer rather than directory ]]


That capability has recently been added to OpenZFS as the
"embedded_data" feature, so it is now available on Illumos, FreeBSD,
Linux, and OSX:

"When this feature is enabled, the contents of highly-compressible
blocks are stored in the block "pointer" itself (a misnomer in this
case, as it contains the compresseed data, rather than a pointer to
its location on disk). Thus the space of the block (one sector,
typically 512 bytes or 4KB) is saved, and no additional i/o is needed
to read and write the data block."
<<<<


That information - together with the implicit note that the blocksize is 
MUCH smaller than implied by the wikipedia article - would modify my answer :(

Looking at the man page I see that - at least on some systems - the default blocksize is 8Kb rather than the 128KB that the wiki article states and that I took as the basis for my calculation. 
That alone would be sufficient to give reverse my answer.
I think my assumption of no "embedded data" is more valid. It is a feature less than 12 months old so only the most "bleeding edge" distributions are likely to consider it safe to enable by default and, given how inexpensive storage is nowadays (3TB for £100 approx), seems unlikely to be of massive value except on systems with huge numbers of very small files.

But, thanks for the information anyhow.

Andy


More information about the cctalk mailing list