Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2003 11:36:17 -0500
From:      Charles Swiger <cswiger@mac.com>
To:        freebsd-isp@freebsd.org
Subject:   Re: consequences of migrating to maildir storage system
Message-ID:  <DA6AAD3F-0964-11D8-8AC4-003065ABFD92@mac.com>
In-Reply-To: <20031028020239.GA74323@numenor.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DA6AAD3F-0964-11D8-8AC4-003065ABFD92>