journaling fs and large mailbox format
truckman at FreeBSD.org
Thu Sep 29 19:17:56 PDT 2005
On 29 Sep, Doug Barton wrote:
> Mike Meyer wrote:
>> A 4K block won't hold your median file. But an 8K block wastes a lot of
>> space. You might get a file with 0 blocks and 3 frags, assuming that UFS2
>> will do that, which doesn't seem good. If UFS2 won't do that, you get a
>> lot of half-empty blocks, which likewise isn't good. The other option is
>> a 4K block size, which means you get a lot of 1 block + 1 frag files.
>> That seems optimal in this case.
> That's a logical analysis, but you're missing one important premise. UFS
> doesn't do "more than one file per frag" until the file system gets close to
> filling up, and the optimization switches from time to space. Therefore, in
> your example you're actually wasting more space than you would with 8k
> blocks, and as a side effect making the fs less efficient in at least 2 ways.
If you know that most of the files are write-once and don't grow over
time, you can tune the file system to always do space optimization. I
used to do this with classic Usenet spools and it worked well.
More information about the freebsd-hackers