From owner-freebsd-questions@FreeBSD.ORG Thu Mar 1 22:34:04 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 220C916A403 for ; Thu, 1 Mar 2007 22:34:04 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.10]) by mx1.freebsd.org (Postfix) with ESMTP id EC17F13C4AC for ; Thu, 1 Mar 2007 22:34:03 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 2675 invoked from network); 1 Mar 2007 22:34:03 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 1 Mar 2007 22:34:03 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id DF9F828431; Thu, 1 Mar 2007 17:34:02 -0500 (EST) To: Ivan Voras References: <539c60b90703010849x33dd4bbbt8f6ca6aa0c8e83a0@mail.gmail.com> <20070301165055.638b0a06.wmoran@collaborativefusion.com> From: Lowell Gilbert Date: Thu, 01 Mar 2007 17:34:02 -0500 In-Reply-To: (Ivan Voras's message of "Thu\, 01 Mar 2007 23\:04\:52 +0100") Message-ID: <44r6s8y4o5.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: defrag X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2007 22:34:04 -0000 Ivan Voras writes: > Bill Moran wrote: >> In response to Ivan Voras : > >>> 352462 files, 2525857 used, 875044 free (115156 frags, 94986 blocks, >>> 3.4% fragmentation) > >> >> Just to reiterate: >> "Fragmentation" on a Windows filesystem is _not_ the same as "fragmentation" >> on a unix file system. They are not comparable numbers, and do not mean >> the same thing. The only way to avoid fragmentation on a unix file system >> is to make every file you create equal to a multiple of the block size. > > Ok, my point was that 3.4% is a low number for a long used system, but, > for education sake, what is the difference between Windows' > "fragmentation" and Unix's "fragmentation"? > > I believe that a "fragmented file" in common usage refers to a file > which is not stored continuously on the drive - i.e. it occupies more > than one continuous region. How is UFS fragmentation different than > fragmentation on other kinds of file systems? > > UFS has cylinder groups, blocks and block fragments. Obviously, a file > larger than a cylinder group will get fragmented to spill over to > another cylinder group. Block fragments only occur at the end of files. If you know the standard computer science terminology, it can be described quite tersely. UFS fragmentation is a way of avoiding internal fragmentation from wasting too much space. MS-DOS-FS fragmentation is an example of external fragmentation in the storage space. They don't really have anything to do with each other. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/