From owner-freebsd-questions@FreeBSD.ORG Mon Oct 3 14:11:46 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD7EA16A41F for ; Mon, 3 Oct 2005 14:11:45 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail23.sea5.speakeasy.net (mail23.sea5.speakeasy.net [69.17.117.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6402A43D48 for ; Mon, 3 Oct 2005 14:11:45 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 9241 invoked from network); 3 Oct 2005 14:11:44 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail23.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 3 Oct 2005 14:11:44 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 7215C40; Mon, 3 Oct 2005 10:11:43 -0400 (EDT) Sender: lowell@be-well.ilk.org To: Kiffin Gish To: freebsd-questions@freebsd.org References: <1128254897.26048.11.camel@localhost> <20051002121454.3D1C643D45@mx1.FreeBSD.org> <1128268728.704.2.camel@localhost> From: Lowell Gilbert Date: 03 Oct 2005 10:11:43 -0400 In-Reply-To: <1128268728.704.2.camel@localhost> Message-ID: <44hdby3d28.fsf@be-well.ilk.org> Lines: 62 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: Re: Defragmentation needed with FreeBSD ... 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: Mon, 03 Oct 2005 14:11:46 -0000 Kiffin Gish writes: > On Sun, 2005-10-02 at 17:11 +0400, Andrew P. wrote: > > On 10/2/05, Tamouh H. wrote: > > > > > > > > > > > I was just wondering if like in Windows disk fragmentation > > > > arises, and if so then how should one go about defragmenting it? > > > > > > There is no fragmentation in the BSD file systems, that is something related > > > to Windows only. You might want to add the line: > > > > > > fsck_y_enable="YES" > > > > > > to your /etc/rc.conf in the event fsck finds errors on your disks. > > > > > > > > > _______________________________________________ > > > freebsd-questions@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > > > > > > Of course there is fragmentation. > > > > UFS, particularly its implementation in FreeBSD is > > more intelligent than NTFS/FAT32. When there is > > enough free space on the disk (typically more than > > 15%, see tunefs(8) for details), I/O is automatically > > optimized to minimize fragmentation. > > > > When your win32 box is idle, but the hdd is scratching > > it's very annoying, because you know that windows > > is swapping something. > > > > When your bsd box is idle, but the hdd is scratching > > it's quite pleasant, 'cuz that's some hard-working > > daemons make sure that you don't loose any data, > > and always can enjoy the maximum performance. > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > So if I understand you correctly, this means that the disk is > defragmented automatically in the background during idle use, e.g. I do > not have to do anything else to enable it because it is already enabled. > > Correct? Not really. Rather than trying to keep an entire file contiguous, UFS just keeps reasonably large blocks contiguous, and all of the blocks in the same part of the disk ("cylinder group"). The basics of this are all still the same as in the original research paper; see /usr/share/doc/smm/05.fastfs/paper.ascii.gz. Also bear in mind that the term "fragmentation" is used to mean something different in the Microsoft world than it is with respect to Unix filesystems. I have commented on that before on this list; please see the archives to avoid repeating old discussions. For example, http://lists.freebsd.org/pipermail/freebsd-questions/2005-July/094544.html