Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!rutgers!topaz.rutgers.edu!hedrick From: hedrick@topaz.rutgers.edu (Charles Hedrick) Newsgroups: comp.unix.wizards Subject: Re: Disk Fragmentation Message-ID: <13521@topaz.rutgers.edu> Date: Fri, 24-Jul-87 20:37:25 EDT Article-I.D.: topaz.13521 Posted: Fri Jul 24 20:37:25 1987 Date-Received: Sat, 25-Jul-87 16:03:16 EDT References: <8441@brl-adm.ARPA> <7674@mimsy.UUCP> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 27 In article <8441@brl-adm.ARPA> eichelbe@nadc.arpa (J. Eichelberger) writes: >Is there a disk defragmenter utility for 4.3 BSD UNIX on VAXes? >That is, a utility to move files around on the disk so that they are >less fragmented (more contiguous) and larger free space areas exist on >the disk. In article <7674@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) replies: >Yes. It is called `cp'. Chris is right, of course, but it is probably worth one more comment about why he is right. He alludes to the fancy allocation strategies used by the Berkeley fast file system. That's certainly important, because it lets your system make the best use of free space. You don't need literally contiguous space in order to get reasonable performance. But their most important trick is the 90% rule. Note that fragmentation is a problem mostly when disks are very nearly full. If you just have a few blocks free, they'll probably be scattered all over the place. But if you have lots of free space, with reasonable algorithms you can avoid fragmentation, and thus never need to reorganize. So what Berkeley did is to make sure that you never fill your disk. When you get to 90% of the capacity, the system pretends it is full. By never letting you completely fill the disk, the fast file system makes sure that there is enough free space that it can normally find a fairly good location for the next block of a file. Most of us think it is worth wasting 10% of our disk to avoid having to do defragmentation all the time. Most Unix installations depend upon this, and don't do disk space reorganizations.