From owner-freebsd-questions@FreeBSD.ORG Thu Jul 28 16:41:58 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 F13C116A41F for ; Thu, 28 Jul 2005 16:41:58 +0000 (GMT) (envelope-from freminlins@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7F5C43D45 for ; Thu, 28 Jul 2005 16:41:57 +0000 (GMT) (envelope-from freminlins@gmail.com) Received: by nproxy.gmail.com with SMTP id x37so102135nfc for ; Thu, 28 Jul 2005 09:41:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SdKz5zy8oijy5RvajShsu8tDjPekVNBP6uxC/4Ez4bCKm+uvZmT8KhjmwflwG3f1a3w8VFtXqjHEN90z/d0wX/ojQY9lKzSWyiFZQrx7F78SLHrdB1+6mDGcpo5r/gtKTPKFFE13clLM8VKWfcFb6d8SyH08U0oQhNkRwBantuk= Received: by 10.48.1.18 with SMTP id 18mr82025nfa; Thu, 28 Jul 2005 09:41:56 -0700 (PDT) Received: by 10.48.239.11 with HTTP; Thu, 28 Jul 2005 09:41:55 -0700 (PDT) Message-ID: Date: Thu, 28 Jul 2005 17:41:55 +0100 From: Freminlins To: freebsd-questions@freebsd.org In-Reply-To: <200507281157.42688.bob89@eng.ufl.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200507281157.42688.bob89@eng.ufl.edu> Subject: Re: defragmentation in FreeBSD 4.11 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Freminlins List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2005 16:41:59 -0000 On 7/28/05, Bob Johnson wrote: > > Why is it unnecessary to defragment UFS? > > >=20 > In normal use, files never become fragmented enough to affect performance= . In > a (loose) sense, files are intentionally fragmented in a controlled way s= o > that fragmentation doesn't cause problems. If you run fsck on a partitio= n, > you will typically see fragmentation levels of less than one percent. >=20 > Also, keep in mind that in the default formatting, a FreeBSD partition ha= s 8% > of the disk space withheld from normal users to help keep the disk from > becoming so full the system can't operate, and it has the side effect of > helping to prevent fragmentation as well. It is why df can show a disk b= eing > as much as 108% full. It is possible to make this space available for no= rmal > use if, for example, you are using a partition only for data storage and = you > want to squeeze every last bit of space out of it, but of course there wi= ll > be some performance penalty as it starts to get full. You can also adjus= t > other disk parameters to optimize for your particular needs. See tunefs(= 8). >=20 > If the disk gets close enough to full, the OS has no choice but to start > fragmenting things. Try to keep your disks less than about 90% full (tha= t's > a number I remember from somewhere -- it's just a guideline and not a fir= m > limit). My /home partition is 95% full according to df (which means it i= s > actually a little under 90% full including the reserved capacity), and fs= ck > shows 0.1% fragmentation. Of course, it's a fairly big partition, so it > still has over a gigabyte of free space. Even the ISO CD images I downlo= aded > a few days ago probably didn't get much fragmentation. Apparently UFS can get fragmented even when there is lots of apparently free space: http://blogs.sun.com/roller/page/sprakki?entry=3Dufs_file_system_defragment= ation Obviously this is Sun UFS, but there is a common heritage. I've never needed to do any sort of defrag on either FreeBSD or Solaris though. > - Bob Frem.