consequences of migrating to maildir storage system
Charles Swiger
cswiger at mac.com
Tue Oct 28 08:36:20 PST 2003
On Monday, October 27, 2003, at 09:02 PM, Nathan Kay wrote:
> That is to say, if your file system block size is 16k, and most
> of the email messages are 1k, that's 15k per message (on average) that
> you've lost, unless the file system is doing things to avoid it.
Your thoughts are good, but note that the Unix FFS can break a 16K file
system block size into eight 2K 'fragments', per "man inode":
Addresses stored in inodes are capable of addressing fragments of
`blocks'. File system blocks of at most size MAXBSIZE can be
optionally
broken into 2, 4, or 8 pieces, each of which is addressable; these
pieces
may be DEV_BSIZE, or some multiple of a DEV_BSIZE unit.
Large files consist of exclusively large data blocks. To avoid
undue
wasted disk space, the last data block of a small file is
allocated as
only as many fragments of a large block as are necessary. The
file sys-
tem format retains only a single pointer to such a fragment, which
is a
piece of a single large block that has been divided.
Also, the amount of "wasted" disk space due to intrinsic fragmentation
(ie, due to the fact that files are stored in blocks leaving unused
bytes after EOF) can be estimated as [ 0.5 * frag_size *
number_of_files ].
--
-Chuck
More information about the freebsd-isp
mailing list