Date: Tue, 19 Dec 2000 22:00:45 -0600 (CST) From: Mike Meyer <mwm@mired.org> To: questions@freebsd.org, sml_freebsd_questions@hotmail.com Subject: Re: Minimum filesystem block size Message-ID: <14912.12013.88339.583561@guru.mired.org> In-Reply-To: <125776882@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Meyer <mwm@mired.org> types: > Scott M. Lewandowski <sml_freebsd_questions@hotmail.com> types: > > I am thinking of deploying qmail to take advantage of the Maildir format > > that it offers. However, it seems like this will be very wasteful of space. > > According to the newfs man page, the minimum disk block size is 4096 bytes. > > Since Maildir stores each new mail message, as well as all archived mail > > messages, as separate files, this means that each email will take up 4K of > > disk space, even though my average mail message is only ~1K. Is this > > correct, or am I missing something? Is there any way to use a smaller block > > size on a new filesystem? > You're missing fragments in the file system. Any partial blocks in a > file are stored in fragments, not blocks, and fragments are shared > amongst files. I always use the default (1k), but it can be as low as > 512 bytes (with 4K blocks). Reread the newfs man page for details. Just to clarify the "fragments are shared amongst files", I meant that blocks that hold fragments can hold fragments from more than one file. So with three files of sizes 24K + 828 bytes, 576 bytes, and 1812 bytes on a 4K/1K file system, you get a file with 6 blocks and a fragment (828 bytes of 1K) and two files that are pure fragment; one being one fragment (576 bytes of 1K) and one of two (1812 bytes of 2K). The fragments could all fit in one block, meaning your total disk usage is 7 blocks (6 blocks for the first file, and one block for the fragments of all the rest), not counting inodes, directory blocks, etc. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Unix/FreeBSD consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14912.12013.88339.583561>