Date: Thu, 28 Jul 2005 17:41:55 +0100 From: Freminlins <freminlins@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: defragmentation in FreeBSD 4.11 Message-ID: <eeef1a4c050728094127f97afb@mail.gmail.com> In-Reply-To: <200507281157.42688.bob89@eng.ufl.edu> References: <200507281157.42688.bob89@eng.ufl.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7/28/05, Bob Johnson <bob89@eng.ufl.edu> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eeef1a4c050728094127f97afb>