Date: Tue, 16 Jun 1998 01:12:42 -0700 (PDT) From: "Bryan K. Ogawa" <bkogawa@primenet.com> To: fewtch@serv.net Cc: questions@FreeBSD.ORG Subject: Re: Fragmentation? Message-ID: <199806160812.BAA01711@foo.primenet.com> References: <3.0.5.32.19980612014516.007de260@mx.serv.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In localhost.freebsd.questions you write: >Anyone have any idea how to defragment a FreeBSD partition? I've noticed >the fragmentation level of /usr steadily going up. I know there are Linux >versions of Defrag (assuming they'll only work on Linux partitions)... is >there a FreeBSD version? Thnx, The fragments reported during fsck time are NOT the same as "fragmentation" which occurs on FAT/FAT32 drives. The "fragments" reported there are the FFS's answer to the problem of files smaller than the block size (the same problem that FAT32 answers). However, BSD's answer is different, and probably more space efficient. When a small file is allocated on the FFS, it takes the 4K (or whatever size) block and "fragments" it into 4 blocks. If you have been writing a lot of small files, you'll get more fragments. As someone else mentioned, you can also get more fragments by having a nearly full disk. Another thing to note about the other type of "defragmenting": Because FreeBSD is a multitasking system, it often does more than one thing on the disk at a time. What this means is that having all your data in one continuous area (what FAT "defragmenters" try to achieve) is less useful (how much so, I can't say). Instead, the FFS tries to allocate the file locations "efficiently" on the disk, using a btree to allocate (I think). I hope this isn't too confusing. -- bryan k ogawa <bkogawa@primenet.com> http://www.primenet.com/~bkogawa/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806160812.BAA01711>