RAID-Z wasted space - asize roundups to nparity +1

Matthew Ahrens mahrens at delphix.com
Tue Jan 29 18:14:40 UTC 2013


On Tue, Jan 29, 2013 at 2:51 AM, Adam Nowacki <nowakpl at platinum.linux.pl>wrote:

> I've also identified another problem with ZFS wasting disk space. When
> compression is off allocations are always a multiple of record size. With
> the default recordsize of 128KiB a 129KiB file would use 256KiB of disk
> space (+ parity and other inefficiencies mentioned above). This may be
> there to help with fragmentation but then it would be good to have a
> setting to turn it off - even if by means of a no-op compression that would
> count zeroes backwards and return short psize.
>

The most straightforward way to do this would be, as you alluded, to always
compress the last block of the file, even if no compression has been
selected.  For maximum speed, we could use the already-implemented zle
(zero-length encoding) algorithm.

--matt


More information about the freebsd-fs mailing list