From owner-freebsd-questions Tue Dec 19 20: 0:48 2000 From owner-freebsd-questions@FreeBSD.ORG Tue Dec 19 20:00:46 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id E438F37B400 for ; Tue, 19 Dec 2000 20:00:45 -0800 (PST) Received: (qmail 1996 invoked by uid 100); 20 Dec 2000 04:00:45 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14912.12013.88339.583561@guru.mired.org> Date: Tue, 19 Dec 2000 22:00:45 -0600 (CST) To: questions@freebsd.org, sml_freebsd_questions@hotmail.com Subject: Re: Minimum filesystem block size In-Reply-To: <125776882@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Meyer types: > Scott M. Lewandowski 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. 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