getting to 4K disk blocks in ZFS

Matthew D. Fuller fullermd at over-yonder.net
Mon Oct 13 19:19:11 UTC 2014


On Mon, Oct 13, 2014 at 11:48:27AM -0700 I heard the voice of
Darren Pilgrim, and lo! it spake thus:
> 
> If the default is 4k and (for the limited time they're still common)
> you use true 512b disks, you can waste space.  Sure, but how much
> space?

The median file in /usr/ports is 408 bytes.  Over 90% of the files are
under 2k, which means the wastage for them is over 100% (before
counting what gain compression might get).  A little offhand mathery
says it's about 78% extra overhead on the whole.

And that includes the almost hundred megs (over 22% of the total size
of the FS) for the INDEX.db, plus the ~90 megs of the flat INDEX files
(another 20%).  If you pull those out, the overhead is 130%.


(To be sure, relatively few people have ports trees eating most of
their space, but still; it's pretty pathological.  I for one did
decide some years back to always force 4k on any new FSen to make
future life simpler, accepting the bloat, but it's there.)


-- 
Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.


More information about the freebsd-stable mailing list