Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Sep 2005 19:17:44 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        dougb@FreeBSD.org
Cc:        freebsd-hackers@FreeBSD.org, aanton@smtpx.spintech.ro, mwm@mired.org
Subject:   Re: journaling fs and large mailbox format
Message-ID:  <200509300217.j8U2HioU009196@gw.catspoiler.org>
In-Reply-To: <433C6D51.8020409@FreeBSD.org>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509300217.j8U2HioU009196>